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

Contents of /trunk/models/system.a4l

Parent Directory Parent Directory | Revision Log Revision Log


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

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