|
Displaying data |
Top Previous Next |
|
One may display any GAMS parameter, set, variable attribute, equation attribute or model attribute as well as quoted text using the GAMS display statement. Generally the display is of the format
DISPLAY ITEM1,ITEM2,ITEM3;
where the items are either
Display 'here it is', "hello";
parameter data(index1,index2,index3,index4);
I simply say
display data;
Display x.l, eq.m;
Notes:
OPTION ITEMNAME:DECIMAL:ROWitems:COLUMNitems
which will cause all subsequent displays of the named item to follow rules specified by three numbers following the colons which are
A display formatting sequence is introduced into the optimization example (goodoptalgebra.gms) as follows: option thisreport:2:1:2; display thisreport;
which says use 2 decimal places and produce a display with 1 item in the rows and 2 in the columns yielding Total Use by Use by Marginal Available Corn Wheat Value
Land 100.00 50.00 50.00 52.00 Labor 500.00 300.00 200.00 9.50
A display of the same item with option this report:4:2:1; yields Corn Wheat Available Value
Land .Total 100.0000 Land .Use by 50.0000 50.0000 Land .Marginal 52.0000 Labor.Total 500.0000 Labor.Use by 300.0000 200.0000 Labor.Marginal 9.5000 |