16.01.2015 Views

GAMS — The Solver Manuals - Available Software

GAMS — The Solver Manuals - Available Software

GAMS — The Solver Manuals - Available Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

228 DECIS<br />

parameter hm2(dl) / h 100., m 150., l 300. /;<br />

* defining distributions (writing file MODEL.STG)<br />

file stg / MODEL.STG /;<br />

put stg;<br />

put "BLOCKS DISCRETE" /;<br />

scalar h1;<br />

loop(omega1,<br />

put "BL v1 period2 ", v1("pro", omega1)/;<br />

loop(dl,<br />

h1 = hm1(dl) * v1("out", omega1);<br />

put "RHS demand ", dl.tl:1, " ", h1/;<br />

);<br />

);<br />

loop(omega2,<br />

put " BL v2 period2 ", v2("pro", omega2) /;<br />

loop(dl,<br />

h1 = hm2(dl) * v2("out", omega2);<br />

put "RHS demand ", dl.tl:1, " ", h1/;<br />

);<br />

);<br />

putclose stg;<br />

* setting DECIS as optimizer<br />

* DECISM uses MINOS, DECISC uses CPLEX<br />

option lp=decism;<br />

apl1p.optfile = 1;<br />

solve apl1p using lp minimizing tcost;<br />

scalar ccost capital cost;<br />

scalar ocost operating cost;<br />

ccost = sum(g, c(g) * x.l(g));<br />

ocost = tcost.l - ccost;<br />

display x.l, tcost.l, ccost, ocost, y.l, s.l;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!