You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
---- Shipsw Amount Shipped To Warehouse<br />
Shipsw(S1,A)<br />
(.LO, .L, .UP = 0, 0, 1000)<br />
-1 TCOSTEQ<br />
1 SUPPLYEQ(S1)<br />
-1 BALANCE(A)<br />
Shipsw(S1,B)<br />
(.LO, .L, .UP = 0, 0, 1000)<br />
-2 TCOSTEQ<br />
1 SUPPLYEQ(S1)<br />
-1 BALANCE(B)<br />
REMAINING 4 ENTRIES SKIPPED<br />
Equation solution report<br />
The equation solution LST also shows all existing cases grouped under each equation name<br />
when set dependency is present as illustrated below in the context of our core optimization<br />
example (optimize.gms).<br />
---- EQU constraint<br />
LOWER LEVEL UPPER MARGINAL<br />
Land -INF 100.000 100.000 52.000<br />
Labor -INF 500.000 500.000 9.500<br />
Variable solution report<br />
The variable solution LST segment also shows all existing cases grouped under each variable<br />
name when set dependency is present as illustrated below in the context of our core optimization<br />
example (optalgebra.gms).<br />
---- VAR x<br />
LOWER LEVEL UPPER MARGINAL<br />
Corn . 50.000 +INF .<br />
Wheat . 50.000 +INF .<br />
Cotton . . +INF -13.000<br />
Good modeling practices<br />
Above I have covered the essential GAMS features one would employ in any modeling exercise.<br />
However I have not done very good job of exploiting a major GAMS capability involved selfdocumentation.<br />
In any modeling exercise there are an infinite variety of choices that can be made<br />
in naming the variables, equations, parameters, sets etc. and formatting their presentation in the<br />
GMS instruction file. Across these choices that can be large differences in the degree of selfdocumentation<br />
within the GMS code. In particular, as explained in the chapter on Rules for Item<br />
Names, Element names and Explanatory Text, one employ short names like x(j) as in<br />
optalgebra.gms or longer names (up to 31 characters) for the variables like production(products).<br />
I advocate use of longer names to enhance the readability of the document.<br />
The GAMS also permits one to add comments, for example telling what is being done by<br />
Courtesy of B.A. McCarl, October 2002 34