Using displays

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.  Note: Display will not print out items that are zero leaving blanks or skipping items where entire rows or columns are zero.  Generally the display is of the format

 

DISPLAY ITEM1,ITEM2,ITEM3;

 

where the items are either

Quoted strings in single or double quotes such as

 Display 'here it is'"hello";

 

Parameter or set names without any referencing to setdependency.  Thus in dispord.gms while the parameter data is defined over 4 sets

 

 parameter data(index1,index2,index3,index4);

 

 I simply say

 

 display data;

 

Variable, equation or model attributes with the item name and attribute desired specified

 

 Display x.l, x.scale, modelname.solstat;

 

Multiple items can be listed in a display statement separated by commas.
When displaying a more than 2 dimensional item one can expand the width of the labels printed out beyond 10 using the command option dispwidth=number; where number can range up to 20.

 

Abort

Controlling displays