I am a new GAMS user. I have tried to model my case using GAMS but I am still in the learning process.

Code: Select all

```
Sets
s "CDU cuts" /offgas,LSRN,HSRN,SRK,SRMD,SRGO,Residue/
j "type of k" /k0,k1,k2,k3,k4/
i "type of a" /a0,a1,a2,a3,a4/
Parameter
x1 'cut-point temperature of offgas'
x2 'cut-point temperature of LSRN'
x3 'cut-point temperature of HSRN'
x4 'cut-point temperature of SRK'
x5 'cut-point temperature of SRMD'
x6 'cut-point temperature of SRGO'
x7 'cut-point temperature of Residue' ;
x1.up = -10 ;
x1.lo = -50 ;
x2.up = 220 ;
x2.lo = 90 ;
x3.up = 380 ;
x3.lo = 180 ;
x4.up = 520 ;
x4.lo = 330 ;
x5.up = 630 ;
x5.lo = 420 ;
x6.up = 1050 ;
x6.lo = 610 ;
x7.up = 1200 ;
x7.lo = 950 ;
Parameter a(i) 'value of type a'
/ a0 4.040637061
a1 -0.047271899
a2 0.000324992
a3 -2.84324E-07
a4 8.15312E-011 /;
Parameter k(j) 'value of type k'
/ k0 0
k1 1
k2 2
k3 3
k4 4 /;
Parameter
F1 'Flowrate of CDU offgas yield in bpsd'
F2 'Flowrate of CDU LSRN yield in bpsd'
F3 'Flowrate of CDU HSRN yield in bpsd'
F4 'Flowrate of CDU SRK yield in bpsd'
F5 'Flowrate of CDU SRMD yield in bpsd'
F6 'Flowrate of CDU SRGO yield in bpsd'
F7 'Flowrate of CDU Residue yield in bpsd' ;
F1 =g= 86000 ;
F2 =g= 29000 ;
F3 =g= 72000 ;
F4 =g= 14000 ;
F5 =g= 20000 ;
F6 =g= 21000 ;
F7 =g= 8000;
Variables
Y1 'CDU yield of offgas in Vol'
Y2 'CDU yield of LSRN in Vol'
Y3 'CDU yield of HSRN in Vol'
Y4 'CDU yield of SRK in Vol'
Y5 'CDU yield of SRMD in Vol'
Y6 'CDU yield of SRGO in Vol'
Y7 'CDU yield of Residue in Vol'
P 'CDU total profit'
;
Scalars VF 'crude oil feed flowrate' /225000/
PF 'price of crude oil' /55/ ;
Equations
EQ1 'CDU yield of offgass'
EQ2 'CDU yield of LSRN'
EQ3 'CDU yield of HSRN'
EQ4 'CDU yield of SRK'
EQ5 'CDU yield of SRMD'
EQ6 'CDU yield of SRGO'
EQ7 'CDU yield of Residue'
EQ8 'Flowrate of offgas'
EQ9 'Flowrate of LSRN'
EQ10 'Flowrate of HSRN'
EQ11 'Flowrate of SRK'
EQ12 'Flowrate of SRMD'
EQ13 'Flowrate of SRGO'
EQ14 'Flowrate of Residue'
EQ15 'Define Objective Function' ;
EQ1..Y1 =e= sum((i,j),a(i)*(x1**k(j))) ;
EQ2..Y2 =e= sum((i,j),a(i)*(x2**k(j))) ;
EQ3..Y3 =e= sum((i,j),a(i)*(x3**k(j))) ;
EQ4..Y4 =e= sum((i,j),a(i)*(x4**k(j))) ;
EQ5..Y5 =e= sum((i,j),a(i)*(x5**k(j))) ;
EQ6..Y6 =e= sum((i,j),a(i)*(x6**k(j))) ;
EQ7..Y7 =e= sum((i,j),a(i)*(x7**k(j))) ;
EQ8..F1 =e= VF * (Y1/100) ;
EQ9..F2 =e= VF * ((Y2 - Y1)/100) ;
EQ10..F3 =e= VF * ((Y3 - Y2)/100) ;
EQ11..F4 =e= VF * ((Y4 - Y3)/100) ;
EQ12..F5 =e= VF * ((Y5 - Y4)/100) ;
EQ13..F6 =e= VF * ((Y6-Y5)/100) ;
EQ14..F7 =e= VF*F7 ;
EQ15..P =e= F1*5+F2*6+F3*7+F4*8+F5*9+F6*10+F7*11-VF*PF ;
Model CDUVer5 /all/;
Solve CDUVer5 using NLP maximizing P ;
```

When I hit the run button, i get an error message 142 (suffix is not allowed).

Can somebody teach me how to fix this.

Thank you.

Best regards,

Wegik Dwi Prasetyo