model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5....
Transcript of model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5....
![Page 1: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/1.jpg)
model.lst Fri Aug 20 07:36:53 2021 1
![Page 2: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/2.jpg)
model.lst Fri Aug 20 07:36:53 2021 2
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 1
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
INCLUDE /var/www/html/interfaces/cgi-bin/waternet/ex1.dat
2 * Example 1 from paper. Process unit 2 Treatment unit 2.
3
INCLUDE /var/www/html/interfaces/cgi-bin/waternet/sets.inc
7 ***************************SETS FOR MODEL*******************************
8
9 SETS
10
11 TU_STC Treating units
12 /T1,T2,T3/
13
14 PU_STC Process units
15 /P1,P2,P3,P4,P5/
16
17 SPL_STC Splitters
18 /S1,
19 S11,S21,S31,S41,S51,
20 SA11,SA21,SA31/
21
22 MXR Mixers
23 /M1,M2,M3,M4,M5
24 M6,M7,M8
25 MF/
26
27 STR_STC Streams
28 /IN
29 1,2,3,4,5,
30 11,12,121*129,
31 21,22,221*229,
32 31,32,321*329,
33 41,42,421*429,
34 51,52,521*529,
35 13,14,141*149,
36 23,24,241*249,
37 33,34,341*349,
38 FP/
39
40 STRF(STR_STC) Feed
41 /IN/;
42
43 sets
44 SPL(SPL_STC) Dynamic set - splitters
45 STR(STR_STC) Dynamic set - streams
46 PU(PU_STC) Dynamic set - process units
47 TU(TU_STC)
48
49 ITU(TU_STC,STR_STC) Treating units input streams
50 /T1.13
51 T2.23
52 T3.33/
53
54 OTU(TU_STC,STR_STC) Treating units output streams
55 /T1.14
![Page 3: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/3.jpg)
model.lst Fri Aug 20 07:36:53 2021 3
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 2
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
56 T2.24
57 T3.34/
58
59 IPU(PU_STC,STR_STC) Process units input streams
60 /P1.11
61 P2.21
62 P3.31
63 P4.41
64 P5.51/
65 OPU(PU_STC,STR_STC) Process units output streams
66 /P1.12
67 P2.22
68 P3.32
69 P4.42
70 P5.52/
71 ISPL(SPL_STC,STR_STC) Spliters input streams
72 /S1.IN
73 S11.12
74 S21.22
75 S31.32
76 S41.42
77 S51.52
78 SA11.14
79 SA21.24
80 SA31.34 /
81 OSPL(SPL_STC,STR_STC) Splitters output streams
82 /(S1).1*5
83 (S11).121*129
84 (S21).221*229
85 (S31).321*329
86 (S41).421*429
87 (S51).521*529
88 (SA11).141*149
89 (SA21).241*249
90 (SA31).341*349/
91 IMXR(MXR,STR_STC) Mixers input streams
92 /M1.1
93 M1.121,M1.221,M1.321,M1.421,M1.521,M1.141,M1.241,M1.341,
94 M2.2
95 M2.122,M2.222,M2.322,M2.422,M2.522,M2.142,M2.242,M2.342,
96 M3.3
97 M3.123,M3.223,M3.323,M3.423,M3.523,M3.143,M3.243,M3.343,
98 M4.4
99 M4.124,M4.224,M4.324,M4.424,M4.524,M4.144,M4.244,M4.344,
100 M5.5
101 M5.125,M5.225,M5.325,M5.425,M5.525,M5.145,M5.245,M5.345,
102 M6.126,M6.226,M6.326,M6.426,M6.526,M6.146,M6.246,M6.346,
103 M7.127,M7.227,M7.327,M7.427,M7.527,M7.147,M7.247,M7.347,
104 M8.128,M8.228,M8.328,M8.428,M8.528,M8.148,M8.248,M8.348,
105 MF.129,MF.229,MF.329,MF.429,MF.529,MF.149,MF.249,MF.349/
106 OMXR(MXR,STR_STC) Mixers output streams
107 /M1.11
108 M2.21
![Page 4: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/4.jpg)
model.lst Fri Aug 20 07:36:53 2021 4
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 3
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
109 M3.31
110 M4.41
111 M5.51
112 M6.13
113 M7.23
114 M8.33
115 MF.FP/;
116
117 SETS
118 p process units /1*2/
119 t treatment units /1*2/
120 comp contaminants /a,b/;
121
122 TABLE BETA(TU_STC,COMP) ’% of recovery of each contaminat in each TU’
123
124 A B
125 T1 0.95 0
126 T2 0 0.95
127 ;
128
129 TABLE L(PU_STC,COMP) ’load of contaminant inside process unit kg/h’
130
131 A B
132 P1 1 1.5
133 P2 1 1
134 ;
135
136 TABLE Cmax(PU_STC,COMP) Maximun inlet concentration contaminat j Process Unit p (ppm)
137
138 A B
139 P1 0 0
140 P2 50 50
141 ;
142
143 PARAMETER MAX_P(PU_STC) ’Maximum flowrate for process units [ton/h]’
144 /P1 = 40
145 P2 = 50/
146
147 OCT(TU_STC) operating cost coefficient for treatment unit t
148 /T1 = 1
149 T2 = 0.0067/
150
151 ICT(TU_STC) investment cost coefficient for treatment unit t
152 /T1 = 16800
153 T2 = 12600/
154
155 exp(TU_STC) cost function exponent
156 /T1 = 0.7
157 T2 = 0.7/
158 ;
159 SCALARS
160 hours hours of plant operation per annum /8000/
161 AR annualized factor for investment on treatment units/0.1/
![Page 5: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/5.jpg)
model.lst Fri Aug 20 07:36:53 2021 5
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 4
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
162 Cout environmental discharge limit for contaminants A and B (ppm) /10/;
INCLUDE /var/www/html/interfaces/cgi-bin/waternet/model.inc
164
165 **************************************************************************
166 ** ** ** ** ** ** ** ** EQUATION FILE FOR WATER ** ** ** ** ** ** ** ** **
167 **************************************************************************
168
169
170 SCALAR
171 FAC ’unit conversion factor (C in ppm and L in kg/h)’ /1E3/;
172
173 POSITIVE VARIABLES
174 F(STR_STC) ’total flowrate of each stream [ton/hr]’
175 C(STR_STC,COMP) ’pollutants concentration in each stream [ppm]’
176
177 ;
178 ALIAS(STR,STR1);
179
180 ** SPLITTERS
181 EQUATIONS
182 SPLFB(SPL_STC,STR_STC) ’mass balance, total flowrates’
183 SPLCB(SPL_STC,STR_STC,COMP) ’mass balance, concentrations’;
184
185
186 SPLFB(SPL,STR) $ISPL(SPL,STR).. F(STR) =E= SUM(STR1 $OSPL(SPL,STR1),F(STR1));
187 SPLCB(SPL,STR,COMP) $OSPL(SPL,STR).. SUM(STR1 $ISPL(SPL,STR1),C(STR1,COMP)) =E= C(STR,CO
MP);
188
189 ** TREATING UNITS
190 EQUATIONS
191 TUMB(TU_STC) ’mass balance to total flowrates’
192 TUCB(TU_STC,COMP) ’mass balance to individual pollutants’;
193
194 TUMB(TU).. SUM(STR $ITU(TU,STR),F(STR)) =E= SUM(STR1 $OTU(TU,STR1),F(STR1));
195 TUCB(TU,COMP).. SUM(STR $(OTU(TU,STR)), C(STR,COMP)) =E= SUM(STR1 $(ITU(TU,STR1)),(1 - B
ETA(TU,COMP)) * C(STR1,COMP));
196
197 ** MIXERS
198 EQUATIONS
199 MXRMB(MXR,STR_STC) ’mass balance to total flowrates’
200 MXRCB(MXR,STR_STC,COMP) ’mass balance to individual concentrations’;
201
202 MXRMB(MXR,STR) $OMXR(MXR,STR).. F(STR) =E= SUM(STR1 $IMXR(MXR,STR1),F(STR1));
203 MXRCB(MXR,STR,COMP) $OMXR(MXR,STR).. F(STR) * C(STR,COMP) =E= SUM(STR1 $IMXR(MXR,STR1),F
(STR1) * C(STR1,COMP));
204
205 ** PROCESS UNITS
206 EQUATIONS
207 PUMB(PU_STC) ’mass balance to total flowrates’
208 PUCB(PU_STC,COMP) ’mass balance to individual concentrations’;
209
210 PUMB(PU).. SUM(STR $IPU(PU,STR),F(STR)) =E= SUM(STR1 $OPU(PU,STR1),F(STR1));
211 PUCB(PU,COMP).. SUM(STR $(OPU(PU,STR)),F(STR)*C(STR,COMP))- SUM(STR1 $(IPU(PU,STR1)),F(S
TR1)*C(STR1,COMP))- L(PU,COMP)*FAC =E= 0;
212
213
![Page 6: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/6.jpg)
model.lst Fri Aug 20 07:36:53 2021 6
214 ** INITIALIZATION OF SETS
![Page 7: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/7.jpg)
model.lst Fri Aug 20 07:36:53 2021 7
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 5
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
215 STR(STR_STC) = YES;
216 SPL(SPL_STC) = YES;
217 PU(PU_STC) = YES;
218 TU(TU_STC) = YES;
219
220 * Overall Relaxation
221 EQUATIONS
222
223 REL(COMP);
224
225 REL(COMP).. sum(PU,L(PU,COMP)*FAC) =E= F(’FP’)*C(’FP’,COMP) + SUM((TU,STR)$(ITU(TU,STR)
),BETA(TU,COMP)*(F(STR)*C(STR,COMP)));
226
227 ***stream restrictions for model
228 if ((card(t) eq 2 and card(p) eq 2),
229 STR(’3’) = NO; STR(’4’) = NO; STR(’5’) = NO;
230 STR(’123’) = NO; STR(’124’) = NO; STR(’125’) = NO; STR(’128’) = NO;
231 STR(’143’) = NO; STR(’144’) = NO; STR(’145’) = NO; STR(’148’) = NO;
232 STR(’223’) = NO; STR(’224’) = NO; STR(’225’) = NO; STR(’228’) = NO;
233 STR(’243’) = NO; STR(’244’) = NO; STR(’245’) = NO; STR(’248’) = NO;
234 PU(’P3’) = NO; PU(’P4’) = NO; PU(’P5’) = NO;
235 STR(’31’) = NO; STR(’32’) = NO; STR(’33’) = NO; STR(’34’) = NO;
236 STR(’321’) = NO; STR(’322’) = NO; STR(’323’) = NO; STR(’324’) = NO; STR(’325’) = NO;
STR(’326’) = NO; STR(’327’) = NO; STR(’329’) = NO;
237 STR(’341’) = NO; STR(’342’) = NO; STR(’343’) = NO; STR(’344’) = NO; STR(’345’) = NO;
STR(’346’) = NO; STR(’347’) = NO; STR(’348’) = NO; STR(’349’) = NO;
238 STR(’41’) = NO; STR(’42’) = NO; STR(’421’) = NO; STR(’422’) = NO; STR(’423’) = NO; STR(’
424’) = NO; STR(’425’) = NO; STR(’426’) = NO;
239 STR(’427’) = NO; STR(’428’) = NO; STR(’429’) = NO;
240 STR(’51’) = NO; STR(’52’) = NO; STR(’521’) = NO; STR(’522’) = NO; STR(’523’) = NO; STR(’
524’) = NO; STR(’525’) = NO; STR(’526’) = NO;
241 STR(’527’) = NO; STR(’528’) = NO; STR(’529’) = NO; TU(’T3’) = NO; spl(’s31’) = no; spl(
’s41’)=no; spl(’s51’)=no; spl(’sa31’)=no;
242 );
243
244 if ((card(t) eq 1 and card(p) eq 2),
245 STR(’3’) = NO; STR(’4’) = NO; STR(’5’) = NO;
246 STR(’123’) = NO; STR(’124’) = NO; STR(’125’) = NO; STR(’127’) = NO; STR(’128’) = NO;
247 STR(’143’) = NO; STR(’144’) = NO; STR(’145’) = NO; STR(’147’) = NO; STR(’148’) = NO;
248 STR(’223’) = NO; STR(’224’) = NO; STR(’225’) = NO; STR(’227’) = NO; STR(’228’) = NO;
249 STR(’241’) = NO; STR(’242’) = NO; STR(’246’) = NO;
250 STR(’243’) = NO; STR(’244’) = NO; STR(’245’) = NO; STR(’248’) = NO; STR(’249’) = NO;
251 PU(’P3’) = NO; PU(’P4’) = NO; PU(’P5’) = NO;
252 STR(’23’) = NO; STR(’24’) = NO;
253 STR(’31’) = NO; STR(’32’) = NO; STR(’33’) = NO; STR(’34’) = NO;
254 STR(’321’) = NO; STR(’322’) = NO; STR(’323’) = NO; STR(’324’) = NO; STR(’325’) = NO;
STR(’326’) = NO; STR(’327’) = NO; STR(’329’) = NO;
255 STR(’341’) = NO; STR(’342’) = NO; STR(’343’) = NO; STR(’344’) = NO; STR(’345’) = NO;
STR(’346’) = NO; STR(’347’) = NO; STR(’348’) = NO; STR(’349’) = NO;
256 STR(’41’) = NO; STR(’42’) = NO; STR(’421’) = NO; STR(’422’) = NO; STR(’423’) = NO; STR(’
424’) = NO; STR(’425’) = NO; STR(’426’) = NO;
257 STR(’427’) = NO; STR(’428’) = NO; STR(’429’) = NO;
258 STR(’51’) = NO; STR(’52’) = NO; STR(’521’) = NO; STR(’522’) = NO; STR(’523’) = NO; STR(’
524’) = NO; STR(’525’) = NO; STR(’526’) = NO;
259 STR(’527’) = NO; STR(’528’) = NO; STR(’529’) = NO; TU(’T2’) = NO; TU(’T3’) = NO; spl(’s3
1’) = no; spl(’s41’)=no; spl(’s51’)=no; spl(’sa21’)=no; spl(’sa31’)=no;
![Page 8: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/8.jpg)
model.lst Fri Aug 20 07:36:53 2021 8
260 );
261
262 if ((card(t) eq 1 and card(p) eq 3),
263 STR(’4’) = NO; STR(’5’) = NO;
264 STR(’124’) = NO; STR(’125’) = NO; STR(’127’) = NO; STR(’128’) = NO; STR(’144’) = NO; STR
(’145’) = NO; STR(’147’) = NO;STR(’148’) = NO;STR(’224’) = NO; STR(’225’) = NO; STR(’227’) =
NO; STR(’228’) = NO; STR(’244’) = NO; STR(’241’) = NO; STR(’242’) =
NO; STR(’243’) = NO; STR(’246’) = NO; STR(’245’) = NO; STR(’247’) = NO; STR(’248’) =
NO; STR(’249’) = NO;
265 PU(’P4’) = NO; PU(’P5’) = NO; TU(’T3’) = NO; TU(’T2’) = NO;
266 STR(’324’) = NO; STR(’325’) = NO; STR(’327’) = NO; STR(’328’) = NO; STR(’344’) = NO; S
TR(’345’) = NO; STR(’348’) = NO; STR(’341’) = NO; STR(’342’) = NO; STR(’343’) = NO; STR(’346’)
= NO; STR(’347’) = NO; STR(’349’) = NO;
![Page 9: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/9.jpg)
model.lst Fri Aug 20 07:36:53 2021 9
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 6
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
267 STR(’23’) = NO; STR(’24’) = NO;
268 STR(’33’) = NO; STR(’34’) = NO;
269 STR(’41’) = NO; STR(’42’) = NO; STR(’421’) = NO; STR(’422’) = NO; STR(’423’) = NO; STR(
’424’) = NO; STR(’425’) = NO; STR(’426’) = NO;
270 STR(’427’) = NO; STR(’428’) = NO; STR(’429’) = NO;
271 STR(’51’) = NO; STR(’52’) = NO; STR(’521’) = NO; STR(’522’) = NO; STR(’523’) = NO; STR(’
524’) = NO; STR(’525’) = NO; STR(’526’) = NO;
272 STR(’527’) = NO; STR(’528’) = NO; STR(’529’) = NO;
273
274 );
275
276 if ((card(t) eq 2 and card(p) eq 3),
277 STR(’4’) = NO; STR(’5’) = NO;
278 STR(’124’) = NO; STR(’125’) = NO; STR(’128’) = NO; STR(’144’) = NO; STR(’145’) = NO; STR
(’148’) = NO; STR(’224’) = NO; STR(’225’) = NO; STR(’228’) = NO; STR(’244’) = NO; STR(’245’) =
NO; STR(’248’) = NO;
279 PU(’P4’) = NO; PU(’P5’) = NO; TU(’T3’) = NO;
280 STR(’324’) = NO; STR(’325’) = NO; STR(’328’) = NO; STR(’344’) = NO; STR(’345’) = NO; S
TR(’348’) = NO; STR(’341’) = NO; STR(’342’) = NO; STR(’343’) = NO; STR(’346’) = NO; STR(’347’)
= NO; STR(’349’) = NO;
281 STR(’33’) = NO; STR(’34’) = NO;
282 STR(’41’) = NO; STR(’42’) = NO; STR(’421’) = NO; STR(’422’) = NO; STR(’423’) = NO; STR(
’424’) = NO; STR(’425’) = NO; STR(’426’) = NO;
283 STR(’427’) = NO; STR(’428’) = NO; STR(’429’) = NO;
284 STR(’51’) = NO; STR(’52’) = NO; STR(’521’) = NO; STR(’522’) = NO; STR(’523’) = NO; STR(’
524’) = NO; STR(’525’) = NO; STR(’526’) = NO;
285 STR(’527’) = NO; STR(’528’) = NO; STR(’529’) = NO;
286
287 );
288
289 if ((card(t) eq 3 and card(p) eq 4),
290 STR(’5’) = NO; STR(’125’) = NO; STR(’145’) = NO; STR(’225’) = NO; STR(’245’) = NO;
291 PU(’P5’) = NO; STR(’325’) = NO; STR(’345’) = NO; STR(’425’) = NO; STR(’51’) = NO; STR(’5
2’) = NO; STR(’521’) = NO; STR(’522’) = NO; STR(’523’) = NO; STR(’524’) = NO; STR(’525’) = NO;
STR(’526’) = NO;
292 STR(’527’) = NO; STR(’528’) = NO; STR(’529’) = NO;
293 );
294
295 if ((card(t) eq 1 and card(p) eq 4),
296 STR(’5’) = NO; STR(’125’) = NO; STR(’127’) = NO; STR(’128’) = NO; STR(’145’) = NO; STR(’
148’) = NO; STR(’225’) = NO; STR(’227’) = NO; STR(’228’) = NO; STR(’241’) = NO; STR(’242’) = N
O;STR(’243’) = NO; STR(’244’) = NO;
297 STR(’245’) = NO; STR(’246’) = NO; STR(’247’) = NO; STR(’248’) = NO; STR(’249’) = NO;
298 PU(’P5’) = NO; STR(’33’) = NO; STR(’34’) = NO; STR(’325’) = NO; STR(’327’) = NO; STR(’32
8’) = NO; STR(’341’) = NO; STR(’342’) = NO; STR(’343’) = NO; STR(’344’) = NO; STR(’345’) = NO;
STR(’346’) = NO; STR(’347’) = NO; STR(’348’) = NO; STR(’349’) = NO
;
299 STR(’425’) = NO; STR(’427’) = NO; STR(’428’) = NO;
300 STR(’51’) = NO; STR(’52’) = NO; STR(’521’) = NO; STR(’522’) = NO; STR(’523’) = NO; STR(’
524’) = NO; STR(’525’) = NO;STR(’526’) = NO;
301 STR(’527’) = NO; STR(’528’) = NO; STR(’529’) = NO; TU(’T2’)= NO; TU(’T3’)= NO;
302
303 );
304 if ((card(t) eq 2 and card(p) eq 5),
305 STR(’128’) = NO; STR(’148’) = NO; STR(’228’) = NO; STR(’248’) = NO; STR(’33’) = NO; ST
R(’34’) = NO; STR(’328’) = NO; STR(’341’) = NO; STR(’342’) = NO; STR(’343’) = NO; STR(’344’) =
![Page 10: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/10.jpg)
model.lst Fri Aug 20 07:36:53 2021 10
NO; STR(’345’) = NO; STR(’346’) = NO; STR(’347’) = NO; STR(’348’)
= NO; STR(’349’) = NO; STR(’428’) = NO; STR(’528’) = NO; TU(’T3’)= NO;
306 );
307
308 if ((card(t) eq 1 and card(p) eq 5),
309 STR(’127’) = NO; STR(’128’) = NO; STR(’147’) = NO; STR(’148’) = NO;
310 STR(’227’) = NO; STR(’228’) = NO; STR(’247’) = NO; STR(’248’) = NO;
311 STR(’23’) = NO; STR(’24’) = NO;
312 STR(’33’) = NO; STR(’34’) = NO;
313 STR(’327’) = NO; STR(’328’) = NO;
314 STR(’241’) = NO; STR(’242’) = NO; STR(’243’) = NO; STR(’244’) = NO; STR(’245’) = NO; STR
(’246’) = NO; STR(’247’) = NO; STR(’248’) = NO; STR(’249’) = NO;
315 STR(’341’) = NO; STR(’342’) = NO; STR(’343’) = NO; STR(’344’) = NO; STR(’345’) = NO; STR
(’346’) = NO; STR(’347’) = NO; STR(’348’) = NO; STR(’349’) = NO;
316 STR(’427’) = NO; STR(’428’) = NO;
317 STR(’527’) = NO; STR(’528’) = NO; TU(’T2’)= NO; TU(’T3’)= NO;
![Page 11: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/11.jpg)
model.lst Fri Aug 20 07:36:53 2021 11
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 7
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
318 );
319
320 ***stream restrictions for model
321 if ((card(t) eq 3 and card(p) eq 3),
322 STR(’4’) = NO; STR(’5’) = NO;
323 STR(’124’) = NO; STR(’125’) = NO; STR(’144’) = NO; STR(’145’) = NO; STR(’224’) = NO; STR
(’225’) = NO; STR(’244’) = NO; STR(’245’) = NO; PU(’P4’) = NO; PU(’P5’) = NO;
324 STR(’324’) = NO; STR(’325’) = NO;STR(’344’) = NO; STR(’345’) = NO;
325 STR(’41’) = NO; STR(’42’) = NO; STR(’421’) = NO; STR(’422’) = NO; STR(’423’) = NO; STR(
’424’) = NO; STR(’425’) = NO; STR(’426’) = NO;
326 STR(’427’) = NO; STR(’428’) = NO; STR(’429’) = NO;
327 STR(’51’) = NO; STR(’52’) = NO; STR(’521’) = NO; STR(’522’) = NO; STR(’523’) = NO; STR(’
524’) = NO; STR(’525’) = NO; STR(’526’) = NO;
328 STR(’527’) = NO; STR(’528’) = NO; STR(’529’) = NO;
329
330 );
331 ***stream restrictions for model
332 if ((card(t) eq 2 and card(p) eq 4),
333 STR(’5’) = NO; STR(’125’) = NO; STR(’128’) = NO; STR(’145’) = NO; STR(’148’) = NO;
334 STR(’225’) = NO; STR(’228’) = NO; STR(’245’) = NO; STR(’248’) = NO;
335 PU(’P5’) = NO;
336 STR(’33’) = NO; STR(’34’) = NO;
337 STR(’325’) = NO; STR(’328’) = NO;
338 STR(’341’) = NO; STR(’342’) = NO; STR(’343’) = NO; STR(’344’) = NO; STR(’345’) = NO; STR
(’346’) = NO; STR(’347’) = NO; STR(’348’) = NO; STR(’349’) = NO;
339 STR(’425’) = NO; STR(’428’) = NO;
340 STR(’51’) = NO; STR(’52’) = NO; STR(’521’) = NO; STR(’522’) = NO; STR(’523’) = NO; STR(’
524’) = NO; STR(’525’) = NO;STR(’526’) = NO;
341 STR(’527’) = NO; STR(’528’) = NO; STR(’529’) = NO; TU(’T3’)= NO;
342 );
343
344
345 * Shared Variable Bounds
346 F.fx(’11’) = MAX_P(’P1’);
347 F.fx(’21’) = MAX_P(’P2’);
348 F.fx(’31’) = MAX_P(’P3’);
349 F.fx(’41’) = MAX_P(’P4’);
350 F.fx(’51’) = MAX_P(’P5’);
351
352 F.fx(’12’) = MAX_P(’P1’);
353 F.fx(’22’) = MAX_P(’P2’);
354 F.fx(’32’) = MAX_P(’P3’);
355 F.fx(’42’) = MAX_P(’P4’);
356 F.fx(’52’) = MAX_P(’P5’);
357
358 F.up(’IN’) = SUM(PU,MAX_P(PU));
359 F.up(’1’) = MAX_P(’P1’);
360 F.up(’2’) = MAX_P(’P2’);
361 F.up(’3’) = MAX_P(’P3’);
362 F.up(’4’) = MAX_P(’P4’);
363 F.up(’5’) = MAX_P(’P5’);
364
365 F.up(’121’) = 0;
366 F.up(’122’) = MAX_P(’P1’);
367 F.up(’123’) = MAX_P(’P1’);
368 F.up(’124’) = MAX_P(’P1’);
![Page 12: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/12.jpg)
model.lst Fri Aug 20 07:36:53 2021 12
369 F.up(’125’) = MAX_P(’P1’);
370 F.up(’126’) = MAX_P(’P1’);
![Page 13: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/13.jpg)
model.lst Fri Aug 20 07:36:53 2021 13
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 8
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
371 F.up(’127’) = MAX_P(’P1’);
372 F.up(’128’) = MAX_P(’P1’);
373 F.up(’129’) = MAX_P(’P1’);
374
375 F.up(’221’) = MAX_P(’P1’);
376 F.up(’222’) = 0;
377 F.up(’223’) = MAX_P(’P2’);
378 F.up(’224’) = MAX_P(’P2’);
379 F.up(’225’) = MAX_P(’P2’);
380 F.up(’226’) = MAX_P(’P2’);
381 F.up(’227’) = MAX_P(’P2’);
382 F.up(’228’) = MAX_P(’P2’);
383 F.up(’229’) = MAX_P(’P2’);
384
385 F.up(’321’) = MAX_P(’P1’);
386 F.up(’322’) = MAX_P(’P2’);
387 F.up(’323’) = 0;
388 F.up(’324’) = MAX_P(’P3’);
389 F.up(’325’) = MAX_P(’P3’);
390 F.up(’326’) = MAX_P(’P3’);
391 F.up(’327’) = MAX_P(’P3’);
392 F.up(’328’) = MAX_P(’P3’);
393 F.up(’329’) = MAX_P(’P3’);
394
395 F.up(’421’) = MAX_P(’P1’);
396 F.up(’422’) = MAX_P(’P2’);
397 F.up(’423’) = MAX_P(’P3’);
398 F.up(’424’) = 0;
399 F.up(’425’) = MAX_P(’P4’);
400 F.up(’426’) = MAX_P(’P4’);
401 F.up(’427’) = MAX_P(’P4’);
402 F.up(’428’) = MAX_P(’P4’);
403 F.up(’429’) = MAX_P(’P4’);
404
405 F.up(’521’) = MAX_P(’P1’);
406 F.up(’522’) = MAX_P(’P2’);
407 F.up(’523’) = MAX_P(’P3’);
408 F.up(’524’) = MAX_P(’P4’);
409 F.up(’525’) = 0;
410 F.up(’526’) = MAX_P(’P5’);
411 F.up(’527’) = MAX_P(’P5’);
412 F.up(’528’) = MAX_P(’P5’);
413 F.up(’529’) = MAX_P(’P5’);
414
415 *IN TREATMENTS
416 F.up(’13’) = SUM(PU,MAX_P(PU));
417 F.up(’23’) = SUM(PU,MAX_P(PU));
418 F.up(’33’) = SUM(PU,MAX_P(PU));
419
420 *OUT TREATMENTS
421 F.up(’14’) = SUM(PU,MAX_P(PU));
422 F.up(’24’) = SUM(PU,MAX_P(PU));
423 F.up(’34’) = SUM(PU,MAX_P(PU));
![Page 14: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/14.jpg)
model.lst Fri Aug 20 07:36:53 2021 14
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 9
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
424
425 F.up(’141’) = MAX_P(’P1’);
426 F.up(’142’) = MAX_P(’P2’);
427 F.up(’143’) = MAX_P(’P3’);
428 F.up(’144’) = MAX_P(’P4’);
429 F.up(’145’) = MAX_P(’P5’);
430 F.up(’146’) = 0;
431 F.up(’147’) = SUM(PU,MAX_P(PU));
432 F.up(’148’) = SUM(PU,MAX_P(PU));
433 F.up(’149’) = SUM(PU,MAX_P(PU));
434
435 F.up(’241’) = MAX_P(’P1’);
436 F.up(’242’) = MAX_P(’P2’);
437 F.up(’243’) = MAX_P(’P3’);
438 F.up(’244’) = MAX_P(’P4’);
439 F.up(’245’) = MAX_P(’P5’);
440 F.up(’246’) = SUM(PU,MAX_P(PU));
441 F.up(’247’) = 0;
442 F.up(’248’) = SUM(PU,MAX_P(PU));
443 F.up(’249’) = SUM(PU,MAX_P(PU));
444
445 F.up(’341’) = MAX_P(’P1’);
446 F.up(’342’) = MAX_P(’P2’);
447 F.up(’343’) = MAX_P(’P3’);
448 F.up(’344’) = MAX_P(’P4’);
449 F.up(’345’) = MAX_P(’P5’);
450 F.up(’346’) = SUM(PU,MAX_P(PU));
451 F.up(’347’) = SUM(PU,MAX_P(PU));
452 F.up(’348’) = 0;
453 F.up(’349’) = SUM(PU,MAX_P(PU));
454
455 F.up(’FP’) = SUM(PU,MAX_P(PU));
456
457 F.lo(’IN’) = SMIN(PU,MAX_P(PU));
458 F.lo(’FP’) = SMIN(PU,MAX_P(PU));
459
460 C.up(’11’,COMP) = Cmax(’P1’,COMP);
461 C.up(’21’,COMP) = Cmax(’P2’,COMP);
462 C.up(’31’,COMP) = Cmax(’P3’,COMP);
463 C.up(’41’,COMP) = Cmax(’P4’,COMP);
464 C.up(’51’,COMP) = Cmax(’P5’,COMP);
465
466 C.lo(’11’,COMP) = 0;
467 C.lo(’21’,COMP) = 0;
468 C.lo(’31’,COMP) = 0;
469 C.lo(’41’,COMP) = 0;
470 C.lo(’51’,COMP) = 0;
471
472 C.fx(’IN’,COMP) = 0;
473 C.fx(’1’,COMP) = 0;
474 C.fx(’2’,COMP) = 0;
475 C.fx(’3’,COMP) = 0;
476 C.fx(’4’,COMP) = 0;
![Page 15: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/15.jpg)
model.lst Fri Aug 20 07:36:53 2021 15
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 10
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
477 C.fx(’5’,COMP) = 0;
478
479 C.up(’FP’,COMP) = Cout;
480
481 C.up(’12’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
482 C.up(’22’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
483
484 C.lo(’12’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
485 C.lo(’22’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
486
487 C.up(’121’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
488 C.lo(’121’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
489 C.up(’122’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
490 C.lo(’122’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
491 C.up(’127’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
492 C.lo(’127’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
493 C.up(’126’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
494 C.lo(’126’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
495 C.up(’129’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
496 C.lo(’129’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
497
498 C.up(’221’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
499 C.lo(’221’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
500 C.up(’222’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
501 C.lo(’222’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
502 C.up(’227’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
503 C.lo(’227’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
504 C.up(’226’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
505 C.lo(’226’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
506 C.up(’229’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
507 C.lo(’229’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
508
509 C.up(’13’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
510 C.up(’23’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
511
512 C.up(’14’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
513 C.up(’24’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
514
515 C.up(’141’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
516 C.up(’142’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
517 C.up(’146’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
518 C.up(’147’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
519 C.up(’149’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
520
521
522 C.up(’241’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
523 C.up(’242’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
524 C.up(’246’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
525 C.up(’247’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
526 C.up(’249’,comp) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
527
528
529
![Page 16: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/16.jpg)
model.lst Fri Aug 20 07:36:53 2021 16
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 11
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
530
531 ****************bounds p3t3
532 if ((card(t) eq 1 and card(p) eq 3),
533 C.up(’32’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
534
535 C.fx(’IN’,COMP) = 0;
536 C.fx(’1’,COMP) = 0;
537 C.fx(’2’,COMP) = 0;
538 C.fx(’3’,COMP) = 0;
539 C.fx(’4’,COMP) = 0;
540 C.fx(’5’,COMP) = 0;
541
542 C.up(’123’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
543 C.lo(’123’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
544
545 C.up(’223’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
546 C.lo(’223’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
547
548 C.up(’321’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
549 C.up(’322’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
550 C.up(’323’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
551 C.up(’326’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
552 C.up(’327’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
553 C.up(’329’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
554
555 C.up(’143’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
556
557 C.lo(’32’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
558
559 C.lo(’321’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
560 C.lo(’322’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
561 C.lo(’323’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
562 C.lo(’326’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
563 C.lo(’327’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
564 C.lo(’329’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
565
566 );
567
568 if ((card(t) eq 2 and card(p) eq 3),
569 C.up(’32’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
570
571 C.fx(’IN’,COMP) = 0;
572 C.fx(’1’,COMP) = 0;
573 C.fx(’2’,COMP) = 0;
574 C.fx(’3’,COMP) = 0;
575 C.fx(’4’,COMP) = 0;
576 C.fx(’5’,COMP) = 0;
577
578 C.up(’123’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
579 C.lo(’123’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
580
581 C.up(’223’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
582 C.lo(’223’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
![Page 17: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/17.jpg)
model.lst Fri Aug 20 07:36:53 2021 17
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 12
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
583
584 C.up(’321’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
585 C.up(’322’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
586 C.up(’323’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
587 C.up(’326’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
588 C.up(’327’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
589 C.up(’329’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
590
591 C.up(’143’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
592
593 C.up(’243’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
594
595 C.lo(’32’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
596
597 C.lo(’321’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
598 C.lo(’322’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
599 C.lo(’323’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
600 C.lo(’326’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
601 C.lo(’327’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
602 C.lo(’329’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
603
604 );
605
606 if ((card(t) eq 1 and card(p) eq 4),
607
608 C.up(’32’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
609 C.up(’42’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
610
611 C.up(’123’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
612 C.lo(’123’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
613 C.up(’124’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
614 C.lo(’124’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
615
616 C.up(’223’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
617 C.up(’224’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
618
619 C.up(’321’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
620 C.up(’322’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
621 C.up(’323’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
622 C.up(’324’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
623 C.up(’326’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
624 C.up(’329’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
625
626 C.up(’421’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
627 C.up(’422’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
628 C.up(’423’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
629 C.up(’424’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
630 C.up(’426’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
631 C.up(’429’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
632
633 C.up(’143’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
634 C.up(’144’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
635
![Page 18: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/18.jpg)
model.lst Fri Aug 20 07:36:53 2021 18
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 13
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
636 C.up(’243’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
637 C.up(’244’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
638
639 C.lo(’32’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
640 C.lo(’42’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
641
642 C.lo(’223’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
643 C.lo(’224’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
644
645 C.lo(’321’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
646 C.lo(’322’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
647 C.lo(’323’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
648 C.lo(’324’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
649 C.lo(’326’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
650 C.lo(’329’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
651
652 C.lo(’421’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
653 C.lo(’422’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
654 C.lo(’423’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
655 C.lo(’424’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
656 C.lo(’426’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
657 C.lo(’429’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
658
659 );
660
661 if ((card(t) eq 3 and card(p) eq 4),
662
663 C.up(’32’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
664 C.up(’42’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
665
666 C.up(’123’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
667 C.lo(’123’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
668 C.up(’124’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
669 C.lo(’124’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
670 C.up(’128’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
671 C.lo(’128’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
672
673 C.up(’223’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
674 C.lo(’223’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
675 C.up(’224’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
676 C.lo(’224’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
677 C.up(’228’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
678 C.lo(’228’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
679
680 C.up(’321’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
681 C.up(’322’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
682 C.up(’323’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
683 C.up(’324’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
684 C.up(’326’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
685 C.up(’327’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
686 C.up(’328’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
687 C.up(’329’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
688
![Page 19: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/19.jpg)
model.lst Fri Aug 20 07:36:53 2021 19
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 14
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
689 C.up(’421’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
690 C.up(’422’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
691 C.up(’423’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
692 C.up(’424’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
693 C.up(’426’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
694 C.up(’427’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
695 C.up(’428’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
696 C.up(’429’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
697
698 C.up(’33’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
699 C.up(’34’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
700
701 C.up(’143’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
702 C.up(’144’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
703 C.up(’148’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
704
705 C.up(’243’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
706 C.up(’244’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
707 C.up(’248’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
708
709 C.up(’341’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
710 C.up(’342’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
711 C.up(’343’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
712 C.up(’344’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
713 C.up(’346’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
714 C.up(’347’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
715 C.up(’348’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
716 C.up(’349’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
717
718 C.lo(’32’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
719 C.lo(’42’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
720
721 C.lo(’321’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
722 C.lo(’322’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
723 C.lo(’323’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
724 C.lo(’324’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
725 C.lo(’326’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
726 C.lo(’327’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
727 C.lo(’328’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
728 C.lo(’329’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
729
730 C.lo(’421’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
731 C.lo(’422’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
732 C.lo(’423’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
733 C.lo(’424’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
734 C.lo(’426’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
735 C.lo(’427’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
736 C.lo(’428’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
737 C.lo(’429’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
738
739 );
740
741
![Page 20: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/20.jpg)
model.lst Fri Aug 20 07:36:53 2021 20
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 15
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
742 if ((card(t) eq 3 and card(p) eq 3),
743 C.up(’32’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
744
745 C.fx(’IN’,COMP) = 0;
746 C.fx(’1’,COMP) = 0;
747 C.fx(’2’,COMP) = 0;
748 C.fx(’3’,COMP) = 0;
749 C.fx(’4’,COMP) = 0;
750 C.fx(’5’,COMP) = 0;
751
752 C.up(’123’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
753 C.lo(’123’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
754 C.up(’128’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
755 C.lo(’128’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
756
757 C.up(’223’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
758 C.lo(’223’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
759 C.up(’228’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
760 C.lo(’228’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
761
762 C.up(’321’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
763 C.up(’322’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
764 C.up(’323’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
765 C.up(’326’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
766 C.up(’327’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
767 C.up(’328’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
768 C.up(’329’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
769
770 C.up(’33’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
771 C.up(’34’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
772
773 C.up(’143’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
774 C.up(’148’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
775
776 C.up(’243’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
777 C.up(’248’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
778
779 C.up(’341’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
780 C.up(’342’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
781 C.up(’343’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
782 C.up(’346’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
783 C.up(’347’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
784 C.up(’348’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
785 C.up(’349’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
786
787 C.lo(’32’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
788
789 C.lo(’321’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
790 C.lo(’322’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
791 C.lo(’323’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
792 C.lo(’326’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
793 C.lo(’327’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
794 C.lo(’328’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
![Page 21: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/21.jpg)
model.lst Fri Aug 20 07:36:53 2021 21
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 16
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
795 C.lo(’329’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
796
797 );
798
799 ****************bounds p4t2
800 if ((card(t) eq 2 and card(p) eq 4),
801
802 C.up(’32’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
803 C.up(’42’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
804
805 C.up(’123’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
806 C.lo(’123’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
807 C.up(’124’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
808 C.lo(’124’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
809
810 C.up(’223’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
811 C.up(’224’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
812
813 C.up(’321’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
814 C.up(’322’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
815 C.up(’323’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
816 C.up(’324’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
817 C.up(’326’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
818 C.up(’327’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
819 C.up(’329’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
820
821 C.up(’421’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
822 C.up(’422’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
823 C.up(’423’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
824 C.up(’424’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
825 C.up(’426’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
826 C.up(’427’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
827 C.up(’429’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
828
829 C.up(’143’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
830 C.up(’144’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
831
832 C.up(’243’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
833 C.up(’244’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
834
835 C.lo(’32’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
836 C.lo(’42’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
837
838 C.lo(’223’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
839 C.lo(’224’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
840
841 C.lo(’321’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
842 C.lo(’322’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
843 C.lo(’323’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
844 C.lo(’324’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
845 C.lo(’326’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
846 C.lo(’327’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
847 C.lo(’329’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
![Page 22: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/22.jpg)
model.lst Fri Aug 20 07:36:53 2021 22
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 17
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
848
849 C.lo(’421’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
850 C.lo(’422’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
851 C.lo(’423’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
852 C.lo(’424’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
853 C.lo(’426’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
854 C.lo(’427’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
855 C.lo(’429’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
856
857 );
858
859 ****************bounds p5t3
860 if ((card(t) eq 1 and card(p) eq 5),
861
862 C.up(’32’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
863 C.up(’42’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
864 C.up(’52’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
865
866 C.up(’123’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
867 C.lo(’123’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
868 C.up(’124’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
869 C.lo(’124’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
870 C.up(’125’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
871 C.lo(’125’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
872
873 C.up(’223’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
874 C.up(’224’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
875 C.up(’225’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
876
877 C.up(’321’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
878 C.up(’322’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
879 C.up(’323’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
880 C.up(’324’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
881 C.up(’325’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
882 C.up(’326’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
883 C.up(’329’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
884
885 C.up(’421’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
886 C.up(’422’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
887 C.up(’423’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
888 C.up(’424’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
889 C.up(’425’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
890 C.up(’426’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
891 C.up(’429’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
892
893 C.up(’521’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
894 C.up(’522’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
895 C.up(’523’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
896 C.up(’524’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
897 C.up(’525’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
898 C.up(’526’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
899 C.up(’529’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
900
![Page 23: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/23.jpg)
model.lst Fri Aug 20 07:36:53 2021 23
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 18
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
901 C.up(’143’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
902 C.up(’144’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
903 C.up(’145’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
904
905 C.up(’243’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
906 C.up(’244’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
907 C.up(’245’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
908
909 C.lo(’32’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
910 C.lo(’42’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
911 C.lo(’52’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
912
913 C.lo(’223’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
914 C.lo(’224’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
915 C.lo(’225’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
916
917 C.lo(’321’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
918 C.lo(’322’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
919 C.lo(’323’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
920 C.lo(’324’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
921 C.lo(’325’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
922 C.lo(’326’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
923 C.lo(’329’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
924
925 C.lo(’421’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
926 C.lo(’422’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
927 C.lo(’423’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
928 C.lo(’424’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
929 C.lo(’425’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
930 C.lo(’426’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
931 C.lo(’429’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
932
933 C.lo(’521’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
934 C.lo(’522’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
935 C.lo(’523’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
936 C.lo(’524’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
937 C.lo(’525’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
938 C.lo(’526’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
939 C.lo(’529’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
940
941 );
942
943 if ((card(t) eq 2 and card(p) eq 5),
944
945 C.up(’32’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
946 C.up(’42’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
947 C.up(’52’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
948
949 C.up(’123’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
950 C.lo(’123’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
951 C.up(’124’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
952 C.lo(’124’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
953 C.up(’125’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
![Page 24: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/24.jpg)
model.lst Fri Aug 20 07:36:53 2021 24
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 19
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
954 C.lo(’125’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
955
956 C.up(’223’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
957 C.up(’224’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
958 C.up(’225’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
959
960 C.up(’321’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
961 C.up(’322’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
962 C.up(’323’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
963 C.up(’324’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
964 C.up(’325’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
965 C.up(’326’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
966 C.up(’327’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
967 C.up(’329’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
968
969 C.up(’421’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
970 C.up(’422’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
971 C.up(’423’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
972 C.up(’424’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
973 C.up(’425’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
974 C.up(’426’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
975 C.up(’427’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
976 C.up(’429’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
977
978 C.up(’521’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
979 C.up(’522’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
980 C.up(’523’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
981 C.up(’524’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
982 C.up(’525’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
983 C.up(’526’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
984 C.up(’527’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
985 C.up(’529’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
986
987 C.up(’143’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
988 C.up(’144’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
989 C.up(’145’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
990
991 C.up(’243’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
992 C.up(’244’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
993 C.up(’245’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
994
995 C.lo(’32’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
996 C.lo(’42’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
997 C.lo(’52’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
998
999 C.lo(’223’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
1000 C.lo(’224’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
1001 C.lo(’225’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
1002
1003 C.lo(’321’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1004 C.lo(’322’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1005 C.lo(’323’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1006 C.lo(’324’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
![Page 25: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/25.jpg)
model.lst Fri Aug 20 07:36:53 2021 25
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 20
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1007 C.lo(’325’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1008 C.lo(’326’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1009 C.lo(’327’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1010 C.lo(’329’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1011
1012 C.lo(’421’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1013 C.lo(’422’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1014 C.lo(’423’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1015 C.lo(’424’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1016 C.lo(’425’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1017 C.lo(’426’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1018 C.lo(’427’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1019 C.lo(’429’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1020
1021 C.lo(’521’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1022 C.lo(’522’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1023 C.lo(’523’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1024 C.lo(’524’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1025 C.lo(’525’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1026 C.lo(’526’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1027 C.lo(’527’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1028 C.lo(’529’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1029
1030 );
1031
1032
1033 if ((card(t) eq 3 and card(p) eq 5),
1034
1035 C.up(’32’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
1036 C.up(’42’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
1037 C.up(’52’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
1038
1039 C.up(’123’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
1040 C.lo(’123’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
1041 C.up(’124’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
1042 C.lo(’124’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
1043 C.up(’125’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
1044 C.lo(’125’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
1045 C.up(’128’,COMP) = Cmax(’P1’,COMP) + L(’P1’,COMP)*FAC/MAX_P(’P1’);
1046 C.lo(’128’,COMP) = L(’P1’,COMP)*FAC/MAX_P(’P1’);
1047
1048 C.up(’223’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
1049 C.up(’224’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
1050 C.up(’225’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
1051 C.up(’228’,COMP) = Cmax(’P2’,COMP) + L(’P2’,COMP)*FAC/MAX_P(’P2’);
1052
1053 C.up(’321’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
1054 C.up(’322’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
1055 C.up(’323’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
1056 C.up(’324’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
1057 C.up(’325’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
1058 C.up(’326’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
1059 C.up(’327’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
![Page 26: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/26.jpg)
model.lst Fri Aug 20 07:36:53 2021 26
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 21
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1060 C.up(’328’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
1061 C.up(’329’,COMP) = Cmax(’P3’,COMP) + L(’P3’,COMP)*FAC/MAX_P(’P3’);
1062
1063 C.up(’421’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
1064 C.up(’422’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
1065 C.up(’423’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
1066 C.up(’424’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
1067 C.up(’425’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
1068 C.up(’426’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
1069 C.up(’427’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
1070 C.up(’428’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
1071 C.up(’429’,COMP) = Cmax(’P4’,COMP) + L(’P4’,COMP)*FAC/MAX_P(’P4’);
1072
1073 C.up(’521’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
1074 C.up(’522’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
1075 C.up(’523’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
1076 C.up(’524’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
1077 C.up(’525’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
1078 C.up(’526’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
1079 C.up(’527’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
1080 C.up(’528’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
1081 C.up(’529’,COMP) = Cmax(’P5’,COMP) + L(’P5’,COMP)*FAC/MAX_P(’P5’);
1082
1083 C.up(’33’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1084 C.up(’34’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1085
1086 C.up(’143’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1087 C.up(’144’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1088 C.up(’145’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1089 C.up(’148’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1090
1091 C.up(’243’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1092 C.up(’244’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1093 C.up(’245’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1094 C.up(’248’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1095
1096 C.up(’341’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1097 C.up(’342’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1098 C.up(’343’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1099 C.up(’344’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1100 C.up(’345’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1101 C.up(’346’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1102 C.up(’347’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1103 C.up(’348’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1104 C.up(’349’,COMP) = SMAX(PU,(Cmax(PU,COMP) + L(PU,COMP)*FAC/MAX_P(PU)));
1105
1106 C.lo(’32’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1107 C.lo(’42’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1108 C.lo(’52’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1109
1110 C.lo(’223’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
1111 C.lo(’224’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
1112 C.lo(’225’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
![Page 27: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/27.jpg)
model.lst Fri Aug 20 07:36:53 2021 27
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 22
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1113 C.lo(’228’,COMP) = L(’P2’,COMP)*FAC/MAX_P(’P2’);
1114
1115 C.lo(’321’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1116 C.lo(’322’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1117 C.lo(’323’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1118 C.lo(’324’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1119 C.lo(’325’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1120 C.lo(’326’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1121 C.lo(’327’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1122 C.lo(’328’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1123 C.lo(’329’,COMP) = L(’P3’,COMP)*FAC/MAX_P(’P3’);
1124
1125 C.lo(’421’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1126 C.lo(’422’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1127 C.lo(’423’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1128 C.lo(’424’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1129 C.lo(’425’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1130 C.lo(’426’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1131 C.lo(’427’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1132 C.lo(’428’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1133 C.lo(’429’,COMP) = L(’P4’,COMP)*FAC/MAX_P(’P4’);
1134
1135 C.lo(’521’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1136 C.lo(’522’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1137 C.lo(’523’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1138 C.lo(’524’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1139 C.lo(’525’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1140 C.lo(’526’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1141 C.lo(’527’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1142 C.lo(’528’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1143 C.lo(’529’,COMP) = L(’P5’,COMP)*FAC/MAX_P(’P5’);
1144
1145 );
1146
1147
1148 ** OBJECTIVE FUNCTION
1149 VARIABLES
1150 COST ’total flow going through the units [ton/h]’;
1151 EQUATIONS
1152 OBJ ’objective function NLP’;
1153
1154 F.l(STR) = F.up(STR);
1155 C.l(STR,COMP) = C.up(STR,COMP);
1156
1157
1158 OBJ.. COST =E= HOURS*F(’IN’) + AR*(SUM((TU,STR) $ITU(TU,STR),ICT(TU)*F(STR)**EXP(TU)))+
HOURS*(SUM((TU,STR1) $ITU(TU,STR1),OCT(TU)*F(STR1)));
1159
1160
1163
1164
1165 OPTION LIMROW=0;
1166 OPTION LIMCOL=0;
1167 option NLP = BARON;
![Page 28: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/28.jpg)
model.lst Fri Aug 20 07:36:53 2021 28
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 23
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1168 OPTION optcr = 0.03;
1169 OPTION RESLIM = 40000;
1170
1171 MODEL water /ALL/;
1172
1173 solve water USING NLP MINIMIZING COST;
1174
1175 *DISPLAY C.L, C.UP, C.LO, F.UP, str;
INCLUDE /var/www/html/interfaces/cgi-bin/waternet/sumres.inc
1177 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
1178
1179
1180
1181 * sumres.inc file for the creation of the Summary of Results and
1182
1183 * data for the graphic display of solution.
1184
1185
1186
1187 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
1188
1189
1190
1191 FIlE RES1 /"../../waternet/output.html"/
1192
1193 *print OUTF ’file res100 /"../../water/output.html"/ ’;
1194
1195 PUT RES1 "<html><head><title>OUTPUT</title>"/;
1196
1197 PUT RES1 ’<style type="text/css">’/;
1198
1199 PUT RES1 " HR {"/;
1200
1201 PUT RES1 " border : thick outset #800000;"/;
1202
1203 PUT RES1 " font-color: #800000;"/;
1204
1205 PUT RES1 " }"/;
1206
1207
1208
1209 PUT RES1 " TD.ref {"/;
1210
1211 PUT RES1 " border : thick outset #FFFF130;"/;
1212
1213 PUT RES1 " background-color : #C0C0C0;"/;
1214
1215 PUT RES1 " padding-left : 1ex;"/;
1216
1217 PUT RES1 " width : 50%;"/;
1218
1219 PUT RES1 " font-size : small;"/;
1220
![Page 29: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/29.jpg)
model.lst Fri Aug 20 07:36:53 2021 29
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 24
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1221 PUT RES1 " font-color: #800000;"/;
1222
1223 PUT RES1 " padding-top : 6px;"/;
1224
1225 PUT RES1 " padding-right : 6px;"/;
1226
1227 PUT RES1 " padding-bottom : 6px;"/;
1228
1229 PUT RES1 " padding-left : 6px;"/;
1230
1231 PUT RES1 " text-align : 1em;"/;
1232
1233 PUT RES1 " vertical-align : top;"/;
1234
1235 PUT RES1 " font-weight : bold;"/;
1236
1237 PUT RES1 " }"/;
1238
1239 PUT RES1 "</style>"/;
1240
1241 PUT RES1 "</head><body alink=#800000 link=#800000>"/;
1242
1243 PUT RES1 "<hr> <b>Waternet Interface</b></hr><hr></hr>"//;
1244
1245 PUT RES1 "<h4> Optimal Design of Integrated Water Systems</h4><br>"///;
1246
1247 PARAMETER IND,a;
1248 a=1;
1249
1250 PUT RES1 "<table align=center border =4 bordercolor=#800000><th colspan =4 bgcolor=#C0C
0C0>** ** ** DATA ** ** ** "///;
1251
1252 PUT RES1 "<tr><br><th <b>Number of Process Units : "card(p):2:0 " </b>"/;
1253
1254
1255 PUT RES1 "<br><br><table border =1 bordercolor=#800000>"/;
1256
1257 PUT RES1 "<tr><th colspan=4>Process Unit Data<tr><td>Unit<td>Flowrate<br><center>(t/h)</
center><td>Discharge Load of Contaminant<br> <center>(Kg/h)</center> <td>Maximum Inlet Contami
nant Concentration <br> <center>(ppm)</center>";
1258
1259 loop(pu_stc$(pu(pu_stc)),
1260
1261 PUT RES1 "<tr><td><center>" ord(pu_stc):3:0 ;
1262
1263 PUT RES1 "<td><center>" max_p(pu_stc):4:0 ""//;
1264
1265 PUT RES1 "<td>"//;
1266
1267 loop (comp,
1268
1269 PUT RES1 "<center>" comp.TL ":" l(pu_stc,comp):5:2 " <br>"//;
1270 );
1271
1272 PUT RES1 "<td>"//;
1273
![Page 30: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/30.jpg)
model.lst Fri Aug 20 07:36:53 2021 30
![Page 31: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/31.jpg)
model.lst Fri Aug 20 07:36:53 2021 31
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 25
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1274
1275 loop (comp,
1276 PUT RES1 "<center>" comp.TL ":" cmax(pu_stc,comp):6:2 " <br>"//;
1277 );
1278 );
1279
1280 PUT RES1 "</table><p>"/;
1281
1282 PUT RES1 "<tr>"//;
1283
1284 PUT RES1 "<br><br><br><th <b>Number of Treatment Units : " card(t):2:0 " </b><br>"//;
1285
1286
1287
1288 PUT RES1 "<br><br><table border =1 bordercolor=#800000>"/;
1289
1290 PUT RES1 "<tr><th colspan=5>Treatment Unit Data<tr><td>Unit<td>Operating Cost Coefficien
t<br><center>($/t)<td>Investment Cost Coefficient<br> <center>($/t) <td>Cost Function Exponent
<td>Removal Ratio<br> <center> (%)";
1291
1292 loop(tu_stc$(tu(tu_stc)),
1293
1294 PUT RES1 "<tr><td><center>" ord(tu_stc):3:0 ;
1295
1296 PUT RES1 "<td><center>" OCT(TU_STC):4:0 " "//;
1297
1298 PUT RES1 "<td><center>" ICT(TU_STC):6:0 " "//;
1299
1300 PUT RES1 "<td><center>" exp(TU_STC):4:1 "<td> "//;
1301
1302 loop (comp,
1303
1304 PUT RES1 "<center>" comp.TL ":" (100*beta(tu_stc,comp)):5:2 " <br>"//;
1305 );
1306
1307 );
1308
1309 PUT RES1 "</table><p>"/;
1310
1311
1312
1313 PUT RES1 "</table></table><br>"//;
1314
1315 PUT RES1 "<table align=center border =4 bordercolor=#800000><th colspan =4 bgcolor=#C
0C0C0>** ** ** RESULTS ** ** ** "///;
1316
1317 IND=COST.L;
1318
1319 PUT RES1 "<br><tr><td><tr><th colspan =4>Total Network Cost : " ind:10:2 " $/year"/;
1320
1321
1322
1323 PUT RES1 "<br><br><table border =1 bordercolor=#800000>"/;
1324
1325 PUT RES1 "<tr><th colspan=4>Concentrations of Contaminants<tr><td><td>actual<td>max ";
1326
![Page 32: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/32.jpg)
model.lst Fri Aug 20 07:36:53 2021 32
![Page 33: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/33.jpg)
model.lst Fri Aug 20 07:36:53 2021 33
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 26
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1327 loop (comp,
1328
1329 PUT RES1 "<tr><td>Contaminant ";
1330
1331 PUT RES1 comp.TL ":<td>" (cout):8:2 " ppm "//;
1332
1333 PUT RES1 "<td>" (cout):8:2 " ppm"/;
1334
1335 );
1336
1337 PUT RES1 "</table><p>"/;
1338
1339
1340
1341
1342
1343 ** INLET SPLITTERS
1344
1345 PUT RES1 "<table align=center border =1 bordercolor=#800000><th colspan =3 bgcolor=#A
DD8E6> SPLITTERS"/;
1346 PUT RES1 "<tr><th bgcolor=#FFFFCC>Unit<th bgcolor=#FFFFCC><center>Stream Distribution<th
bgcolor=#FFFFCC>Concentration of Contaminants</th>"/;
1347 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 1: </b>";
1348
1349 PUT RES1 "<tr><td>Inlet "/;
1350
1351 PUT "<td>" F.l(’in’):10:2 " ton/hr from feed" /;
1352
1353 PUT RES1 "<td>"/;
1354
1355 loop (str_stc$(str(str_stc)),
1356 loop (comp,
1357 PUT$ISPL(’s1’,str_stc) RES1 "<center> " comp.TL ": " c.l(str_stc,comp):3:2 ;
1358 );
1359 );
1360
1361 PUT RES1 "<tr><td>Outlet<td>"/;
1362
1363 loop (str_stc$(str(str_stc)),
1364
1365 PUT$((ospl(’s1’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr to m
ixer" a:2:0 "<td>";
1366 a$OSPL(’s1’,STR_STC)=a+1;
1367 *PUT RES1 ;
1368
1369 loop (comp,
1370
1371 PUT$((OSPL(’s1’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):3:2;
1372 );
1373 PUT$((OSPL(’s1’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1374 );
1375
1376 PUT RES1 "<tr> "/;
1377
1378 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 2 :</b>";
![Page 34: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/34.jpg)
model.lst Fri Aug 20 07:36:53 2021 34
1379
![Page 35: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/35.jpg)
model.lst Fri Aug 20 07:36:53 2021 35
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 27
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1380 PUT RES1 "<tr><td>Inlet "/;
1381
1382 PUT "<td>" F.l(’12’):10:2 " ton/hr from Process Unit 1 " /;
1383 PUT RES1 "<td>"/;
1384 loop (str_stc$(str(str_stc)),
1385 loop (comp,
1386 PUT$ISPL(’s11’,str_stc) RES1 " <center> " comp.TL ": " c.l(str_stc,comp):5:2 ;
1387 );
1388 );
1389
1390 PUT RES1 "<tr><td>Outlet<td>"/;
1391
1392 a=1;
1393
1394 loop (str_stc$(str(str_stc)),
1395
1396 PUT$((ospl(’s11’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr to
mixer" a:2:0 "<td>";
1397 a$OSPL(’s11’,STR_STC)=a+1;
1398 *PUT RES1 "<td>"/;
1399 loop (comp,
1400
1401 PUT$((OSPL(’s11’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2 /;
1402 );
1403 PUT$((OSPL(’s11’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1404 );
1405 PUT RES1 "<tr>"/;
1406
1407
1408 PUT RES1 "<tr><b> <th bgcolor=#CCFFFF>Splitter 3 : </b><tr><br>";
1409
1410 PUT RES1 "<tr><td>Inlet "/;
1411
1412 PUT "<td>" F.l(’22’):10:2 " ton/hr from Process Unit 2" /;
1413 PUT RES1 "<td>"/;
1414 loop (str_stc$(str(str_stc)),
1415 loop (comp,
1416 PUT$ISPL(’s21’,str_stc) RES1 "<center> " comp.TL ": " c.l(str_stc,comp):5:2 ;
1417 );
1418 );
1419
1420 PUT RES1 "<tr><td>Outlet<td>"/;
1421
1422 a=1;
1423
1424 loop (str_stc$(str(str_stc)),
1425
1426 PUT$((ospl(’s21’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr to
mixer" a:2:0"<td>";
1427 a$OSPL(’s21’,STR_STC)=a+1;
1428 *PUT RES1 "<td>"/;
1429 loop (comp,
1430
1431 PUT$((OSPL(’s21’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2 /;
![Page 36: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/36.jpg)
model.lst Fri Aug 20 07:36:53 2021 36
1432 );
![Page 37: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/37.jpg)
model.lst Fri Aug 20 07:36:53 2021 37
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 28
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1433 PUT$((OSPL(’s21’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1434 );
1435
1436 PUT RES1 "<tr> "/;
1437
1438 if ((card(p) eq 3) or (card(p) eq 4) or (card(p) eq 5) ,
1439
1440 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 4 : </b><br>";
1441
1442 PUT RES1 "<tr><td>Inlet "/;
1443
1444 PUT "<td>" F.l(’32’):10:2 " ton/hr from Process Unit 3" /;
1445 PUT RES1 "<td>"/;
1446 loop (str_stc$(str(str_stc)),
1447 loop (comp,
1448 PUT$ISPL(’s31’,str_stc) RES1 "<center> " comp.TL ": " c.l(str_stc,comp):5:2 /;
1449 );
1450 );
1451
1452 PUT RES1 "<tr><td>Outlet<td>"/;
1453
1454 a=1;
1455
1456 loop (str_stc$(str(str_stc)),
1457
1458 PUT$((ospl(’s31’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr to
mixer" a:2:0 "<td>";
1459 a$OSPL(’s31’,STR_STC)=a+1;
1460 *PUT RES1 "<td>"/;
1461 loop (comp,
1462
1463 PUT$((OSPL(’s31’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2 /;
1464 );
1465 PUT$((OSPL(’s31’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1466 );
1467 );
1468
1469 if ((card(p) eq 4) or (card(p) eq 5),
1470
1471 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 5 : </b>";
1472
1473 PUT RES1 "<tr><td>Inlet "/;
1474
1475 PUT "<td>" F.l(’42’):10:2 " ton/hr from Process Unit 4" /;
1476 PUT RES1 "<td>"/;
1477 loop (str_stc$(str(str_stc)),
1478 loop (comp,
1479 PUT$ISPL(’s41’,str_stc) RES1 "<center> " comp.TL ": " c.l(str_stc,comp):5:2 /;
1480 );
1481 );
1482
1483 PUT RES1 "<tr><td>Outlet<td>"/;
1484
1485 a=1;
![Page 38: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/38.jpg)
model.lst Fri Aug 20 07:36:53 2021 38
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 29
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1486
1487 loop (str_stc$(str(str_stc)),
1488
1489 PUT$((ospl(’s41’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr to
mixer" a:2:0 "<td>";
1490 a$OSPL(’s41’,STR_STC)=a+1;
1491 *PUT RES1 "<td>"/;
1492 loop (comp,
1493
1494 PUT$((OSPL(’s41’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2 /;
1495 );
1496 PUT$((OSPL(’s41’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1497 );
1498 );
1499
1500 if ((card(p) eq 5),
1501
1502 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 6 : </b>";
1503
1504 PUT RES1 "<tr><td>Inlet "/;
1505
1506 PUT "<td>" F.l(’52’):10:2 " ton/hr from Process Unit 5" /;
1507 PUT RES1 "<td>"/;
1508 loop (str_stc$(str(str_stc)),
1509 loop (comp,
1510 PUT$ISPL(’s51’,str_stc) RES1 "<center> " comp.TL ": " c.l(str_stc,comp):5:2 /;
1511 );
1512 );
1513
1514 PUT RES1 "<tr><td>Outlet<td>"/;
1515
1516 a=1;
1517
1518 loop (str_stc$(str(str_stc)),
1519
1520 PUT$((ospl(’s51’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr to
mixer" a:2:0 "<td>";
1521 a$OSPL(’s51’,STR_STC)=a+1;
1522 *PUT RES1 "<td>"/;
1523 loop (comp,
1524
1525 PUT$((OSPL(’s51’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2 /;
1526 );
1527 PUT$((OSPL(’s51’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1528 );
1529 );
1530 PUT RES1 "<tr>";
1531
1532 **********************Second Stage Splitters
1533
1534 PUT$(card(p) eq 2) RES1 "<tr><<b><th bgcolor=#CCFFFF>Splitter 4 : </b>";
1535
1536 PUT$(card(p) eq 3) RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 5 : </b>";
1537
![Page 39: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/39.jpg)
model.lst Fri Aug 20 07:36:53 2021 39
1538 PUT$(card(p) eq 4) RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 6 : </b>";
![Page 40: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/40.jpg)
model.lst Fri Aug 20 07:36:53 2021 40
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 30
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1539
1540 PUT$(card(p) eq 5) RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 7 : </b>";
1541
1542 PUT RES1 "<tr><td>Inlet "/;
1543
1544 PUT "<td>" F.l(’14’):10:2 " ton/hr from Treatment Unit 1 " /;
1545 PUT RES1 "<td>"/;
1546 loop (str_stc$(str(str_stc)),
1547 loop (comp,
1548 PUT$ISPL(’sa11’,str_stc) RES1 "<center> " comp.TL ": " c.l(str_stc,comp):5:2 /;
1549 );
1550 );
1551
1552 PUT RES1 "<tr><td>Outlet<td>"/;
1553
1554 a=1;
1555
1556 loop (str_stc$(str(str_stc)),
1557
1558 PUT$((ospl(’sa11’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:3 " ton/hr to
mixer" a:2:0 "<td>";
1559
1560 a$OSPL(’sa11’,STR_STC)=a+1;
1561 *PUT RES1 "<td>"/;
1562 loop (comp,
1563
1564 PUT$((OSPL(’sa11’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(s
tr_stc,comp):5:2 /;
1565 );
1566 PUT$((OSPL(’sa11’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1567 );
1568
1569 *PUT RES1 "<tr>";
1570
1571 if ((card(t) eq 2 and card(p) eq 2) or (card(t) eq 2 and card(p) eq 3) or (card(t) eq 3
and card(p) eq 3) or (card(t) eq 2 and card(p) eq 4) or (card(t) eq 3 and card(p) eq 4) or (ca
rd(t) eq 3 and card(p) eq 5) OR (card(t) eq 2 and card(p) eq 5),
1572
1573 PUT$((card(t) eq 2 and card(p) eq 2)) RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 5 : </b>
"/;
1574
1575 PUT$((card(t) eq 2 and card(p) eq 3)) RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 6 : </b>
"/;
1576
1577 PUT$((card(t) eq 3 and card(p) eq 3)) RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 6 : </b>
"/;
1578
1579 PUT$((card(t) eq 2 and card(p) eq 4) or (card(t) eq 3 and card(p) eq 4)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Splitter 7 : </b>"/;
1580
1581 PUT$((card(t) eq 3 and card(p) eq 5) OR (card(t) eq 2 and card(p) eq 5)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Splitter 8 : </b>"/;
1582
1583 PUT RES1 "<tr><td>Inlet "/;
1584
1585 PUT "<td>" F.l(’24’):10:2 " ton/hr from Treatment Unit 2" /;
![Page 41: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/41.jpg)
model.lst Fri Aug 20 07:36:53 2021 41
1586 PUT RES1 "<td>"/;
1587 loop (str_stc$(str(str_stc)),
1588 loop (comp,
1589 PUT$ISPL(’sa21’,str_stc) RES1 "<center> " comp.TL ": " c.l(str_stc,comp):5:2 ;
1590 );
1591 );
![Page 42: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/42.jpg)
model.lst Fri Aug 20 07:36:53 2021 42
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 31
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1592 PUT RES1 "<tr><td>Outlet<td>"/;
1593
1594 a=1;
1595
1596 loop (str_stc$(str(str_stc)),
1597
1598 PUT$((ospl(’sa21’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr to
mixer" a:2:0"<td>";
1599 a$OSPL(’sa21’,STR_STC)=a+1;
1600 *PUT RES1 "<td>"/;
1601 loop (comp,
1602
1603 PUT$((OSPL(’sa21’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(s
tr_stc,comp):5:2 /;
1604 );
1605 PUT$((OSPL(’sa21’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1606 );
1607
1608 );
1609 *PUT "<br><tr>"/;
1610 PUT RES1 "<tr>";
1611
1612 if ((card(t) eq 3 and card(p) eq 3) or (card(t) eq 3 and card(p) eq 4) or ((card(t) eq 3
and card(p) eq 5)) ,
1613 PUT "<tr>"/;
1614
1615 PUT$((card(t) eq 3 and card(p) eq 3)) RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 7 : </b>
"/;
1616
1617 PUT$((card(t) eq 3 and card(p) eq 4)) RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 8 : </b>
"/;
1618
1619 PUT$((card(t) eq 3 and card(p) eq 5)) RES1 "<tr><b><th bgcolor=#CCFFFF>Splitter 9 : </b>
"/;
1620
1621 PUT RES1 "<tr><td>Inlet "/;
1622
1623 PUT "<td>" F.l(’34’):10:2 " ton/hr from Treatment Unit 3" /;
1624 PUT RES1 "<td>"/;
1625 loop (str_stc$(str(str_stc)),
1626 loop (comp,
1627 PUT$ISPL(’sa31’,str_stc) RES1 "<center> " comp.TL ": " c.l(str_stc,comp):5:2 ;
1628 );
1629 );
1630
1631 PUT RES1 "<tr><td>Outlet<td>"/;
1632
1633 a=1;
1634
1635 loop (str_stc$(str(str_stc)),
1636
1637 PUT$((ospl(’sa31’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr to
mixer" a:2:0 "<td>";
1638 a$OSPL(’sa31’,STR_STC)=a+1;
1639 loop (comp,
1640
![Page 43: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/43.jpg)
model.lst Fri Aug 20 07:36:53 2021 43
1641 PUT$((OSPL(’sa31’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(s
tr_stc,comp):5:2 / ;
1642 );
1643 PUT$((OSPL(’sa31’,STR_STC)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1644 );
![Page 44: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/44.jpg)
model.lst Fri Aug 20 07:36:53 2021 44
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 32
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1645 );
1646
1647 PUT "<tr>"/;
1648
1649
1650 **********************************************MIXERS************************************
*
1651
1652 PUT RES1 "<table align=center border =1 bordercolor=#800000><th colspan =3 bgcolor=#A
DD8E6> MIXERS";
1653 PUT RES1 "<tr><th bgcolor=#FFFFCC>Unit<th bgcolor=#FFFFCC><center>Stream Distribution<th
bgcolor=#FFFFCC>Concentration of Contaminants"/;
1654
1655 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 1: </b>"/;
1656
1657
1658 PUT RES1 "<tr><td>Inlet "/;
1659 PUT RES1 "<td>"/;
1660 a=1;
1661
1662 loop (str_stc$(str(str_stc)),
1663
1664 PUT$((IMXR(’m1’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr from
splitter " a:2:0 "<td>";
1665 a$(IMXR(’m1’,str_stc))=a+1;
1666
1667
1668 loop (comp,
1669
1670 PUT$((IMXR(’m1’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):3:2;
1671 );
1672 PUT$((IMXR(’m1’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1673 );
1674
1675
1676 PUT RES1 "<tr><td>Outlet"/;
1677
1678
1679 PUT "<td>" F.l(’11’):10:2 " ton/hr to Process Unit 1" /;
1680
1681 PUT RES1 "<td>"/;
1682 loop (str_stc$(str(str_stc)),
1683 loop (comp,
1684
1685 PUT$((OMXR(’m1’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center> " comp.TL ": " c.l(s
tr_stc,comp):5:2 / ;
1686 );
1687 );
1688
1689
1690 PUT "<tr>"/;
1691
1692
1693 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 2: </b>";
1694
![Page 45: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/45.jpg)
model.lst Fri Aug 20 07:36:53 2021 45
1695
1696 PUT RES1 "<tr><td>Inlet "/;
1697 PUT RES1 "<td>"/;
![Page 46: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/46.jpg)
model.lst Fri Aug 20 07:36:53 2021 46
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 33
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1698 a=1;
1699
1700 loop (str_stc$(str(str_stc)),
1701
1702 PUT$((IMXR(’m2’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr from
splitter " a:2:0 "<td>";
1703 a$(IMXR(’m2’,str_stc))=a+1;
1704
1705
1706 loop (comp,
1707
1708 PUT$((IMXR(’m2’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2/;
1709 );
1710 PUT$((IMXR(’m2’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1711 );
1712
1713
1714 PUT RES1 "<tr><td>Outlet"/;
1715
1716
1717 PUT "<td>" F.l(’21’):10:2 " ton/hr to Process Unit 2" /;
1718
1719 PUT RES1 "<td>"/;
1720 loop (str_stc$(str(str_stc)),
1721 loop (comp,
1722
1723 PUT$((OMXR(’m2’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center> " comp.TL ": " c.l(s
tr_stc,comp):5:2 / ;
1724 );
1725 );
1726
1727
1728 PUT "<tr>"/;
1729
1730 if ((card(p) eq 3) or (card(p) eq 4) or (card(p) eq 5) ,
1731 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 3: </b>";
1732
1733
1734 PUT RES1 "<tr><td>Inlet "/;
1735 PUT RES1 "<td>"/;
1736 a=1;
1737
1738 loop (str_stc$(str(str_stc)),
1739
1740 PUT$((IMXR(’m3’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr from
splitter " a:2:0 "<td>";
1741 a$(IMXR(’m3’,str_stc))=a+1;
1742
1743
1744 loop (comp,
1745
1746 PUT$((IMXR(’m3’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2/;
1747 );
1748 PUT$((IMXR(’m3’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
![Page 47: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/47.jpg)
model.lst Fri Aug 20 07:36:53 2021 47
1749 );
1750
![Page 48: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/48.jpg)
model.lst Fri Aug 20 07:36:53 2021 48
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 34
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1751
1752 PUT RES1 "<tr><td>Outlet"/;
1753
1754
1755 PUT "<td>" F.l(’31’):10:2 " ton/hr to Process Unit 3" /;
1756
1757 PUT RES1 "<td>"/;
1758 loop (str_stc$(str(str_stc)),
1759 loop (comp,
1760
1761 PUT$((OMXR(’m3’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center> " comp.TL ": " c.l(s
tr_stc,comp):5:2 / ;
1762 );
1763 );
1764
1765
1766 PUT "<tr>"/;
1767 );
1768
1769
1770 if ((card(p) eq 5) or (card(p) eq 4),
1771 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 4: </b>";
1772
1773
1774 PUT RES1 "<tr><td>Inlet "/;
1775 PUT RES1 "<td>"/;
1776 a=1;
1777
1778 loop (str_stc$(str(str_stc)),
1779
1780 PUT$((IMXR(’m4’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr from
splitter " a:2:0 "<td>";
1781 a$(IMXR(’m4’,str_stc))=a+1;
1782
1783
1784 loop (comp,
1785
1786 PUT$((IMXR(’m4’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2/;
1787 );
1788 PUT$((IMXR(’m4’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1789 );
1790
1791
1792 PUT RES1 "<tr><td>Outlet"/;
1793
1794
1795 PUT "<td>" F.l(’41’):10:2 " ton/hr to Process Unit 4" /;
1796
1797 PUT RES1 "<td>"/;
1798 loop (str_stc$(str(str_stc)),
1799 loop (comp,
1800
1801 PUT$((OMXR(’m4’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center> " comp.TL ": " c.l(s
tr_stc,comp):5:2 / ;
1802 );
![Page 49: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/49.jpg)
model.lst Fri Aug 20 07:36:53 2021 49
1803 );
![Page 50: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/50.jpg)
model.lst Fri Aug 20 07:36:53 2021 50
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 35
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1804
1805
1806 PUT "<tr>"/;
1807 );
1808
1809 if ((card(p) eq 5),
1810 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 5: </b>";
1811
1812
1813 PUT RES1 "<tr><td>Inlet "/;
1814 PUT RES1 "<td>"/;
1815 a=1;
1816
1817 loop (str_stc$(str(str_stc)),
1818
1819 PUT$((IMXR(’m5’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr from
splitter " a:2:0 "<td>";
1820 a$(IMXR(’m5’,str_stc))=a+1;
1821
1822
1823 loop (comp,
1824
1825 PUT$((IMXR(’m5’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2/;
1826 );
1827 PUT$((IMXR(’m5’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1828 );
1829
1830
1831 PUT RES1 "<tr><td>Outlet"/;
1832
1833
1834 PUT "<td>" F.l(’51’):10:2 " ton/hr to Process Unit 5" /;
1835
1836 PUT RES1 "<td>"/;
1837 loop (str_stc$(str(str_stc)),
1838 loop (comp,
1839
1840 PUT$((OMXR(’m5’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center> " comp.TL ": " c.l(s
tr_stc,comp):5:2 / ;
1841 );
1842 );
1843
1844
1845 PUT "<tr>"/;
1846
1847 );
1848
1849 *******SECOND STAGE MIXERS
1850
1851 PUT$(card(p) eq 2) RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 3: </b>";
1852 PUT$(card(p) eq 3) RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 4: </b>";
1853 PUT$(card(p) eq 4) RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 5: </b>";
1854 PUT$(card(p) eq 5) RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 6: </b>";
1855
1856 PUT RES1 "<tr><td>Inlet "/;
![Page 51: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/51.jpg)
model.lst Fri Aug 20 07:36:53 2021 51
![Page 52: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/52.jpg)
model.lst Fri Aug 20 07:36:53 2021 52
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 36
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1857 PUT RES1 "<td>"/;
1858 a=2;
1859
1860 loop (str_stc$(str(str_stc)),
1861 PUT$((IMXR(’m6’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr from
splitter " a:2:0 "<td>";
1862 a$(IMXR(’m6’,str_stc))=a+1;
1863
1864 loop (comp,
1865 PUT$((IMXR(’m6’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2/;
1866 );
1867 PUT$((IMXR(’m6’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1868 );
1869
1870 PUT RES1 "<tr><td>Outlet"/;
1871 PUT "<td>" F.l(’13’):10:2 " ton/hr to Treatment Unit 1 " /;
1872 PUT RES1 "<td>"/;
1873 loop (str_stc$(str(str_stc)),
1874 loop (comp,
1875
1876 PUT$((OMXR(’m6’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center> " comp.TL ": " c.l(s
tr_stc,comp):5:2 / ;
1877 );
1878 );
1879 PUT "<tr>"/;
1880
1881 if ((card(t) eq 2 and card(p) eq 2) or (card(t) eq 2 and card(p) eq 3) or (card(t) eq 3
and card(p) eq 3) or (card(t) eq 2 and card(p) eq 4) or (card(t) eq 3 and card(p) eq 4) or (ca
rd(t) eq 3 and card(p) eq 5) or (card(t) eq 2 and card(p) eq 5),
1882
1883 PUT$((card(t) eq 2 and card(p) eq 2)) RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 4: </b>";
1884 PUT$((card(t) eq 2 and card(p) eq 3) OR (card(t) eq 3 and card(p) eq 3)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Mixer 5: </b>";
1885 PUT$((card(t) eq 2 and card(p) eq 4) or (card(t) eq 3 and card(p) eq 4)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Mixer 6: </b>";
1886 PUT$((card(t) eq 3 and card(p) eq 5) or (card(t) eq 2 and card(p) eq 5)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Mixer 7: </b>";
1887
1888 PUT RES1 "<tr><td>Inlet "/;
1889 PUT RES1 "<td>"/;
1890 a=2;
1891
1892 loop (str_stc$(str(str_stc)),
1893 PUT$((IMXR(’m7’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr from
splitter " a:2:0 "<td>";
1894 a$(IMXR(’m7’,str_stc))=a+1;
1895
1896 loop (comp,
1897 PUT$((IMXR(’m7’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2/;
1898 );
1899 PUT$((IMXR(’m7’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1900 );
1901
1902 PUT RES1 "<tr><td>Outlet"/;
![Page 53: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/53.jpg)
model.lst Fri Aug 20 07:36:53 2021 53
1903 PUT "<td>" F.l(’23’):10:2 " ton/hr to Treatment Unit 2 " /;
1904 PUT RES1 "<td>"/;
1905 loop (str_stc$(str(str_stc)),
1906 loop (comp,
1907
1908 PUT$((OMXR(’m7’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center> " comp.TL ": " c.l(s
tr_stc,comp):5:2 / ;
1909 );
![Page 54: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/54.jpg)
model.lst Fri Aug 20 07:36:53 2021 54
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 37
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1910 );
1911 PUT "<tr>"/;
1912 );
1913
1914
1915 if ((card(t) eq 3 and card(p) eq 3) or (card(t) eq 3 and card(p) eq 4) or (card(t) eq 3
and card(p) eq 5),
1916
1917 PUT$((card(t) eq 2 and card(p) eq 2)) RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 4: </b>";
1918 PUT$((card(t) eq 2 and card(p) eq 3) OR (card(t) eq 3 and card(p) eq 3)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Mixer 5: </b>";
1919 PUT$((card(t) eq 2 and card(p) eq 4) or (card(t) eq 3 and card(p) eq 4)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Mixer 6: </b>";
1920 PUT$((card(t) eq 3 and card(p) eq 5) or (card(t) eq 2 and card(p) eq 5)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Mixer 7: </b>";
1921
1922 PUT RES1 "<tr><td>Inlet "/;
1923 PUT RES1 "<td>"/;
1924 a=2;
1925
1926 loop (str_stc$(str(str_stc)),
1927 PUT$((IMXR(’m8’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr from
splitter " a:2:0 "<td>";
1928 a$(IMXR(’m8’,str_stc))=a+1;
1929
1930 loop (comp,
1931 PUT$((IMXR(’m8’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2/;
1932 );
1933 PUT$((IMXR(’m8’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1934 );
1935
1936 PUT RES1 "<tr><td>Outlet"/;
1937 PUT "<td>" F.l(’33’):10:2 " ton/hr to Treatment Unit 3 " /;
1938 PUT RES1 "<td>"/;
1939 loop (str_stc$(str(str_stc)),
1940 loop (comp,
1941
1942 PUT$((OMXR(’m8’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center> " comp.TL ": " c.l(s
tr_stc,comp):5:2 / ;
1943 );
1944 );
1945 PUT "<tr>"/;
1946 );
1947
1948
1949 PUT$((card(t) eq 1 and card(p) eq 2)) RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 4: </b>";
1950 PUT$((card(t) eq 2 and card(p) eq 2) or (card(t) eq 1 and card(p) eq 3)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Mixer 5: </b>";
1951 PUT$((card(t) eq 2 and card(p) eq 3) or (card(t) eq 1 and card(p) eq 4)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Mixer 6: </b>";
1952 PUT$((card(t) eq 3 and card(p) eq 3) or (card(t) eq 2 and card(p) eq 4) or (card(t) eq 1
and card(p) eq 5)) RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 7: </b>";
1953 PUT$((card(t) eq 3 and card(p) eq 4) or (card(t) eq 2 and card(p) eq 5)) RES1 "<tr><b><t
h bgcolor=#CCFFFF>Mixer 8: </b>";
1954 PUT$((card(t) eq 3 and card(p) eq 5)) RES1 "<tr><b><th bgcolor=#CCFFFF>Mixer 9: </b>";
![Page 55: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/55.jpg)
model.lst Fri Aug 20 07:36:53 2021 55
1955
1956 PUT RES1 "<tr><td>Inlet "/;
1957 PUT RES1 "<td>"/;
1958 a=2;
1959
1960 loop (str_stc$(str(str_stc)),
1961 PUT$((IMXR(’mf’,str_stc)) and (f.l(str_stc) ne 0)) RES1 f.l(str_stc):10:2 " ton/hr from
splitter " a:2:0 "<td>";
1962 a$(IMXR(’mf’,str_stc))=a+1;
![Page 56: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/56.jpg)
model.lst Fri Aug 20 07:36:53 2021 56
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 38
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
1963
1964 loop (comp,
1965 PUT$((IMXR(’mf’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center>" comp.TL ": " c.l(st
r_stc,comp):5:2/;
1966 );
1967 PUT$((IMXR(’mf’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<tr><td><td>"/;
1968 );
1969
1970 PUT RES1 "<tr><td>Outlet"/;
1971 PUT "<td>" F.l(’FP’):10:2 " ton/hr to Discharge " /;
1972 PUT RES1 "<td>"/;
1973 loop (str_stc$(str(str_stc)),
1974 loop (comp,
1975
1976 PUT$((OMXR(’mf’,str_stc)) and (f.l(str_stc) ne 0)) RES1 "<center> " comp.TL ": " c.l(s
tr_stc,comp):5:2 / ;
1977 );
1978 );
1979 PUT "<tr>"/;
1980
1981 **************************************TREATMENTS****************************************
************
1982
1983 PUT RES1 "<table align=center border =1 bordercolor=#800000><th colspan =2 bgcolor=#A
DD8E6> TREATMENTS";
1984 PUT RES1 "<tr><th bgcolor=#FFFFCC>Unit<center><th bgcolor=#FFFFCC>Stream Distribution";
1985
1986 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Treatment 1: </b>";
1987
1988 PUT RES1 "<tr><td>Inlet<td> "/;
1989
1990 PUT$(card(p) eq 2) RES1 F.l(’13’):6:2 " ton/hr from mixer 3 ";
1991
1992 PUT$(card(p) eq 3) RES1 F.l(’13’):6:2 " ton/hr from mixer 4 ";
1993
1994 PUT$(card(p) eq 4) RES1 F.l(’13’):6:2 " ton/hr from mixer 5 ";
1995
1996 PUT$(card(p) eq 5) RES1 F.l(’13’):6:2 " ton/hr from mixer 6 ";
1997
1998 PUT RES1 "<tr><td>Outlet<td>"/;
1999
2000 PUT$(card(p) eq 2) RES1 F.l(’14’):6:2 " ton/hr to splitter 4 ";
2001
2002 PUT$(card(p) eq 3) RES1 F.l(’14’):6:2 " ton/hr to splitter 5 ";
2003
2004 PUT$(card(p) eq 4) RES1 F.l(’14’):6:2 " ton/hr to splitter 6 ";
2005
2006 PUT$(card(p) eq 5) RES1 F.l(’14’):6:2 " ton/hr to splitter 7";
2007
2008
2009
2010 if ((card(t) eq 2 and card(p) eq 2) or (card(t) eq 2 and card(p) eq 3) or (card(t) eq 3
and card(p) eq 3) or (card(t) eq 2 and card(p) eq 4) or (card(t) eq 3 and card(p) eq 4) or (ca
rd(t) eq 3 and card(p) eq 5) or (card(t) eq 2 and card(p) eq 5),
2011
2012 PUT "<tr>"/;
![Page 57: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/57.jpg)
model.lst Fri Aug 20 07:36:53 2021 57
2013
2014 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Treatment 2: </b>";
2015
![Page 58: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/58.jpg)
model.lst Fri Aug 20 07:36:53 2021 58
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 39
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2016 PUT RES1 "<tr><td>Inlet <td>"/;
2017
2018 PUT$(card(t) eq 2 and card(p) eq 2) RES1 F.l(’23’):6:2 " ton/hr from mixer 4 ";
2019
2020 PUT$(card(t) eq 2 and card(p) eq 3) RES1 F.l(’23’):6:2 " ton/hr from mixer 5 ";
2021
2022 PUT$(card(t) eq 3 and card(p) eq 3) RES1 F.l(’23’):6:2 " ton/hr from mixer 5 ";
2023
2024 PUT$((card(t) eq 2 and card(p) eq 4) or (card(t) eq 3 and card(p) eq 4)) RES1 F.l(’23’
):6:2 " ton/hr from mixer 6 ";
2025
2026 PUT$((card(t) eq 3 and card(p) eq 5) or (card(t) eq 2 and card(p) eq 5)) RES1 F.l(’23’)
:6:2 " ton/hr from mixer 7 ";
2027
2028 PUT RES1 "<tr><td>Outlet<td>"/;
2029
2030 PUT$(card(t) eq 2 and card(p) eq 2) RES1 F.l(’24’):6:2 " ton/hr to splitter 5 ";
2031
2032 PUT$(card(t) eq 2 and card(p) eq 3) RES1 F.l(’24’):6:2 " ton/hr to splitter 6 ";
2033
2034 PUT$(card(t) eq 3 and card(p) eq 3) RES1 F.l(’24’):6:2 " ton/hr to splitter 6 ";
2035
2036 PUT$((card(t) eq 2 and card(p) eq 4) or (card(t) eq 3 and card(p) eq 4)) RES1 F.l(’24’)
:6:2 " ton/hr to splitter 7 ";
2037
2038 PUT$((card(t) eq 3 and card(p) eq 5) or (card(t) eq 2 and card(p) eq 5)) RES1 F.l(’24’)
:6:2 " ton/hr to splitter 8 ";
2039
2040 );
2041
2042 if ((card(t) eq 3 and card(p) eq 3) or (card(t) eq 3 and card(p) eq 4) or (card(t) eq 3
and card(p) eq 5),
2043 PUT "<tr>"/;
2044
2045 PUT RES1 "<tr><b><th bgcolor=#CCFFFF>Treatment 3: </b>";
2046
2047 PUT RES1 "<tr><td>Inlet <td>"/;
2048
2049 PUT$(card(t) eq 3 and card(p) eq 3) RES1 F.l(’33’):6:2 " ton/hr from mixer 6 ";
2050
2051 PUT$(card(t) eq 3 and card(p) eq 4) RES1 F.l(’33’):6:2 " ton/hr from mixer 7 ";
2052
2053 PUT$(card(t) eq 3 and card(p) eq 5) RES1 F.l(’33’):6:2 " ton/hr from mixer 8 ";
2054
2055 PUT RES1 "<tr><td>Outlet<td>"/;
2056
2057 PUT$(card(t) eq 3 and card(p) eq 3) RES1 F.l(’34’):6:2 " ton/hr to splitter 7 ";
2058
2059 PUT$(card(t) eq 3 and card(p) eq 4) RES1 F.l(’34’):6:2 " ton/hr to splitter 8 ";
2060
2061 PUT$(card(t) eq 3 and card(p) eq 5) RES1 F.l(’34’):6:2 " ton/hr to splitter 9 ";
2062
2063 );
2064
2065 PUT RES1 "</table></table></table>"/;
2066
![Page 59: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/59.jpg)
model.lst Fri Aug 20 07:36:53 2021 59
2067
INCLUDE /var/www/html/interfaces/cgi-bin/waternet/buttons.inc
![Page 60: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/60.jpg)
model.lst Fri Aug 20 07:36:53 2021 60
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 40
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2069 PUT RES1 ’<br><table align=center><td class="ref"><A HREF="./../cgi-bin/waternet/graph.c
gi" target=new_window>SEE NETWORK</A>’/;
2070 PUT RES1 ’<td class="ref"><a href="model.pdf" target=new_window>GAMS LIST FILE</a>’;
2071 PUT RES1 "</table></body></html>"/;
2072
2073
2074
2075 *** Data fot the graphic display ***
2076
2077 File res2 /data.inc /
2078
2079 PUT res2 "parameter ind,flow(*);"/;
2080
2081 Put res2 "ind =" ind ";"/;
2082 Put res2 "flow(’in’) =" f.l(’in’) ";"/;
2083 Put res2 "flow(’1’) =" f.l(’1’) ";"/;
2084 Put res2 "flow(’2’) =" f.l(’2’) ";"/;
2085 Put res2 "flow(’3’) =" f.l(’3’) ";"/;
2086 Put res2 "flow(’4’) =" f.l(’4’) ";"/;
2087 Put res2 "flow(’5’) =" f.l(’5’) ";"/;
2088 Put res2 "flow(’11’) =" f.l(’11’) ";"/;
2089 Put res2 "flow(’21’) =" f.l(’21’) ";"/;
2090 Put res2 "flow(’31’) =" f.l(’31’) ";"/;
2091 Put res2 "flow(’41’) =" f.l(’41’) ";"/;
2092 Put res2 "flow(’51’) =" f.l(’51’) ";"/;
2093 Put res2 "flow(’12’) =" f.l(’12’) ";"/;
2094 Put res2 "flow(’22’) =" f.l(’22’) ";"/;
2095 Put res2 "flow(’32’) =" f.l(’32’) ";"/;
2096 Put res2 "flow(’42’) =" f.l(’42’) ";"/;
2097 Put res2 "flow(’52’) =" f.l(’52’) ";"/;
2098 Put res2 "flow(’13’) =" f.l(’13’) ";"/;
2099 Put res2 "flow(’23’) =" f.l(’23’) ";"/;
2100 Put res2 "flow(’33’) =" f.l(’33’) ";"/;
2101 Put res2 "flow(’14’) =" f.l(’14’) ";"/;
2102 Put res2 "flow(’24’) =" f.l(’24’) ";"/;
2103 Put res2 "flow(’34’) =" f.l(’34’) ";"/;
2104 Put res2 "flow(’fp’) =" f.l(’fp’) ";"/;
2105
2106 Put res2 "flow(’122’) =" f.l(’122’) ";"/;
2107 Put res2 "flow(’123’) =" f.l(’123’) ";"/;
2108 Put res2 "flow(’124’) =" f.l(’124’) ";"/;
2109 Put res2 "flow(’125’) =" f.l(’125’) ";"/;
2110 Put res2 "flow(’126’) =" f.l(’126’) ";"/;
2111 Put res2 "flow(’127’) =" f.l(’127’) ";"/;
2112 Put res2 "flow(’128’) =" f.l(’128’) ";"/;
2113 Put res2 "flow(’129’) =" f.l(’129’) ";"/;
2114
2115 Put res2 "flow(’221’) =" f.l(’221’) ";"/;
2116 Put res2 "flow(’223’) =" f.l(’223’) ";"/;
2117 Put res2 "flow(’224’) =" f.l(’224’) ";"/;
2118 Put res2 "flow(’225’) =" f.l(’225’) ";"/;
2119 Put res2 "flow(’226’) =" f.l(’226’) ";"/;
2120 Put res2 "flow(’227’) =" f.l(’227’) ";"/;
2121 Put res2 "flow(’228’) =" f.l(’228’) ";"/;
![Page 61: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/61.jpg)
model.lst Fri Aug 20 07:36:53 2021 61
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 41
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2122 Put res2 "flow(’229’) =" f.l(’229’) ";"/;
2123
2124 Put res2 "flow(’321’) =" f.l(’321’) ";"/;
2125 Put res2 "flow(’322’) =" f.l(’322’) ";"/;
2126 Put res2 "flow(’324’) =" f.l(’324’) ";"/;
2127 Put res2 "flow(’325’) =" f.l(’325’) ";"/;
2128 Put res2 "flow(’326’) =" f.l(’326’) ";"/;
2129 Put res2 "flow(’327’) =" f.l(’327’) ";"/;
2130 Put res2 "flow(’328’) =" f.l(’328’) ";"/;
2131 Put res2 "flow(’329’) =" f.l(’329’) ";"/;
2132
2133 Put res2 "flow(’421’) =" f.l(’421’) ";"/;
2134 Put res2 "flow(’422’) =" f.l(’422’) ";"/;
2135 Put res2 "flow(’423’) =" f.l(’423’) ";"/;
2136 Put res2 "flow(’425’) =" f.l(’425’) ";"/;
2137 Put res2 "flow(’426’) =" f.l(’426’) ";"/;
2138 Put res2 "flow(’427’) =" f.l(’427’) ";"/;
2139 Put res2 "flow(’428’) =" f.l(’428’) ";"/;
2140 Put res2 "flow(’429’) =" f.l(’429’) ";"/;
2141
2142 Put res2 "flow(’521’) =" f.l(’521’) ";"/;
2143 Put res2 "flow(’522’) =" f.l(’522’) ";"/;
2144 Put res2 "flow(’523’) =" f.l(’523’) ";"/;
2145 Put res2 "flow(’524’) =" f.l(’524’) ";"/;
2146 Put res2 "flow(’526’) =" f.l(’526’) ";"/;
2147 Put res2 "flow(’527’) =" f.l(’527’) ";"/;
2148 Put res2 "flow(’528’) =" f.l(’528’) ";"/;
2149 Put res2 "flow(’529’) =" f.l(’529’) ";"/;
2150
2151 Put res2 "flow(’141’) =" f.l(’141’) ";"/;
2152 Put res2 "flow(’142’) =" f.l(’142’) ";"/;
2153 Put res2 "flow(’143’) =" f.l(’143’) ";"/;
2154 Put res2 "flow(’144’) =" f.l(’144’) ";"/;
2155 Put res2 "flow(’145’) =" f.l(’145’) ";"/;
2156 Put res2 "flow(’147’) =" f.l(’147’) ";"/;
2157 Put res2 "flow(’148’) =" f.l(’148’) ";"/;
2158 Put res2 "flow(’149’) =" f.l(’149’) ";"/;
2159
2160 Put res2 "flow(’241’) =" f.l(’241’) ";"/;
2161 Put res2 "flow(’242’) =" f.l(’242’) ";"/;
2162 Put res2 "flow(’243’) =" f.l(’243’) ";"/;
2163 Put res2 "flow(’244’) =" f.l(’244’) ";"/;
2164 Put res2 "flow(’245’) =" f.l(’245’) ";"/;
2165 Put res2 "flow(’246’) =" f.l(’246’) ";"/;
2166 Put res2 "flow(’248’) =" f.l(’248’) ";"/;
2167 Put res2 "flow(’249’) =" f.l(’249’) ";"/;
2168
2169 Put res2 "flow(’341’) =" f.l(’341’) ";"/;
2170 Put res2 "flow(’342’) =" f.l(’342’) ";"/;
2171 Put res2 "flow(’343’) =" f.l(’343’) ";"/;
2172 Put res2 "flow(’344’) =" f.l(’344’) ";"/;
2173 Put res2 "flow(’345’) =" f.l(’345’) ";"/;
2174 Put res2 "flow(’346’) =" f.l(’346’) ";"/;
![Page 62: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/62.jpg)
model.lst Fri Aug 20 07:36:53 2021 62
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 42
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2175 Put res2 "flow(’347’) =" f.l(’347’) ";"/;
2176 Put res2 "flow(’349’) =" f.l(’349’) ";"/;
2177
2178
2179 **para model p5 t3
2180
2181 File res56 /TREATMENT5/;
2182
2183 **Process 1**********************
2184
2185 if ((f.l(’1’) eq 0),
2186 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 "1.5, 10.5"/;
2187 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 "1.6, 10.5"/;
2188 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 " "/;
2189 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 "1.7, 10.5"/;
2190 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 "1.8, 10.5"/;
2191 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 " "/;
2192 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 "1.9, 10.5"/;
2193 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 "2, 10.5"/;
2194 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 "1.9, 10.545"/;
2195 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 " "/;
2196 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’521’) ne 0) or (f.l(’141’) ne 0) o
r (f.l(’241’) ne 0) or (f.l(’341’) ne 0)) res56 "1.9, 10.451"/;
2197 );
2198 **Mixer 1
2199 PUT$(f.l(’11’) ne 0) res56 "2, 10.5"/;
2200 PUT$(f.l(’11’) ne 0) res56 "2.5, 11"/;
2201 PUT$(f.l(’11’) ne 0) res56 "3, 10.5"/;
2202 PUT$(f.l(’11’) ne 0) res56 "2.5, 10"/;
2203 PUT$(f.l(’11’) ne 0) res56 "2, 10.5"/;
2204 PUT$(f.l(’11’) ne 0) res56 " "/;
2205
2206 ***Process 1
2207 PUT$(f.l(’12’) ne 0) res56 "4.5, 10"/;
2208 PUT$(f.l(’12’) ne 0) res56 "4.5, 11"/;
2209 PUT$(f.l(’12’) ne 0) res56 "5.8, 11"/;
2210 PUT$(f.l(’12’) ne 0) res56 "5.8, 10"/;
2211 PUT$(f.l(’12’) ne 0) res56 "4.5, 10"/;
2212 PUT$(f.l(’12’) ne 0) res56 " "/;
2213
2214 ****Splitter 2
2215 PUT$(f.l(’12’) ne 0) res56 "7, 10"/;
2216 PUT$(f.l(’12’) ne 0) res56 "7.5, 11"/;
2217 PUT$(f.l(’12’) ne 0) res56 "8, 10"/;
2218 PUT$(f.l(’12’) ne 0) res56 "7, 10"/;
2219 PUT$(f.l(’12’) ne 0) res56 " "/;
![Page 63: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/63.jpg)
model.lst Fri Aug 20 07:36:53 2021 63
2220
2221
2222 ***Second line system **************************
2223 if ((f.l(’2’) eq 0),
2224 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 "1.5, 8.25"/;
2225 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 "1.6, 8.25"/;
2226 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 " "/;
2227 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 "1.7, 8.25"/;
![Page 64: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/64.jpg)
model.lst Fri Aug 20 07:36:53 2021 64
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 43
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2228 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 "1.8, 8.25"/;
2229 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 " "/;
2230 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 "1.9, 8.25"/;
2231 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 "2, 8.25"/;
2232 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 "1.9, 8.295"/;
2233 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 " "/;
2234 PUT$((f.l(’422’) ne 0) or (f.l(’522’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) o
r (f.l(’342’) ne 0)) res56 "1.9, 8.201"/;
2235 );
2236
2237
2238 **Mixer 2
2239 PUT$(f.l(’21’) ne 0) res56 "2, 8.25"/;
2240 PUT$(f.l(’21’) ne 0) res56 "2.5, 8.75"/;
2241 PUT$(f.l(’21’) ne 0) res56 "3, 8.25"/;
2242 PUT$(f.l(’21’) ne 0) res56 "2.5, 7.75"/;
2243 PUT$(f.l(’21’) ne 0) res56 "2, 8.25"/;
2244 PUT$(f.l(’21’) ne 0) res56 " "/;
2245
2246 ***Process 2
2247 PUT$(f.l(’22’) ne 0) res56 "4.5, 7.75"/;
2248 PUT$(f.l(’22’) ne 0) res56 "4.5, 8.75"/;
2249 PUT$(f.l(’22’) ne 0) res56 "5.8, 8.75"/;
2250 PUT$(f.l(’22’) ne 0) res56 "5.8, 7.75"/;
2251 PUT$(f.l(’22’) ne 0) res56 "4.5, 7.75"/;
2252 PUT$(f.l(’22’) ne 0) res56 " "/;
2253
2254 ****Splitter 3
2255 PUT$(f.l(’22’) ne 0) res56 "7, 7.75"/;
2256 PUT$(f.l(’22’) ne 0) res56 "7.5, 8.75"/;
2257 PUT$(f.l(’22’) ne 0) res56 "8, 7.75"/;
2258 PUT$(f.l(’22’) ne 0) res56 "7, 7.75"/;
2259 PUT$(f.l(’22’) ne 0) res56 " "/;
2260
2261 ***Mixer 6
2262 PUT$(f.l(’13’) ne 0) res56 "9, 8.25"/;
2263 PUT$(f.l(’13’) ne 0) res56 "9.5, 8.75"/;
2264 PUT$(f.l(’13’) ne 0) res56 "10, 8.25"/;
2265 PUT$(f.l(’13’) ne 0) res56 "9.5, 7.75"/;
2266 PUT$(f.l(’13’) ne 0) res56 "9, 8.25"/;
2267 PUT$(f.l(’13’) ne 0) res56 " "/;
2268
2269 ***Treatment 1
2270 PUT$(f.l(’14’) ne 0) res56 "11, 7.75"/;
2271 PUT$(f.l(’14’) ne 0) res56 "11, 8.75"/;
2272 PUT$(f.l(’14’) ne 0) res56 "12.4, 8.75"/;
2273 PUT$(f.l(’14’) ne 0) res56 "12.4, 7.75"/;
2274 PUT$(f.l(’14’) ne 0) res56 "11, 7.75"/;
2275 PUT$(f.l(’14’) ne 0) res56 " "/;
2276
![Page 65: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/65.jpg)
model.lst Fri Aug 20 07:36:53 2021 65
2277 ***Splitter 7
2278 PUT$(f.l(’14’) ne 0) res56 "13.5, 7.75"/;
2279 PUT$(f.l(’14’) ne 0) res56 "14, 8.75"/;
2280 PUT$(f.l(’14’) ne 0) res56 "14.5, 7.75"/;
![Page 66: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/66.jpg)
model.lst Fri Aug 20 07:36:53 2021 66
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 44
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2281 PUT$(f.l(’14’) ne 0) res56 "13.5, 7.75"/;
2282 PUT$(f.l(’14’) ne 0) res56 " "/;
2283
2284 ********3 System line************************
2285 if ((f.l(’3’) eq 0),
2286 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 "1.5, 6"/;
2287 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 "1.6, 6"/;
2288 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 " "/;
2289 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 "1.7, 6"/;
2290 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 "1.8, 6"/;
2291 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 " "/;
2292 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 "1.9, 6"/;
2293 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 "2, 6"/;
2294 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 "1.9, 6.045"/;
2295 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 " "/;
2296 PUT$((f.l(’123’) ne 0) or (f.l(’523’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) o
r (f.l(’343’) ne 0)) res56 "1.9, 5.951"/;
2297 );
2298
2299
2300 **Mixer 3
2301 PUT$(f.l(’31’) ne 0) res56 "2, 6"/;
2302 PUT$(f.l(’31’) ne 0) res56 "2.5, 6.5"/;
2303 PUT$(f.l(’31’) ne 0) res56 "3, 6"/;
2304 PUT$(f.l(’31’) ne 0) res56 "2.5, 5.5"/;
2305 PUT$(f.l(’31’) ne 0) res56 "2, 6"/;
2306 PUT$(f.l(’31’) ne 0) res56 " "/;
2307
2308 **Process 3
2309 PUT$(f.l(’31’) ne 0) res56 "4.5, 5.5"/;
2310 PUT$(f.l(’31’) ne 0) res56 "4.5, 6.5"/;
2311 PUT$(f.l(’31’) ne 0) res56 "5.8, 6.5"/;
2312 PUT$(f.l(’31’) ne 0) res56 "5.8, 5.5"/;
2313 PUT$(f.l(’31’) ne 0) res56 "4.5, 5.5"/;
2314 PUT$(f.l(’31’) ne 0) res56 " "/;
2315
2316 **Splitter 4
2317 PUT$(f.l(’31’) ne 0) res56 "7, 5.5"/;
2318 PUT$(f.l(’31’) ne 0) res56 "7.5, 6.5"/;
2319 PUT$(f.l(’31’) ne 0) res56 "8, 5.5"/;
2320 PUT$(f.l(’31’) ne 0) res56 "7, 5.5"/;
2321 PUT$(f.l(’31’) ne 0) res56 " "/;
2322
2323 ***Mixer 7
2324 PUT$(f.l(’23’) ne 0) res56 "9, 6"/;
2325 PUT$(f.l(’23’) ne 0) res56 "9.5, 6.5"/;
![Page 67: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/67.jpg)
model.lst Fri Aug 20 07:36:53 2021 67
2326 PUT$(f.l(’23’) ne 0) res56 "10, 6"/;
2327 PUT$(f.l(’23’) ne 0) res56 "9.5, 5.5"/;
2328 PUT$(f.l(’23’) ne 0) res56 "9, 6"/;
2329 PUT$(f.l(’23’) ne 0) res56 " "/;
2330
2331 ***Treatment 2
2332 PUT$(f.l(’23’) ne 0) res56 "11, 5.5"/;
2333 PUT$(f.l(’23’) ne 0) res56 "11, 6.5"/;
![Page 68: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/68.jpg)
model.lst Fri Aug 20 07:36:53 2021 68
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 45
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2334 PUT$(f.l(’23’) ne 0) res56 "12.4, 6.5"/;
2335 PUT$(f.l(’23’) ne 0) res56 "12.4, 5.5"/;
2336 PUT$(f.l(’23’) ne 0) res56 "11, 5.5"/;
2337 PUT$(f.l(’23’) ne 0) res56 " "/;
2338
2339 **Splitter 8
2340 PUT$(f.l(’23’) ne 0) res56 "13.5, 5.5"/;
2341 PUT$(f.l(’23’) ne 0) res56 "14, 6.5"/;
2342 PUT$(f.l(’23’) ne 0) res56 "14.5, 5.5"/;
2343 PUT$(f.l(’23’) ne 0) res56 "13.5, 5.5"/;
2344 PUT$(f.l(’23’) ne 0) res56 " "/;
2345
2346 *** 4 System line**************************
2347 if ((f.l(’4’) eq 0),
2348 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 "1.5, 3.75"/;
2349 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 "1.6, 3.75"/;
2350 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 " "/;
2351 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 "1.7, 3.75"/;
2352 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 "1.8, 3.75"/;
2353 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 " "/;
2354 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 "1.9, 3.75"/;
2355 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 "2, 3.75"/;
2356 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 "1.9, 3.795"/;
2357 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 " "/;
2358 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) o
r (f.l(’344’) ne 0)) res56 "1.9, 3.701"/;
2359 );
2360 **Mixer 4
2361 PUT$(f.l(’41’) ne 0) res56 "2, 3.75"/;
2362 PUT$(f.l(’41’) ne 0) res56 "2.5, 4.25"/;
2363 PUT$(f.l(’41’) ne 0) res56 "3, 3.75"/;
2364 PUT$(f.l(’41’) ne 0) res56 "2.5, 3.25"/;
2365 PUT$(f.l(’41’) ne 0) res56 "2, 3.75"/;
2366 PUT$(f.l(’41’) ne 0) res56 " "/;
2367
2368 ***Process 4
2369 PUT$(f.l(’42’) ne 0) res56 "4.5, 3.25"/;
2370 PUT$(f.l(’42’) ne 0) res56 "4.5, 4.25"/;
2371 PUT$(f.l(’42’) ne 0) res56 "5.8, 4.25"/;
2372 PUT$(f.l(’42’) ne 0) res56 "5.8, 3.25"/;
2373 PUT$(f.l(’42’) ne 0) res56 "4.5, 3.25"/;
2374 PUT$(f.l(’42’) ne 0) res56 " "/;
2375
2376 ****Splitter 5
2377 PUT$(f.l(’42’) ne 0) res56 "7, 3.25"/;
2378 PUT$(f.l(’42’) ne 0) res56 "7.5, 4.25"/;
![Page 69: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/69.jpg)
model.lst Fri Aug 20 07:36:53 2021 69
2379 PUT$(f.l(’42’) ne 0) res56 "8, 3.25"/;
2380 PUT$(f.l(’42’) ne 0) res56 "7, 3.25"/;
2381 PUT$(f.l(’42’) ne 0) res56 " "/;
2382
2383 ***Mixer 8
2384 PUT$(f.l(’33’) ne 0) res56 "9, 3.75"/;
2385 PUT$(f.l(’33’) ne 0) res56 "9.5, 4.25"/;
2386 PUT$(f.l(’33’) ne 0) res56 "10, 3.75"/;
![Page 70: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/70.jpg)
model.lst Fri Aug 20 07:36:53 2021 70
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 46
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2387 PUT$(f.l(’33’) ne 0) res56 "9.5, 3.25"/;
2388 PUT$(f.l(’33’) ne 0) res56 "9, 3.75"/;
2389 PUT$(f.l(’33’) ne 0) res56 " "/;
2390
2391 ***Treatment 3
2392 PUT$(f.l(’33’) ne 0) res56 "11, 3.25"/;
2393 PUT$(f.l(’33’) ne 0) res56 "11, 4.25"/;
2394 PUT$(f.l(’33’) ne 0) res56 "12.4, 4.25"/;
2395 PUT$(f.l(’33’) ne 0) res56 "12.4, 3.25"/;
2396 PUT$(f.l(’33’) ne 0) res56 "11, 3.25"/;
2397 PUT$(f.l(’33’) ne 0) res56 " "/;
2398
2399 ***Splitter 9
2400 PUT$(f.l(’33’) ne 0) res56 "13.5, 3.25"/;
2401 PUT$(f.l(’33’) ne 0) res56 "14, 4.25"/;
2402 PUT$(f.l(’33’) ne 0) res56 "14.5, 3.25"/;
2403 PUT$(f.l(’33’) ne 0) res56 "13.5, 3.25"/;
2404 PUT$(f.l(’33’) ne 0) res56 " "/;
2405
2406 ***5 System line******************
2407 if ((f.l(’5’) eq 0),
2408 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 "1.5, 1.5"/;
2409 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 "1.6, 1.5"/;
2410 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 " "/;
2411 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 "1.7, 1.5"/;
2412 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 "1.8, 1.5"/;
2413 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 " "/;
2414 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 "1.9, 1.5"/;
2415 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 "2, 1.5"/;
2416 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 "1.9, 1.545"/;
2417 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 " "/;
2418 PUT$((f.l(’125’) ne 0) or (f.l(’225’) ne 0) or (f.l(’325’) ne 0) or (f.l(’145’) ne 0) or
(f.l(’245’) ne 0) or (f.l(’345’) ne 0)) res56 "1.9, 1.451"/;
2419 );
2420 **Mixer 5
2421 PUT$(f.l(’51’) ne 0) res56 "2, 1.5"/;
2422 PUT$(f.l(’51’) ne 0) res56 "2.5, 2"/;
2423 PUT$(f.l(’51’) ne 0) res56 "3, 1.5"/;
2424 PUT$(f.l(’51’) ne 0) res56 "2.5, 1"/;
2425 PUT$(f.l(’51’) ne 0) res56 "2, 1.5"/;
2426 PUT$(f.l(’51’) ne 0) res56 " "/;
2427
2428 ***Process 5
2429 PUT$(f.l(’51’) ne 0) res56 "4.5, 1"/;
2430 PUT$(f.l(’51’) ne 0) res56 "4.5, 2"/;
2431 PUT$(f.l(’51’) ne 0) res56 "5.8, 2"/;
![Page 71: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/71.jpg)
model.lst Fri Aug 20 07:36:53 2021 71
2432 PUT$(f.l(’51’) ne 0) res56 "5.8, 1"/;
2433 PUT$(f.l(’51’) ne 0) res56 "4.5, 1"/;
2434 PUT$(f.l(’51’) ne 0) res56 " "/;
2435
2436 ****Splitter 6
2437 PUT$(f.l(’51’) ne 0) res56 "7, 1"/;
2438 PUT$(f.l(’51’) ne 0) res56 "7.5, 2"/;
2439 PUT$(f.l(’51’) ne 0) res56 "8, 1"/;
![Page 72: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/72.jpg)
model.lst Fri Aug 20 07:36:53 2021 72
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 47
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2440 PUT$(f.l(’51’) ne 0) res56 "7, 1"/;
2441 PUT$(f.l(’51’) ne 0) res56 " "/;
2442
2443
2444 ************shared units
2445 File res30 /FMIXER/;
2446 PUT res30 "15.5, 6"/;
2447 PUT res30 "16, 6.5"/;
2448 PUT res30 "16.5, 6"/;
2449 PUT res30 "16, 5.5"/;
2450 PUT res30 "15.5, 6"/;
2451
2452 ** reference shapes
2453 PUT res30 " "/;
2454 PUT res30 "0.5, 13"/;
2455 PUT res30 "1, 13.5"/;
2456 PUT res30 "1.5, 13"/;
2457 PUT res30 "1, 12.5"/;
2458 PUT res30 "0.5, 13"/;
2459 PUT res30 " "/;
2460
2461 PUT res30 "4.5, 12.5"/;
2462 PUT res30 "4.5, 13.5"/;
2463 PUT res30 "5.8, 13.5"/;
2464 PUT res30 "5.8, 12.5"/;
2465 PUT res30 "4.5, 12.5"/;
2466 PUT res30 " "/;
2467
2468 PUT res30 "9, 12.5"/;
2469 PUT res30 "9.5, 13.5"/;
2470 PUT res30 "10, 12.5"/;
2471 PUT res30 "9, 12.5"/;
2472 PUT res30 " "/;
2473
2474 PUT res30 "13, 12.5"/;
2475 PUT res30 "13, 13.5"/;
2476 PUT res30 "14.4, 13.5"/;
2477 PUT res30 "14.4, 12.5"/;
2478 PUT res30 "13, 12.5"/;
2479
2480 File res42 /SPLITTER2/;
2481 PUT res42 "-0.5, 5.5"/;
2482 PUT res42 "0, 6.5"/;
2483 PUT res42 "0.5, 5.5"/;
2484 PUT res42 "-0.5, 5.5"/;
2485
2486 File res51 /TREATMENT3/;
2487 if ((f.l(’3’) eq 0),
2488 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 "1.5, 3"/;
2489 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 "1.6, 3"/;
2490 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 " "/;
2491 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 "1.7, 3"/;
![Page 73: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/73.jpg)
model.lst Fri Aug 20 07:36:53 2021 73
2492 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 "1.8, 3"/;
![Page 74: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/74.jpg)
model.lst Fri Aug 20 07:36:53 2021 74
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 48
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2493 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 " "/;
2494 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 "1.9, 3"/;
2495 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 "2, 3"/;
2496 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 "1.9, 3.045"/;
2497 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 " "/;
2498 PUT$((f.l(’123’) ne 0) or (f.l(’143’) ne 0) or (f.l(’243’) ne 0) or (f.l(’343’) ne 0)) r
es51 "1.9, 2.951"/;
2499 );
2500
2501 PUT$(f.l(’31’) ne 0) res51 "2, 3"/;
2502 PUT$(f.l(’31’) ne 0) res51 "2.5, 3.5"/;
2503 PUT$(f.l(’31’) ne 0) res51 "3, 3"/;
2504 PUT$(f.l(’31’) ne 0) res51 "2.5, 2.5"/;
2505 PUT$(f.l(’31’) ne 0) res51 "2, 3"/;
2506 PUT$(f.l(’31’) ne 0) res51 " "/;
2507
2508 PUT$(f.l(’32’) ne 0) res51 "4.5, 2.5"/;
2509 PUT$(f.l(’32’) ne 0) res51 "4.5, 3.5"/;
2510 PUT$(f.l(’32’) ne 0) res51 "5.8, 3.5"/;
2511 PUT$(f.l(’32’) ne 0) res51 "5.8, 2.5"/;
2512 PUT$(f.l(’32’) ne 0) res51 "4.5, 2.5"/;
2513 PUT$(f.l(’32’) ne 0) res51 " "/;
2514
2515 PUT$(f.l(’32’) ne 0) res51 "7, 2.5"/;
2516 PUT$(f.l(’32’) ne 0) res51 "7.5, 3.5"/;
2517 PUT$(f.l(’32’) ne 0) res51 "8, 2.5"/;
2518 PUT$(f.l(’32’) ne 0) res51 "7, 2.5"/;
2519 PUT$(f.l(’32’) ne 0) res51 " "/;
2520
2521 PUT$(f.l(’33’) ne 0) res51 "9, 3"/;
2522 PUT$(f.l(’33’) ne 0) res51 "9.5, 3.5"/;
2523 PUT$(f.l(’33’) ne 0) res51 "10, 3"/;
2524 PUT$(f.l(’33’) ne 0) res51 "9.5, 2.5"/;
2525 PUT$(f.l(’33’) ne 0) res51 "9, 3"/;
2526 PUT$(f.l(’33’) ne 0) res51 " "/;
2527
2528 PUT$(f.l(’34’) ne 0) res51 "11, 2.5"/;
2529 PUT$(f.l(’34’) ne 0) res51 "11, 3.5"/;
2530 PUT$(f.l(’34’) ne 0) res51 "12.4, 3.5"/;
2531 PUT$(f.l(’34’) ne 0) res51 "12.4, 2.5"/;
2532 PUT$(f.l(’34’) ne 0) res51 "11, 2.5"/;
2533 PUT$(f.l(’34’) ne 0) res51 " "/;
2534
2535
2536 PUT$(f.l(’34’) ne 0) res51 "13.5, 2.5"/;
2537 PUT$(f.l(’34’) ne 0) res51 "14, 3.5"/;
2538 PUT$(f.l(’34’) ne 0) res51 "14.5, 2.5"/;
2539 PUT$(f.l(’34’) ne 0) res51 "13.5, 2.5"/;
2540
2541
2542 File res52 /TREATMENT2/;
![Page 75: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/75.jpg)
model.lst Fri Aug 20 07:36:53 2021 75
2543 if ((f.l(’2’) eq 0),
2544 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 "1.5, 6"/;
2545 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 "1.6, 6"/;
![Page 76: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/76.jpg)
model.lst Fri Aug 20 07:36:53 2021 76
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 49
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2546 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 " "/;
2547 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 "1.7, 6"/;
2548 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 "1.8, 6"/;
2549 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 " "/;
2550 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 "1.9, 6"/;
2551 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 "2, 6"/;
2552 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 "1.9, 6.045"/;
2553 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 " "/;
2554 PUT$((f.l(’422’) ne 0) or (f.l(’142’) ne 0) or (f.l(’242’) ne 0) or (f.l(’342’) ne 0)) r
es52 "1.9, 5.951"/;
2555 );
2556 PUT$(f.l(’21’) ne 0) res52 "2, 6"/;
2557 PUT$(f.l(’21’) ne 0) res52 "2.5, 6.5"/;
2558 PUT$(f.l(’21’) ne 0) res52 "3, 6"/;
2559 PUT$(f.l(’21’) ne 0) res52 "2.5, 5.5"/;
2560 PUT$(f.l(’21’) ne 0) res52 "2, 6"/;
2561 PUT$(f.l(’21’) ne 0) res52 " "/;
2562
2563 PUT$(f.l(’22’) ne 0) res52 "4.5, 5.5"/;
2564 PUT$(f.l(’22’) ne 0) res52 "4.5, 6.5"/;
2565 PUT$(f.l(’22’) ne 0) res52 "5.8, 6.5"/;
2566 PUT$(f.l(’22’) ne 0) res52 "5.8, 5.5"/;
2567 PUT$(f.l(’22’) ne 0) res52 "4.5, 5.5"/;
2568 PUT$(f.l(’22’) ne 0) res52 " "/;
2569
2570 PUT$(f.l(’22’) ne 0) res52 "7, 5.5"/;
2571 PUT$(f.l(’22’) ne 0) res52 "7.5, 6.5"/;
2572 PUT$(f.l(’22’) ne 0) res52 "8, 5.5"/;
2573 PUT$(f.l(’22’) ne 0) res52 "7, 5.5"/;
2574 PUT$(f.l(’22’) ne 0) res52 " "/;
2575
2576 PUT$(f.l(’23’) ne 0) res52 "9, 6"/;
2577 PUT$(f.l(’23’) ne 0) res52 "9.5, 6.5"/;
2578 PUT$(f.l(’23’) ne 0) res52 "10, 6"/;
2579 PUT$(f.l(’23’) ne 0) res52 "9.5, 5.5"/;
2580 PUT$(f.l(’23’) ne 0) res52 "9, 6"/;
2581 PUT$(f.l(’23’) ne 0) res52 " "/;
2582
2583 PUT$(f.l(’24’) ne 0) res52 "11, 5.5"/;
2584 PUT$(f.l(’24’) ne 0) res52 "11, 6.5"/;
2585 PUT$(f.l(’24’) ne 0) res52 "12.4, 6.5"/;
2586 PUT$(f.l(’24’) ne 0) res52 "12.4, 5.5"/;
2587 PUT$(f.l(’24’) ne 0) res52 "11, 5.5"/;
2588 PUT$(f.l(’24’) ne 0) res52 " "/;
2589
2590
2591 PUT$(f.l(’24’) ne 0) res52 "13.5, 5.5"/;
2592 PUT$(f.l(’24’) ne 0) res52 "14, 6.5"/;
![Page 77: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/77.jpg)
model.lst Fri Aug 20 07:36:53 2021 77
2593 PUT$(f.l(’24’) ne 0) res52 "14.5, 5.5"/;
2594 PUT$(f.l(’24’) ne 0) res52 "13.5, 5.5"/;
2595 PUT$(f.l(’24’) ne 0) res52 " "/;
2596
2597
2598
![Page 78: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/78.jpg)
model.lst Fri Aug 20 07:36:53 2021 78
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 50
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2599 File res53 /TREATMENT1/;
2600 *Feed
2601 if ((f.l(’1’) eq 0),
2602 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 "1.5, 9"/;
2603 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 "1.6, 9"/;
2604 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 " "/;
2605 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 "1.7, 9"/;
2606 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 "1.8, 9"/;
2607 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 " "/;
2608 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 "1.9, 9"/;
2609 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 "2, 9"/;
2610 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 "1.9, 9.045"/;
2611 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 " "/;
2612 PUT$((f.l(’321’) ne 0) or (f.l(’421’) ne 0) or (f.l(’141’) ne 0) or (f.l(’241’) ne 0) or
(f.l(’341’) ne 0)) res53 "1.9, 8.951"/;
2613 );
2614 *Mixer
2615 PUT$(f.l(’11’) ne 0) res53 "2, 9"/;
2616 PUT$(f.l(’11’) ne 0) res53 "2.5, 9.5"/;
2617 PUT$(f.l(’11’) ne 0) res53 "3, 9"/;
2618 PUT$(f.l(’11’) ne 0) res53 "2.5, 8.5"/;
2619 PUT$(f.l(’11’) ne 0) res53 "2, 9"/;
2620 PUT$(f.l(’11’) ne 0) res53 " "/;
2621 *Process Unit
2622 PUT$(f.l(’12’) ne 0) res53 "4.5, 8.5"/;
2623 PUT$(f.l(’12’) ne 0) res53 "4.5, 9.5"/;
2624 PUT$(f.l(’12’) ne 0) res53 "5.8, 9.5"/;
2625 PUT$(f.l(’12’) ne 0) res53 "5.8, 8.5"/;
2626 PUT$(f.l(’12’) ne 0) res53 "4.5, 8.5"/;
2627 PUT$(f.l(’12’) ne 0) res53 " "/;
2628 *Splitter
2629 PUT$(f.l(’12’) ne 0) res53 "7, 8.5"/;
2630 PUT$(f.l(’12’) ne 0) res53 "7.5, 9.5"/;
2631 PUT$(f.l(’12’) ne 0) res53 "8, 8.5"/;
2632 PUT$(f.l(’12’) ne 0) res53 "7, 8.5"/;
2633 PUT$(f.l(’12’) ne 0) res53 " "/;
2634 *Mixer
2635 PUT$(f.l(’13’) ne 0) res53 "9, 9"/;
2636 PUT$(f.l(’13’) ne 0) res53 "9.5, 9.5"/;
2637 PUT$(f.l(’13’) ne 0) res53 "10, 9"/;
2638 PUT$(f.l(’13’) ne 0) res53 "9.5, 8.5"/;
2639 PUT$(f.l(’13’) ne 0) res53 "9, 9"/;
2640 PUT$(f.l(’13’) ne 0) res53 " "/;
2641 *Treatment
2642 PUT$(f.l(’14’) ne 0) res53 "11, 8.5"/;
2643 PUT$(f.l(’14’) ne 0) res53 "11, 9.5"/;
![Page 79: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/79.jpg)
model.lst Fri Aug 20 07:36:53 2021 79
2644 PUT$(f.l(’14’) ne 0) res53 "12.4, 9.5"/;
2645 PUT$(f.l(’14’) ne 0) res53 "12.4, 8.5"/;
2646 PUT$(f.l(’14’) ne 0) res53 "11, 8.5"/;
2647 PUT$(f.l(’14’) ne 0) res53 " "/;
2648 *Splitter
2649 PUT$(f.l(’14’) ne 0) res53 "13.5, 8.5"/;
2650 PUT$(f.l(’14’) ne 0) res53 "14, 9.5"/;
2651 PUT$(f.l(’14’) ne 0) res53 "14.5, 8.5"/;
![Page 80: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/80.jpg)
model.lst Fri Aug 20 07:36:53 2021 80
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 51
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2652 PUT$(f.l(’14’) ne 0) res53 "13.5, 8.5"/;
2653
2654
2655 File res55 /TREATMENT4/;
2656 if ((f.l(’4’) eq 0),
2657 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 "1.5, 0.5"/;
2658 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 "1.6, 0.5"/;
2659 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 " "/;
2660 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 "1.7, 0.5"/;
2661 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 "1.8, 0.5"/;
2662 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 " "/;
2663 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 "1.9, 0.5"/;
2664 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 "2, 0.5"/;
2665 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 "1.9, 0.545"/;
2666 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 " "/;
2667 PUT$((f.l(’124’) ne 0) or (f.l(’224’) ne 0) or (f.l(’144’) ne 0) or (f.l(’244’) ne 0) or
(f.l(’344’) ne 0)) res55 "1.9, 0.451"/;
2668 );
2669
2670 PUT$(f.l(’41’) ne 0) res55 "2, 0.5"/;
2671 PUT$(f.l(’41’) ne 0) res55 "2.5, 1"/;
2672 PUT$(f.l(’41’) ne 0) res55 "3, 0.5"/;
2673 PUT$(f.l(’41’) ne 0) res55 "2.5, 0"/;
2674 PUT$(f.l(’41’) ne 0) res55 "2, 0.5"/;
2675 PUT$(f.l(’41’) ne 0) res55 " "/;
2676
2677 PUT$(f.l(’42’) ne 0) res55 "4.5, 0"/;
2678 PUT$(f.l(’42’) ne 0) res55 "4.5, 1"/;
2679 PUT$(f.l(’42’) ne 0) res55 "5.8, 1"/;
2680 PUT$(f.l(’42’) ne 0) res55 "5.8, 0"/;
2681 PUT$(f.l(’42’) ne 0) res55 "4.5, 0"/;
2682 PUT$(f.l(’42’) ne 0) res55 " "/;
2683
2684 PUT$(f.l(’42’) ne 0) res55 "7, 0"/;
2685 PUT$(f.l(’42’) ne 0) res55 "7.5, 1"/;
2686 PUT$(f.l(’42’) ne 0) res55 "8, 0"/;
2687 PUT$(f.l(’42’) ne 0) res55 "7, 0"/;
2688
2689
2690 File res1222 /stream2/;
2691 PUT res1222 "-1.5, 6"/;
2692 PUT res1222 "-0.3, 6"/;
2693
2694 file res1000 /arrows.inc/;
2695
2696 PUT res1000 "if ((card(p) eq 2) or (card(p) eq 3) or (card(p) eq 4),"/;
![Page 81: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/81.jpg)
model.lst Fri Aug 20 07:36:53 2021 81
2697 *feed to mixers
2698 PUT$(f.l(’1’) ne 0) res1000 "PUT RES223 ’set arrow from 0.25,6 to 2.3,8.7 lt 15’/; "/;
2699 PUT$(f.l(’2’) ne 0) res1000 "PUT RES223 ’set arrow from 0.25,6 to 2,6 lt 15’/; "/;
2700 PUT$(f.l(’3’) ne 0) res1000 "PUT RES223 ’set arrow from 0.25,6 to 2.3,3.3 lt 15’/; "/;
2701 PUT$(f.l(’4’) ne 0) res1000 "PUT RES223 ’set arrow from 0.5,5.5 to 2.3,0.8 lt 15’/; "/;
2702 *mixer a process
2703 PUT$(f.l(’11’) ne 0) res1000 "PUT RES223 ’set arrow from 3,9 to 4.5,9 lt 15’/; "/;
2704 PUT$(f.l(’21’) ne 0) res1000 "PUT RES223 ’set arrow from 3,6 to 4.5,6 lt 15’/; "/;
![Page 82: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/82.jpg)
model.lst Fri Aug 20 07:36:53 2021 82
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 52
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2705 PUT$(f.l(’31’) ne 0) res1000 "PUT RES223 ’set arrow from 3,3 to 4.5,3 lt 15’/; "/;
2706 PUT$(f.l(’41’) ne 0) res1000 "PUT RES223 ’set arrow from 3,0.5 to 4.5,0.5 lt 15’/; "/;
2707 *process to splitters
2708 PUT$(f.l(’12’) ne 0) res1000 "PUT RES223 ’set arrow from 5.8,9 to 7.2,9 lt 15’/; "/;
2709 PUT$(f.l(’22’) ne 0) res1000 "PUT RES223 ’set arrow from 5.8,6 to 7.2,6 lt 15’/; "/;
2710 PUT$(f.l(’32’) ne 0) res1000 "PUT RES223 ’set arrow from 5.8,3 to 7.2,3 lt 15’/; "/;
2711 PUT$(f.l(’42’) ne 0) res1000 "PUT RES223 ’set arrow from 5.8,0.5 to 7.2,0.5 lt 15’/; "/;
2712 *Mixers to treatments
2713 PUT$(f.l(’13’) ne 0) res1000 "PUT RES223 ’set arrow from 10,9 to 11,9 lt 15’/; "/;
2714 PUT$(f.l(’23’) ne 0) res1000 "PUT RES223 ’set arrow from 10,6 to 11,6 lt 15’/; "/;
2715 PUT$(f.l(’33’) ne 0) res1000 "PUT RES223 ’set arrow from 10,3 to 11,3 lt 15’/; "/;
2716 *Treatments to splitters
2717 PUT$(f.l(’14’) ne 0) res1000 "PUT RES223 ’set arrow from 12.4,9 to 13.7,9 lt 15’/; "/;
2718 PUT$(f.l(’24’) ne 0) res1000 "PUT RES223 ’set arrow from 12.4,6 to 13.7,6 lt 15’/; "/;
2719 PUT$(f.l(’34’) ne 0) res1000 "PUT RES223 ’set arrow from 12.4,3 to 13.7,3 lt 15’/; "/;
2720
2721 *splitter 2 mix2
2722 PUT$(f.l(’122’) ne 0) res1000 "PUT RES223 ’set arrow from 7,8.5 to 2.7,6.3 lt 15’/; "/;
2723 *splitter 2 a mx3
2724 PUT$(f.l(’123’) ne 0) res1000 "PUT RES223 ’set arrow from 7.35,9.2 to 6.88,10 lt 1’/; "/
;
2725 *splitter 2 mix4
2726 PUT$(f.l(’124’) ne 0) res1000 "PUT RES223 ’set arrow from 7.5,9.5 to 7.5,10.4 lt 1’/; "/
;
2727 *splitter 2 a mx5
2728 PUT$(f.l(’126’) ne 0) res1000 "PUT RES223 ’set arrow from 7.75,9 to 9,9 lt 15’/; "/;
2729 *splitter 2 mix 6
2730 PUT$(f.l(’127’) ne 0) res1000 "PUT RES223 ’set arrow from 7.9,8.7 to 8.7,8.3 lt 15’/; "/
;
2731 PUT$(f.l(’127’) ne 0) res1000 "PUT RES223 ’set arrow from 8.7,8.3 to 9.3,6.3 lt 15’/; "/
;
2732 *splitter 2 a mx7
2733 PUT$(f.l(’128’) ne 0) res1000 "PUT RES223 ’set arrow from 7.7,9.2 to 8.12,10 lt 1’/; "/;
2734 *splitter 2 a mx8
2735 PUT$(f.l(’129’) ne 0) res1000 "PUT RES223 ’set arrow from 7.5,8.5 to 7.5,7.9 lt 1’/; "/;
2736
2737 *splitter 3 to mix 1
2738 PUT$(f.l(’221’) ne 0) res1000 "PUT RES223 ’set arrow from 7.35,6.2 to 2.7,8.7 lt 15’/; "
/;
2739 *splitter 3 to mix 3
2740 PUT$(f.l(’223’) ne 0) res1000 "PUT RES223 ’set arrow from 7,5.5 to 2.7,3.3 lt 15’/; "/;
2741 *splitter 3 mix 5
2742 PUT$(f.l(’226’) ne 0) res1000 "PUT RES223 ’set arrow from 7.65,6.2 to 8.7,6.7 lt 15’/; "
/;
2743 PUT$(f.l(’226’) ne 0) res1000 "PUT RES223 ’set arrow from 8.7,6.7 to 9.3,8.7 lt 15’/; "/
;
2744 *splitter 3 al mixer 6
2745 PUT$(f.l(’227’) ne 0) res1000 "PUT RES223 ’set arrow from 7.76,6 to 9,6 lt 15’/; "/;
2746 *splitter 3 mix 7
2747 PUT$(f.l(’228’) ne 0) res1000 "PUT RES223 ’set arrow from 7.9,5.7 to 8.7,5.3 lt 15’/; "/
;
2748 PUT$(f.l(’228’) ne 0) res1000 "PUT RES223 ’set arrow from 8.7,5.3 to 9.3,3.3 lt 15’/; "/
;
2749 *splitter 3 to mix 4
2750 PUT$(f.l(’224’) ne 0) res1000 "PUT RES223 ’set arrow from 7.4,6.3 to 7,6.9 lt 1’/; "/;
2751 *splitter 3 to mix 8
![Page 83: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/83.jpg)
model.lst Fri Aug 20 07:36:53 2021 83
2752 PUT$(f.l(’229’) ne 0) res1000 "PUT RES223 ’set arrow from 7.6,6.3 to 8.02,6.9 lt 1’/; "/
;
2753
2754 *splitter 4 to mix 1
2755 PUT$(f.l(’321’) ne 0) res1000 "PUT RES223 ’set arrow from 7.4,3.3 to 7,3.9 lt 1’/; "/;
2756 *splitter 4 to mix 2
2757 PUT$(f.l(’322’) ne 0) res1000 "PUT RES223 ’set arrow from 7.32,3.2 to 2.7,5.7 lt 15’/; "
/;
![Page 84: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/84.jpg)
model.lst Fri Aug 20 07:36:53 2021 84
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 53
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2758 *splitter 4 to mix 4
2759 PUT$(f.l(’324’) ne 0) res1000 "PUT RES223 ’set arrow from 7,2.5 to 2.7,0.8 lt 15’/; "/;
2760 *splitter 4 to mix 5
2761 PUT$(f.l(’326’) ne 0) res1000 "PUT RES223 ’set arrow from 7.5,3.5 to 7.5,4.4 lt 1’/; "/;
2762 *splitter 4 to mix 6
2763 PUT$(f.l(’327’) ne 0) res1000 "PUT RES223 ’set arrow from 7.65,3.2 to 8.7,3.7 lt 15’/; "
/;
2764 PUT$(f.l(’327’) ne 0) res1000 "PUT RES223 ’set arrow from 8.7,3.7 to 9.3,5.7 lt 15’/; "/
;
2765 *splitter 4 to mix 7
2766 PUT$(f.l(’328’) ne 0) res1000 "PUT RES223 ’set arrow from 7.76,3 to 9,3 lt 1’/; "/;
2767 *splitter 4 to mix 8
2768 PUT$(f.l(’329’) ne 0) res1000 "PUT RES223 ’set arrow from 7.6,3.3 to 8.02,3.9 lt 1’/; "/
;
2769
2770 *splitter 5
2771 PUT$(f.l(’421’) ne 0) res1000 "PUT RES223 ’set arrow from 7.4,0.8 to 7,1.4 lt 1’/; "/;
2772 PUT$(f.l(’422’) ne 0) res1000 "PUT RES223 ’set arrow from 7.5,1 to 7.5,1.7 lt 1’/; "/;
2773 PUT$(f.l(’423’) ne 0) res1000 "PUT RES223 ’set arrow from 7.32,0.7 to 2.7,2.7 lt 15’/; "
/;
2774 PUT$(f.l(’426’) ne 0) res1000 "PUT RES223 ’set arrow from 7.6,0.8 to 8.02,1.4 lt 1’/; "/
;
2775 PUT$(f.l(’427’) ne 0) res1000 "PUT RES223 ’set arrow from 7.88,0.3 to 8.9,0.1 lt 1’/; "/
;
2776 PUT$(f.l(’428’) ne 0) res1000 "PUT RES223 ’set arrow from 7.7,0.65 to 8.7,0.95 lt 1’/; "
/;
2777 PUT$(f.l(’428’) ne 0) res1000 "PUT RES223 ’set arrow from 8.7,0.95 to 9.3,2.7 lt 1’/; "/
;
2778 PUT$(f.l(’429’) ne 0) res1000 "PUT RES223 ’set arrow from 7.76,0.5 to 9,0.5 lt 1’/; "/;
2779
2780 *splitter 6 to mix 1
2781 PUT$(f.l(’141’) ne 0) res1000 "PUT RES223 ’set arrow from 13.88,9.27 to 13.38,10.25 lt 1
’/; "/;
2782 *splitter 6 to mix 2
2783 PUT$(f.l(’142’) ne 0) res1000 "PUT RES223 ’set arrow from 14,9.5 to 14,10.5 lt 1’/; "/;
2784 *splitter 6 to mix 3
2785 PUT$(f.l(’143’) ne 0) res1000 "PUT RES223 ’set arrow from 14.12,9.25 to 14.62,10.25 lt 1
’/; "/;
2786 *splitter 6 to mix 4
2787 PUT$(f.l(’144’) ne 0) res1000 "PUT RES223 ’set arrow from 13.7,8.5 to 13.38,7.9 lt 1’/;
"/;
2788 *splitter 6 to mix 6
2789 PUT$(f.l(’147’) ne 0) res1000 "PUT RES223 ’set arrow from 13.5,8.5 to 9.7,6.3 lt 1’/; "/
;
2790 *splitter 6 to mix 7
2791 PUT$(f.l(’148’) ne 0) res1000 "PUT RES223 ’set arrow from 14.3,8.5 to 14.62,7.9 lt 15’/;
"/;
2792 *splitter 6 to mix discharge
2793 PUT$(f.l(’149’) ne 0) res1000 "PUT RES223 ’set arrow from 14.25,9 to 16,9 lt 15’/; "/;
2794 PUT$(f.l(’149’) ne 0) res1000 "PUT RES223 ’set arrow from 16,9 to 16,6.5 lt 15’/; "/;
2795
2796 *splitter 7 to mix 1
2797 PUT$(f.l(’241’) ne 0) res1000 "PUT RES223 ’set arrow from 14.1,6.3 to 14.52,6.9 lt 1’/;
"/;
2798 *splitter 7 mx2
2799 PUT$(f.l(’242’) ne 0) res1000 "PUT RES223 ’set arrow from 13.8,5.5 to 13.3,4.9 lt 1’/; "
![Page 85: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/85.jpg)
model.lst Fri Aug 20 07:36:53 2021 85
/;
2800 *splitter 7 mx 3
2801 PUT$(f.l(’243’) ne 0) res1000 "PUT RES223 ’set arrow from 14,5.5 to 14,4.75 lt 1’/; "/;
2802 *splitter 7 mix4
2803 PUT$(f.l(’244’) ne 0) res1000 "PUT RES223 ’set arrow from 14.25,5.5 to 14.65,4.9 lt 1’/;
"/;
2804 *splitter 7 to mix5
2805 PUT$(f.l(’246’) ne 0) res1000 "PUT RES223 ’set arrow from 13.9,6.3 to 9.8,8.8 lt 15’/; "
/;
2806 *splitter 7 to mix 7
2807 PUT$(f.l(’248’) ne 0) res1000 "PUT RES223 ’set arrow from 13.5,5.5 to 9.7,3.3 lt 1’/; "/
;
2808 *splitter 7 a mix Discharge
2809 PUT$(f.l(’249’) ne 0) res1000 "PUT RES223 ’set arrow from 14.25,6 to 15.5,6 lt 15’/; "/;
2810
![Page 86: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/86.jpg)
model.lst Fri Aug 20 07:36:53 2021 86
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 54
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2811 *splitter 8 to mix 1
2812 PUT$(f.l(’341’) ne 0) res1000 "PUT RES223 ’set arrow from 14.1,3.3 to 14.52,3.9 lt 1’/;
"/;
2813 *splitter 8 to mix6
2814 PUT$(f.l(’347’) ne 0) res1000 "PUT RES223 ’set arrow from 13.9,3.3 to 9.8,5.8 lt 1’/; "/
;
2815 *splitter 8 to mix discharge
2816 PUT$(f.l(’349’) ne 0) res1000 "PUT RES223 ’set arrow from 14.25,3 to 16,3 lt 15’/; "/;
2817 PUT$(f.l(’349’) ne 0) res1000 "PUT RES223 ’set arrow from 16,3 to 16,5.5 lt 15’/; "/;
2818 *splitter 8 to mix 2
2819 PUT$(f.l(’342’) ne 0) res1000 "PUT RES223 ’set arrow from 13.7,2.5 to 13.38,1.9 lt 1’/;
"/;
2820 *splitter 8 to mix 5
2821 PUT$(f.l(’346’) ne 0) res1000 "PUT RES223 ’set arrow from 14.3,2.5 to 14.62,1.9 lt 1’/;
"/;
2822 *splitter 8 to mix 3
2823 PUT$(f.l(’343’) ne 0) res1000 "PUT RES223 ’set arrow from 13.9,2.5 to 13.7,1.4 lt 1’/; "
/;
2824 *splitter 8 to mix 4
2825 PUT$(f.l(’344’) ne 0) res1000 "PUT RES223 ’set arrow from 14.1,2.5 to 14.3,1.4 lt 1’/; "
/;
2826
2827 *discharge
2828 PUT$(f.l(’fp’) ne 0) res1000 "PUT RES223 ’set arrow from 16.5,6 to 17.6, 6 lt 15’/; "/;
2829 PUT res1000 ");"/;
2830
2831
2832
2833
2834 ***==========================
2835
2836 PUT res1000 "if ((card(p) eq 5),"/;
2837
2838 *mixers to process
2839 PUT$(f.l(’11’) ne 0) res1000 "PUT RES223 ’set arrow from 3,10.5 to 4.5,10.5 lt 15’/; "/;
2840 PUT$(f.l(’21’) ne 0) res1000 "PUT RES223 ’set arrow from 3,8.25 to 4.5,8.25 lt 15’/; "/;
2841 PUT$(f.l(’31’) ne 0) res1000 "PUT RES223 ’set arrow from 3,6 to 4.5,6 lt 15’/; "/;
2842 PUT$(f.l(’41’) ne 0) res1000 "PUT RES223 ’set arrow from 3,3.75 to 4.5,3.75 lt 15’/; "/;
2843 PUT$(f.l(’51’) ne 0) res1000 "PUT RES223 ’set arrow from 3,1.5 to 4.5,1.5 lt 15’/; "/;
2844
2845 *Splitter to mixers
2846 PUT$(f.l(’1’) ne 0) res1000 "PUT RES223 ’set arrow from 0.25,6 to 2.2,10.25 lt 15’/; "/;
2847 PUT$(f.l(’2’) ne 0) res1000 "PUT RES223 ’set arrow from 0.25,6 to 2.2,8 lt 15’/; "/;
2848 PUT$(f.l(’3’) ne 0) res1000 "PUT RES223 ’set arrow from 0.25,6 to 2,6 lt 15’/; "/;
2849 PUT$(f.l(’4’) ne 0) res1000 "PUT RES223 ’set arrow from 0.25,6 to 2.2,4 lt 15’/; "/;
2850 PUT$(f.l(’5’) ne 0) res1000 "PUT RES223 ’set arrow from 0.25,6 to 2.2,1.75 lt 15’/; "/;
2851
2852 *Process to splitters
2853 PUT$(f.l(’11’) ne 0) res1000 "PUT RES223 ’set arrow from 5.8,10.5 to 7.2,10.5 lt 15’/; "
/;
2854 PUT$(f.l(’21’) ne 0) res1000 "PUT RES223 ’set arrow from 5.8,8.25 to 7.2,8.25 lt 15’/; "
/;
2855 PUT$(f.l(’31’) ne 0) res1000 "PUT RES223 ’set arrow from 5.8,6 to 7.2,6 lt 15’/; "/;
2856 PUT$(f.l(’41’) ne 0) res1000 "PUT RES223 ’set arrow from 5.8,3.75 to 7.2,3.75 lt 15’/; "
/;
2857 PUT$(f.l(’51’) ne 0) res1000 "PUT RES223 ’set arrow from 5.8,1.5 to 7.2,1.5 lt 15’/; "/;
![Page 87: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/87.jpg)
model.lst Fri Aug 20 07:36:53 2021 87
2858
2859 ****mix to treatment
2860 PUT$(f.l(’13’) ne 0) res1000 "PUT RES223 ’set arrow from 10,8.25 to 11,8.25 lt 15’/; "/;
2861 PUT$(f.l(’23’) ne 0) res1000 "PUT RES223 ’set arrow from 10,6 to 11,6 lt 15’/; "/;
2862 PUT$(f.l(’33’) ne 0) res1000 "PUT RES223 ’set arrow from 10,3.75 to 11,3.75 lt 15’/; "/;
2863
![Page 88: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/88.jpg)
model.lst Fri Aug 20 07:36:53 2021 88
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 55
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2864 ***treatment to splitter
2865 PUT$(f.l(’14’) ne 0) res1000 "PUT RES223 ’set arrow from 12.4,8.25 to 13.7,8.25 lt 15’/;
"/;
2866 PUT$(f.l(’24’) ne 0) res1000 "PUT RES223 ’set arrow from 12.4,6 to 13.7,6 lt 15’/; "/;
2867 PUT$(f.l(’34’) ne 0) res1000 "PUT RES223 ’set arrow from 12.4,3.75 to 13.7,3.75 lt 15’/;
"/;
2868
2869 ****splitter 2
2870 PUT$(f.l(’122’) ne 0) res1000 "PUT RES223 ’set arrow from 7,10 to 2.7,8.55 lt 15’/; "/;
2871 PUT$(f.l(’123’) ne 0) res1000 "PUT RES223 ’set arrow from 7.32,10.65 to 7,11.05 lt 15’/;
"/;
2872 PUT$(f.l(’124’) ne 0) res1000 "PUT RES223 ’set arrow from 7.65,10.75 to 8.02,11.15 lt 15
’/; "/;
2873 PUT$(f.l(’125’) ne 0) res1000 "PUT RES223 ’set arrow from 7.7,10.65 to 8.52,11 lt 1’/; "
/;
2874 PUT$(f.l(’126’) ne 0) res1000 "PUT RES223 ’set arrow from 8,10 to 9.3,8.55 lt 15’/; "/;
2875 PUT$(f.l(’127’) ne 0) res1000 "PUT RES223 ’set arrow from 7.79,10.5 to 9.3,10.65 lt 15’/
; "/;
2876 PUT$(f.l(’128’) ne 0) res1000 "PUT RES223 ’set arrow from 7.88,10.3 to 9.4,10.1 lt 1’/;
"/;
2877 PUT$(f.l(’129’) ne 0) res1000 "PUT RES223 ’set arrow from 7.95,10.1 to 9.3,9.6 lt 15’/;
"/;
2878
2879 ***splitter 3
2880 PUT$(f.l(’221’) ne 0) res1000 "PUT RES223 ’set arrow from 7.25,8.30 to 2.8,10.25 lt 15’/
; "/;
2881 PUT$(f.l(’223’) ne 0) res1000 "PUT RES223 ’set arrow from 7,7.75 to 2.7,6.3 lt 15’/; "/;
2882 PUT$(f.l(’224’) ne 0) res1000 "PUT RES223 ’set arrow from 7.32,8.40 to 7,8.8 lt 1’/; "/;
2883 PUT$(f.l(’225’) ne 0) res1000 "PUT RES223 ’set arrow from 7.7,8.40 to 8.02,8.8 lt 15’/;
"/;
2884 PUT$(f.l(’226’) ne 0) res1000 "PUT RES223 ’set arrow from 7.75,8.25 to 9,8.25 lt 15’/; "
/;
2885 PUT$(f.l(’227’) ne 0) res1000 "PUT RES223 ’set arrow from 7.79,8.18 to 8.9,7.58 lt 15’/;
"/;
2886 PUT$(f.l(’227’) ne 0) res1000 "PUT RES223 ’set arrow from 8.9,7.58 to 9.3,6.3 lt 15’/; "
/;
2887 PUT$(f.l(’228’) ne 0) res1000 "PUT RES223 ’set arrow from 7.32,7.75 to 7,7.43 lt 1’/; "/
;
2888 PUT$(f.l(’229’) ne 0) res1000 "PUT RES223 ’set arrow from 7.7,7.75 to 8.02,7.43 lt 15’/;
"/;
2889
2890 ******splitter 4
2891 PUT$(f.l(’321’) ne 0) res1000 "PUT RES223 ’set arrow from 7.32,6.15 to 7,6.55 lt 15’/; "
/;
2892 PUT$(f.l(’322’) ne 0) res1000 "PUT RES223 ’set arrow from 7.25,6.05 to 2.8,8 lt 15’/; "/
;
2893 PUT$(f.l(’324’) ne 0) res1000 "PUT RES223 ’set arrow from 7,5.5 to 2.8,4 lt 15’/; "/;
2894 PUT$(f.l(’325’) ne 0) res1000 "PUT RES223 ’set arrow from 7.32,5.5 to 7,5.28 lt 1’/; "/;
2895 PUT$(f.l(’326’) ne 0) res1000 "PUT RES223 ’set arrow from 7.74,6.05 to 8.9,6.67 lt 15’/;
"/;
2896 PUT$(f.l(’326’) ne 0) res1000 "PUT RES223 ’set arrow from 8.9,6.67 to 9.3,7.95 lt 15’/;
"/;
2897 PUT$(f.l(’327’) ne 0) res1000 "PUT RES223 ’set arrow from 7.75,6 to 9,6 lt 15’/; "/;
2898 PUT$(f.l(’328’) ne 0) res1000 "PUT RES223 ’set arrow from 7.8,5.92 to 8.9,5.33 lt 15’/;
"/;
2899 PUT$(f.l(’328’) ne 0) res1000 "PUT RES223 ’set arrow from 8.9,5.33 to 9.3,4.05 lt 15’/;
![Page 89: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/89.jpg)
model.lst Fri Aug 20 07:36:53 2021 89
"/;
2900 PUT$(f.l(’329’) ne 0) res1000 "PUT RES223 ’set arrow from 7.6,5.5 to 7.9,4.95 lt 15’/; "
/;
2901
2902 ***splitter 5
2903 PUT$(f.l(’421’) ne 0) res1000 "PUT RES223 ’set arrow from 7.7,3.90 to 8.02,4.3 lt 15’/;
"/;
2904 PUT$(f.l(’422’) ne 0) res1000 "PUT RES223 ’set arrow from 7.32,3.25 to 7,2.97 lt 15’/; "
/;
2905 PUT$(f.l(’423’) ne 0) res1000 "PUT RES223 ’set arrow from 7.25,3.80 to 2.8,5.75 lt 15’/;
"/;
2906 PUT$(f.l(’425’) ne 0) res1000 "PUT RES223 ’set arrow from 7,3.25 to 2.8,1.65 lt 15’/; "/
;
2907 PUT$(f.l(’426’) ne 0) res1000 "PUT RES223 ’set arrow from 7.5,3.25 to 7.5,2.6 lt 1’/; "/
;
2908 PUT$(f.l(’427’) ne 0) res1000 "PUT RES223 ’set arrow from 7.74,3.80 to 8.9,4.2 lt 15’/;
"/;
2909 PUT$(f.l(’427’) ne 0) res1000 "PUT RES223 ’set arrow from 8.9,4.2 to 9.3,5.7 lt 15’/; "/
;
2910 PUT$(f.l(’428’) ne 0) res1000 "PUT RES223 ’set arrow from 7.75,3.75 to 9,3.75 lt 15’/; "
/;
2911 PUT$(f.l(’429’) ne 0) res1000 "PUT RES223 ’set arrow from 7.7,3.25 to 8.02,2.97 lt 15’/;
"/;
2912
2913 ***splitter 6
2914 PUT$(f.l(’521’) ne 0) res1000 "PUT RES223 ’set arrow from 7.32,1 to 7,0.68 lt 15’/; "/;
2915 PUT$(f.l(’522’) ne 0) res1000 "PUT RES223 ’set arrow from 7.5,1 to 7.5,0.50 lt 1’/; "/;
2916 PUT$(f.l(’523’) ne 0) res1000 "PUT RES223 ’set arrow from 7.7,1 to 8.02,0.68 lt 1’/; "/;
![Page 90: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/90.jpg)
model.lst Fri Aug 20 07:36:53 2021 90
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 56
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n
2917 PUT$(f.l(’524’) ne 0) res1000 "PUT RES223 ’set arrow from 7.25,1.55 to 2.8,3.50 lt 15’/;
"/;
2918 PUT$(f.l(’526’) ne 0) res1000 "PUT RES223 ’set arrow from 7.74,1.51 to 8.9,1.9 lt 15’/;
"/;
2919 PUT$(f.l(’527’) ne 0) res1000 "PUT RES223 ’set arrow from 7.79,1.5 to 9,1.5 lt 15’/; "/;
2920 PUT$(f.l(’528’) ne 0) res1000 "PUT RES223 ’set arrow from 7.72,1.55 to 9.3,3.43 lt 15’/;
"/;
2921 PUT$(f.l(’529’) ne 0) res1000 "PUT RES223 ’set arrow from 7.79,1.4 to 8.9,1.1 lt 15’/; "
/;
2922
2923 **splitter 7
2924 PUT$(f.l(’141’) ne 0) res1000 "PUT RES223 ’set arrow from 13.85,8.45 to 13.3,9.4 lt 15’/
; "/;
2925 PUT$(f.l(’142’) ne 0) res1000 "PUT RES223 ’set arrow from 13.9,8.6 to 13.75,10 lt 1’/; "
/;
2926 PUT$(f.l(’143’) ne 0) res1000 "PUT RES223 ’set arrow from 14.1,8.6 to 14.25,10.2 lt 1’/;
"/;
2927 PUT$(f.l(’144’) ne 0) res1000 "PUT RES223 ’set arrow from 14.14,8.51 to 14.9,9.8 lt 15’/
; "/;
2928 PUT$(f.l(’145’) ne 0) res1000 "PUT RES223 ’set arrow from 14.17,8.45 to 15.2,9.3 lt 15’/
; "/;
2929 PUT$(f.l(’147’) ne 0) res1000 "PUT RES223 ’set arrow from 13.5,7.75 to 9.7,6.3 lt 15’/;
"/;
2930 PUT$(f.l(’148’) ne 0) res1000 "PUT RES223 ’set arrow from 14.23,8.35 to 15.4,8.7 lt 1’/;
"/;
2931 PUT$(f.l(’149’) ne 0) res1000 "PUT RES223 ’set arrow from 14.3,8.25 to 16,8.25 lt 15’/;
"/;
2932 PUT$(f.l(’149’) ne 0) res1000 "PUT RES223 ’set arrow from 16,8.25 to 16,6.5 lt 15’/; "/;
2933
2934 *splitter 8
2935 PUT$(f.l(’241’) ne 0) res1000 "PUT RES223 ’set arrow from 13.9,6.3 to 13.7,7 lt 15’/; "/
;
2936 PUT$(f.l(’242’) ne 0) res1000 "PUT RES223 ’set arrow from 14.1,6.35 to 14.5,7.2 lt 15’/;
"/;
2937 PUT$(f.l(’243’) ne 0) res1000 "PUT RES223 ’set arrow from 14.2,6.2 to 14.8,6.6 lt 15’/;
"/;
2938 PUT$(f.l(’244’) ne 0) res1000 "PUT RES223 ’set arrow from 13.8,5.5 to 13.8,4.95 lt 15’/;
"/;
2939 PUT$(f.l(’245’) ne 0) res1000 "PUT RES223 ’set arrow from 14.2,5.5 to 14.5,4.95 lt 1’/;
"/;
2940 PUT$(f.l(’246’) ne 0) res1000 "PUT RES223 ’set arrow from 13.8,6.1 to 9.8,8 lt 15’/; "/;
2941 PUT$(f.l(’248’) ne 0) res1000 "PUT RES223 ’set arrow from 13.5,5.5 to 9.7,4.05 lt 15’/;
"/;
2942 PUT$(f.l(’249’) ne 0) res1000 "PUT RES223 ’set arrow from 14.3,6 to 15.5,6 lt 15’/; "/;
2943
2944 ******spliter 9
2945 PUT$(f.l(’341’) ne 0) res1000 "PUT RES223 ’set arrow from 13.65,3.25 to 13,2.8 lt 15’/;
"/;
2946 PUT$(f.l(’342’) ne 0) res1000 "PUT RES223 ’set arrow from 13.8,3.25 to 13.2,2.25 lt 1’/;
"/;
2947 PUT$(f.l(’343’) ne 0) res1000 "PUT RES223 ’set arrow from 13.95,3.25 to 13.75,1.8 lt 1’/
; "/;
2948 PUT$(f.l(’344’) ne 0) res1000 "PUT RES223 ’set arrow from 14.05,3.25 to 14.25,1.8 lt 1’/
; "/;
2949 PUT$(f.l(’345’) ne 0) res1000 "PUT RES223 ’set arrow from 14.2,3.25 to 14.8,2.25 lt 1’/;
"/;
![Page 91: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/91.jpg)
model.lst Fri Aug 20 07:36:53 2021 91
2950 PUT$(f.l(’346’) ne 0) res1000 "PUT RES223 ’set arrow from 14.35,3.25 to 14.95,2.8 lt 15’
/; "/;
2951 PUT$(f.l(’347’) ne 0) res1000 "PUT RES223 ’set arrow from 13.8,3.85 to 9.8,5.75 lt 15’/;
"/;
2952 PUT$(f.l(’349’) ne 0) res1000 "PUT RES223 ’set arrow from 14.3,3.75 to 16,3.75 lt 15’/;
"/;
2953 PUT$(f.l(’349’) ne 0) res1000 "PUT RES223 ’set arrow from 16,3.75 to 16,5.5 lt 15’/; "/;
2954
2955 ***Discharge
2956 PUT$(f.l(’fp’) ne 0) res1000 "PUT RES223 ’set arrow from 16.5,6 to 17.6, 6 lt 15’/; "/;
2957
2958 PUT res1000 ");"/;
![Page 92: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/92.jpg)
model.lst Fri Aug 20 07:36:53 2021 92
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 57
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Include File Summary
SEQ GLOBAL TYPE PARENT LOCAL FILENAME
1 1 INPUT 0 0 /var/www/html/interfaces/cgi-bin/waternet/model.gms
2 1 INCLUDE 1 1 ./var/www/html/interfaces/cgi-bin/waternet/ex1.dat
3 6 INCLUDE 2 5 ../var/www/html/interfaces/cgi-bin/waternet/sets.inc
4 163 INCLUDE 1 2 ./var/www/html/interfaces/cgi-bin/waternet/model.inc
5 1176 INCLUDE 1 3 ./var/www/html/interfaces/cgi-bin/waternet/sumres.in
c
6 2068 INCLUDE 5 892 ../var/www/html/interfaces/cgi-bin/waternet/buttons.
inc
COMPILATION TIME = 0.068 SECONDS 3 MB 24.4.1 r50296 LEX-LEG
![Page 93: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/93.jpg)
model.lst Fri Aug 20 07:36:53 2021 93
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 58
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Model Statistics SOLVE water Using NLP From line 1173
MODEL STATISTICS
BLOCKS OF EQUATIONS 10 SINGLE EQUATIONS 79
BLOCKS OF VARIABLES 3 SINGLE VARIABLES 97
NON ZERO ELEMENTS 294 NON LINEAR N-Z 134
DERIVATIVE POOL 20 CONSTANT POOL 22
CODE LENGTH 233
GENERATION TIME = 0.007 SECONDS 4 MB 24.4.1 r50296 LEX-LEG
EXECUTION TIME = 0.013 SECONDS 4 MB 24.4.1 r50296 LEX-LEG
![Page 94: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/94.jpg)
model.lst Fri Aug 20 07:36:53 2021 94
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 59
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Solution Report SOLVE water Using NLP From line 1173
S O L V E S U M M A R Y
MODEL water OBJECTIVE COST
TYPE NLP DIRECTION MINIMIZE
SOLVER BARON FROM LINE 1173
**** SOLVER STATUS 1 Normal Completion
**** MODEL STATUS 2 Locally Optimal
**** OBJECTIVE VALUE 596163.5974
RESOURCE USAGE, LIMIT 0.750 40000.000
ITERATION COUNT, LIMIT 0 2000000000
EVALUATION ERRORS 0 0
GAMS/BARON 24.4.1 r50296 Released Dec 20, 2014 LEG x86 64bit/Linux
BARON is a product of The Optimization Firm, LLC. http://www.minlp.com/
Parts of the BARON software were created at the
University of Illinois at Urbana-Champaign.
Total time elapsed: 000:00:01, in seconds: 0.75
on parsing: 000:00:00, in seconds: 0.02
on preprocessing: 000:00:00, in seconds: 0.06
on navigating: 000:00:00, in seconds: 0.03
on relaxed: 000:00:00, in seconds: 0.22
on local: 000:00:00, in seconds: 0.17
on tightening: 000:00:00, in seconds: 0.01
on marginals: 000:00:00, in seconds: 0.00
on probing: 000:00:00, in seconds: 0.24
on IIS detection: 000:00:00, in seconds: 0.00
Total no. of BaR iterations: 9
Best solution found at node: -1
Max. no. of nodes in memory: 2
Cut generation statistics (number of cuts / CPU sec)
Bilinear 0 0.00
LD-Envelopes 1093 0.00
Multilinears 0 0.00
Convexity 270 0.00
Integrality 0 0.00
All done
===========================================================================
BARON version 14.4.0. Built: LNX-64 Tue Dec 2 07:53:11 EST 2014
If you use this software, please cite:
Tawarmalani, M. and N. V. Sahinidis, A polyhedral
branch-and-cut approach to global optimization,
Mathematical Programming, 103(2), 225-249, 2005.
BARON is a product of The Optimization Firm, LLC. http://www.minlp.com/
![Page 95: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/95.jpg)
model.lst Fri Aug 20 07:36:53 2021 95
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 60
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Solution Report SOLVE water Using NLP From line 1173
Parts of the BARON software were created at the
University of Illinois at Urbana-Champaign.
===========================================================================
This BARON run may utilize the following subsolver(s)
For LP/MIP: ILOG CPLEX
For NLP: MINOS, SNOPT, GAMS external NLP, COIN IPOPT with MUMPS and METIS
===========================================================================
Solution = 596163.597439117 best solution found during preprocessing
Best possible = 578799.609164
Absolute gap = 17363.9882751172 optca = 1E-9
Relative gap = 0.02913 optcr = 0.03
---- EQU SPLFB mass balance, total flowrates
LOWER LEVEL UPPER MARGINAL
S1 .IN . . . 2803.0175
S11 .12 . . . 6.2848571E-6
S21 .22 . . . 2663.2895
SA11.14 . . . -127.0254
SA21.24 . . . 2655.4031
---- EQU SPLCB mass balance, concentrations
LOWER LEVEL UPPER MARGINAL
S1 .1 .a . . . .
S1 .1 .b . . . 2663.2895
S1 .2 .a . . . -127.0254
S1 .2 .b . . . 2803.0175
S11 .121.a . . . .
S11 .121.b . . . .
S11 .122.a . . . .
S11 .122.b . . . 2663.2895
S11 .126.a . . . -127.0254
S11 .126.b . . . 2647.6339
S11 .127.a . . . -131.1933
S11 .127.b . . . 8000.0000
S11 .129.a . . . -62075.4369
S11 .129.b . . . -151999.9924
S21 .221.a . . . .
S21 .221.b . . . -151999.9924
S21 .222.a . . . .
S21 .222.b . . . .
S21 .226.a . . . .
S21 .226.b . . . .
S21 .227.a . . . .
S21 .227.b . . . .
S21 .229.a . . . .
S21 .229.b . . . .
SA11.141.a . . . .
![Page 96: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/96.jpg)
model.lst Fri Aug 20 07:36:53 2021 96
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 61
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Solution Report SOLVE water Using NLP From line 1173
EQU SPLCB mass balance, concentrations
LOWER LEVEL UPPER MARGINAL
SA11.141.b . . . .
SA11.142.a . . . .
SA11.142.b . . . .
SA11.146.a . . . .
SA11.146.b . . . .
SA11.147.a . . . .
SA11.147.b . . . .
SA11.149.a . . . .
SA11.149.b . . . .
SA21.241.a . . . -1.602234E-5
SA21.241.b . . . .
SA21.242.a . . . -133164.4740
SA21.242.b . . . 6351.2718
SA21.246.a . . . .
SA21.246.b . . . .
SA21.247.a . . . .
SA21.247.b . . . .
SA21.249.a . . . -6.544478E-6
SA21.249.b . . . .
---- EQU TUMB mass balance to total flowrates
LOWER LEVEL UPPER MARGINAL
T1 . . . .
T2 . . . .
---- EQU TUCB mass balance to individual pollutants
LOWER LEVEL UPPER MARGINAL
T1.a . . . -2.004536E-5
T1.b . . . .
T2.a . . . -82704.2872
T2.b . . . .
---- EQU MXRMB mass balance to total flowrates
LOWER LEVEL UPPER MARGINAL
M1.11 . . . .
M2.21 . . . .
M6.13 . . . -50147.6953
M7.23 . . . 2391.7914
MF.FP . . . -78348.8587
![Page 97: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/97.jpg)
model.lst Fri Aug 20 07:36:53 2021 97
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 62
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Solution Report SOLVE water Using NLP From line 1173
---- EQU MXRCB mass balance to individual concentrations
LOWER LEVEL UPPER MARGINAL
M1.11.a . . . .
M1.11.b . . . .
M2.21.a . 3.7780364E-7 . .
M2.21.b . . . -4667.9200
M6.13.a . -2.739748E-7 . .
M6.13.b . 8.5471372E-7 . .
M7.23.a . . . -151999.9924
M7.23.b . . . 82704.2872
MF.FP.a . 3.2312823E-7 . .
MF.FP.b . -8.547219E-7 . 133164.4740
---- EQU PUMB mass balance to total flowrates
LOWER LEVEL UPPER MARGINAL
P1 . . . -2391.7914
P2 . . . -8000.0000
---- EQU PUCB mass balance to individual concentrations
LOWER LEVEL UPPER MARGINAL
P1.a 1000.0000 1000.0000 1000.0000 256.6538
P1.b 1500.0000 1500.0000 1500.0000 426.0269
P2.a 1000.0000 1000.0000 1000.0000 407.9611
P2.b 1000.0000 1000.0000 1000.0000 -7999.9996
---- EQU REL
LOWER LEVEL UPPER MARGINAL
a -2000.0000 -2000.0000 -2000.0000 .
b -2500.0000 -2500.0000 -2500.0000 .
LOWER LEVEL UPPER MARGINAL
---- EQU OBJ . . . 1.0000
OBJ objective function NLP
---- VAR F total flowrate of each stream [ton/hr]
LOWER LEVEL UPPER MARGINAL
IN 40.0000 40.0000 90.0000 .
1 . 40.0000 40.0000 .
2 . . 50.0000 8256.6538
11 40.0000 40.0000 40.0000 8000.0000
12 40.0000 40.0000 40.0000 62075.4369
![Page 98: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/98.jpg)
model.lst Fri Aug 20 07:36:53 2021 98
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 63
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Solution Report SOLVE water Using NLP From line 1173
VAR F total flowrate of each stream [ton/hr]
LOWER LEVEL UPPER MARGINAL
121 . . . 2.2084932E-5
122 . 31.1708 40.0000 .
126 . . 40.0000 4735.6671
127 . . 40.0000 151.3073
129 . 8.8292 40.0000 .
21 50.0000 50.0000 50.0000 -256.6538
22 50.0000 50.0000 50.0000 5591.7222
221 . . 40.0000 0.0002
222 . . . -5335.0684
226 . . 50.0000 -9.711996E-5
227 . 50.0000 50.0000 -5183.7611
229 . . 50.0000 -9.834814E-5
13 . 29.5054 90.0000 .
14 . 29.5054 90.0000 .
141 . . 40.0000 -0.0004
142 . . 50.0000 7577.0673
146 . . . 8004.7252
147 . . 90.0000 7728.3746
149 . 29.5054 90.0000 .
23 . 50.0000 90.0000 .
24 . 50.0000 90.0000 .
241 . . 40.0000 -6.539042E-5
242 . 18.8292 50.0000 .
246 . 29.5054 90.0000 .
247 . . . 151.3072
249 . 1.6653 90.0000 .
FP 40.0000 40.0000 90.0000 5134.2309
---- VAR C pollutants concentration in each stream [ppm]
LOWER LEVEL UPPER MARGINAL
IN .a . . . .
IN .b . . . .
1 .a . . . 112120.6987
1 .b . . . 0.0003
2 .a . . . .
2 .b . . . .
11 .a . . . -112120.6987
11 .b . . . -0.0003
12 .a 25.0000 25.0000 25.0000 .
12 .b 37.5000 37.5000 37.5000 .
121.a 25.0000 25.0000 25.0000 .
121.b 37.5000 37.5000 37.5000 .
122.a 25.0000 25.0000 25.0000 83016.7787
122.b 37.5000 37.5000 37.5000 -3959.4804
126.a 25.0000 25.0000 25.0000 .
126.b 37.5000 37.5000 37.5000 .
127.a 25.0000 25.0000 25.0000 .
![Page 99: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/99.jpg)
model.lst Fri Aug 20 07:36:53 2021 99
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 64
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Solution Report SOLVE water Using NLP From line 1173
VAR C pollutants concentration in each stream [ppm]
LOWER LEVEL UPPER MARGINAL
127.b 37.5000 37.5000 37.5000 .
129.a 25.0000 25.0000 25.0000 24748.4912
129.b 37.5000 37.5000 37.5000 .
21 .a . 37.0813 50.0000 .
21 .b . 24.2105 50.0000 .
22 .a 20.0000 57.0813 70.0000 .
22 .b 20.0000 44.2105 70.0000 .
221.a 20.0000 57.0813 70.0000 .
221.b 20.0000 44.2105 70.0000 .
222.a 20.0000 57.0813 70.0000 .
222.b 20.0000 44.2105 70.0000 .
226.a 20.0000 57.0813 70.0000 .
226.b 20.0000 44.2105 70.0000 .
227.a 20.0000 57.0813 70.0000 .
227.b 20.0000 44.2105 70.0000 .
229.a 20.0000 57.0813 70.0000 .
229.b 20.0000 44.2105 70.0000 .
13 .a . 57.0813 70.0000 .
13 .b . 2.2105 70.0000 .
14 .a . 2.8541 70.0000 .
14 .b . 2.2105 70.0000 .
141.a . 2.8541 70.0000 .
141.b . 2.2105 70.0000 .
142.a . 2.8541 70.0000 .
142.b . 2.2105 70.0000 .
146.a . 2.8541 70.0000 .
146.b . 2.2105 70.0000 .
147.a . 2.8541 70.0000 .
147.b . 2.2105 70.0000 .
149.a . 2.8541 70.0000 .
149.b . 2.2105 70.0000 .
23 .a . 57.0813 70.0000 .
23 .b . 44.2105 70.0000 .
24 .a . 57.0813 70.0000 .
24 .b . 2.2105 70.0000 .
241.a . 57.0813 70.0000 .
241.b . 2.2105 70.0000 .
242.a . 57.0813 70.0000 .
242.b . 2.2105 70.0000 .
246.a . 57.0813 70.0000 .
246.b . 2.2105 70.0000 .
247.a . 57.0813 70.0000 .
247.b . 2.2105 70.0000 .
249.a . 57.0813 70.0000 .
249.b . 2.2105 70.0000 .
FP .a . 10.0000 10.0000 -6215.3423
FP .b . 10.0000 10.0000 -5247.7324
![Page 100: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/100.jpg)
model.lst Fri Aug 20 07:36:53 2021 100
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 65
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Solution Report SOLVE water Using NLP From line 1173
LOWER LEVEL UPPER MARGINAL
---- VAR COST -INF 596163.5974 +INF .
COST total flow going through the units [ton/h]
**** REPORT SUMMARY : 0 NONOPT
0 INFEASIBLE
0 UNBOUNDED
0 ERRORS
![Page 101: model.lst Fri May 28 17:07:06 2021 1newton.cheme.cmu.edu/interfaces/waternet/model.pdf · 2021. 5. 28. · model.lst Fri May 28 17:07:06 2021 3 GAMS 24.4.1 r50296 Released Dec 20,](https://reader035.fdocuments.us/reader035/viewer/2022071511/6130b45c1ecc51586944443f/html5/thumbnails/101.jpg)
model.lst Fri Aug 20 07:36:53 2021 101
GAMS 24.4.1 r50296 Released Dec 20, 2014 LEX-LEG x86 64bit/Linux
08/20/21 07:36:52 Page 66
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
E x e c u t i o n
**** REPORT FILE SUMMARY
RES1 /var/www/html/interfaces/waternet/output.html
res2 /var/www/html/interfaces/cgi-bin/waternet/data.inc
res56 /var/www/html/interfaces/cgi-bin/waternet/TREATMENT5
res30 /var/www/html/interfaces/cgi-bin/waternet/FMIXER
res42 /var/www/html/interfaces/cgi-bin/waternet/SPLITTER2
res52 /var/www/html/interfaces/cgi-bin/waternet/TREATMENT2
res53 /var/www/html/interfaces/cgi-bin/waternet/TREATMENT1
res1222 /var/www/html/interfaces/cgi-bin/waternet/stream2
res1000 /var/www/html/interfaces/cgi-bin/waternet/arrows.inc
EXECUTION TIME = 0.011 SECONDS 3 MB 24.4.1 r50296 LEX-LEG
USER: Eval License G201207/0001AO-GEN
Carnegie Mellon University, Dept. of Chemical Engineering DCE375
License for teaching and research at degree granting institutions
**** FILE SUMMARY
Input /var/www/html/interfaces/cgi-bin/waternet/model.gms
Output /var/www/html/interfaces/cgi-bin/waternet/model.lst