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

Annotation of /trunk/models/system.a4l

Parent Directory Parent Directory | Revision Log Revision Log


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

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