SETS
g gemiler /0003414521/
i iskele /0201,0202,0203,0204,0205,0206,0207,0208/;
PARAMETERS
Eta(g) /
0003414521 623 /
Tbj(g) /
0003414521 343 /
Pri(g) /
0003414521 1 /
Tisk(i) /
0201 5100
0202 5100
0203 5100
0204 5100
0205 5100
0206 5100
0207 5100
0208 5100 /;
VARIABLE
TOTALCOST TOTAL COST
POSITIVE VARIABLE
Tj(g)
;
BINARY VARIABLE
X(g,i) MODE m OF ASSET i AT TIME t
;
EQUATION
Limit1(g)
Limit2(g,i)
TekIskele(g)
COST_EQ
IskeleTakvim0(g,i)
Iskele00034145210(g,i)
Iskele00034145211(g,i)
Iskele00034145212(g,i)
Iskele00034145213(g,i)
Iskele00034145214(g,i)
Iskele00034145215(g,i)
;
Limit1(g)… Eta(g) =L= Tj(g);
Limit2(g,i)… abs(Tj(g) - 5100) + abs(Tj(g) - 4100)) =G= 5100 - 4100; // i need this functionality but using Tj(g) is causing error
TekIskele(g)… SUM(i,X(g,i)) =E= 1;
COST_EQ… TOTALCOST =E= SUM(g, Tj(g)Pri(g));
IskeleTakvim0(g,i)… (Tj(g) + Tbj(g) - Tj(g-1) + 120)(Tj(g-1) + Tbj(g-1) - Tj(g) + 120) =L= 74649600 * (2 - X(g,i) - X(g-1,i));
Iskele00034145210(g,i)… X(‘0003414521’,‘0201’) =E= 0;
Iskele00034145211(g,i)… X(‘0003414521’,‘0202’) =E= 0;
Iskele00034145212(g,i)… X(‘0003414521’,‘0203’) =E= 0;
Iskele00034145213(g,i)… X(‘0003414521’,‘0206’) =E= 0;
Iskele00034145214(g,i)… X(‘0003414521’,‘0207’) =E= 0;
Iskele00034145215(g,i)… X(‘0003414521’,‘0208’) =E= 0;
option optcr = 0;
option MIQCP=baron;
MODEL KDS /ALL/;
SOLVE KDS USING MIQCP MINIMAZING TOTALCOST;
\
the output of red labeled line is:
Limit2(0003414521,0201)… - (2)*Tj(0003414521) =G= 1000 ; (LHS = 9200)
so abs functionality not working for this scenario.
thanks for help.
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.