/[ascend]/trunk/models/ivpsystem.a4l
ViewVC logotype

Annotation of /trunk/models/ivpsystem.a4l

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2651 - (hide annotations) (download) (as text)
Thu Dec 13 07:29:48 2012 UTC (12 years, 4 months ago) by jpye
File MIME type: text/x-ascend
File size: 4623 byte(s)
Fixing GPL header, removing postal address (rpmlint incorrect-fsf-address)
1 aw0a 1 REQUIRE "basemodel.a4l";
2     (* => basemodel.a4l *)
3     PROVIDE "ivpsystem.a4l";
4     PROVIDE "system.a4l";
5    
6     (*
7     * ivpsystem.a4l
8     * by Benjamin A. Allan, Jennifer Stokes
9     * Part of the ASCEND Library
10     * $Date: 1998/06/17 19:09:35 $
11     * $Revision: 1.7 $
12     * $Author: mthomas $
13     * $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/ivpsystem.a4l,v $
14     *
15     * This file is part of the ASCEND Modeling Library.
16     *
17     * Copyright (C) 1994 - 1998 Carnegie Mellon University
18     *
19     * The ASCEND Modeling Library is free software; you can redistribute
20     * it and/or modify it under the terms of the GNU General Public
21     * License as published by the Free Software Foundation; either
22     * version 2 of the License, or (at your option) any later version.
23     *
24     * The ASCEND Modeling Library is distributed in hope that it
25     * will be useful, but WITHOUT ANY WARRANTY; without even the implied
26     * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27     * See the GNU General Public License for more details.
28     *
29     * You should have received a copy of the GNU General Public License
30 jpye 2651 * along with this program. If not, see <http://www.gnu.org/licenses/>.
31 aw0a 1 *)
32    
33     (*============================================================================*
34    
35     I V P S Y S T E M . A 4 L
36     -----------------------------
37    
38     AUTHOR: Benjamin A. Allan
39    
40     DATES: 06/94 - Original Code (system.a4l)
41     02/95 - Definitions for discrete variables added by
42     Craig Schmidt (CWS). (system.a4l)
43     08/95 Jennifer Stokes extensions for ODE solvers.
44     04/96 - Modified for the use of constants
45     03/98 - Added messages.
46    
47     CONTENTS: Basic definitions for relation, solver_var,
48     and generic_real. This file is necessary for all
49     other ASCEND models to work on ASCEND3C with the
50     blsode DAE interface. For strictly algebraic
51     modeling, the other system.a4l should be used and
52     will give rather smaller (memorywise) solver_var.
53    
54     *============================================================================*)
55    
56     DEFINITION relation
57    
58     included IS_A boolean;
59     message IS_A symbol;
60    
61     included := TRUE;
62     message := 'none';
63     END relation;
64    
65    
66     DEFINITION logic_relation
67    
68     included IS_A boolean;
69     included := TRUE;
70    
71     message IS_A symbol;
72     message := 'none';
73    
74     END logic_relation;
75    
76     ATOM boolean_var REFINES boolean
77     DEFAULT TRUE;
78    
79     fixed IS_A boolean;
80     fixed := FALSE;
81    
82     END boolean_var;
83    
84     ATOM solver_var REFINES real
85     DEFAULT 0.5 {?};
86    
87     lower_bound IS_A real;
88     upper_bound IS_A real;
89     nominal IS_A real;
90     fixed IS_A boolean;
91     message IS_A symbol;
92    
93     ode_type IS_A integer;
94     ode_id IS_A integer;
95     obs_id IS_A integer;
96     ode_atol IS_A real;
97     ode_rtol IS_A real;
98    
99     fixed := FALSE;
100     lower_bound := -1e20 {?};
101     upper_bound := 1e20 {?};
102     nominal := 0.5 {?};
103     message := 'none';
104    
105     ode_type := 0;
106     ode_atol := 1e-4 {?};
107     ode_rtol := 1e-8 {?};
108    
109     END solver_var;
110    
111     ATOM generic_real REFINES solver_var
112     DIMENSIONLESS
113     DEFAULT 0.5;
114     lower_bound := -1e20;
115     upper_bound := 1e20;
116     nominal := 0.5;
117     END generic_real;
118    
119     (*============================================================================*
120    
121     Modified by CWS, 2/95
122    
123     solver_int is an integer variable for an MILP solver
124     lower bound almost always 0
125     relaxed indicates if the var should be treated as a normal solver_var
126     solver_binary is a binary variable for a MILP solver
127     lower bound must be 0, and upper bound must be 1
128     solver_semi is a semicontinous variable for use in SCICONIC
129     this var can have a value between 1 and the arbitrary upper bound, or 0.
130     (note that SCICONIC requires the lower bound to be 1)
131     if is_zero = true, then the current value is taken as 0
132    
133     *===========================================================================*)
134    
135    
136     ATOM solver_int REFINES solver_var
137     DIMENSIONLESS
138     DEFAULT 0.0;
139    
140     relaxed IS_A boolean;
141    
142     lower_bound := 0.0;
143     upper_bound := 1000000.0;
144     nominal := 0.5;
145     END solver_int;
146    
147     ATOM solver_binary REFINES solver_int
148     DIMENSIONLESS
149     DEFAULT 0.0;
150    
151     lower_bound := 0.0;
152     upper_bound := 1.0;
153     nominal := 0.5;
154     END solver_binary;
155    
156     ATOM solver_semi REFINES solver_var
157     DEFAULT 1.0 {?};
158    
159     is_zero IS_A boolean;
160     relaxed IS_A boolean;
161    
162     lower_bound := 1 {?};
163     upper_bound := 1e20 {?};
164     nominal := 1.0 {?};
165     END solver_semi;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22