$title Example illustrating use of "display" options in GAMS set i 'first index' /first, second/ j 'second index' /one, two, three/ k 'third index' /a, b/ l 'fourth index' /i, ii/; * define a four-dimensional parameter parameter p(i,j,k,l) / second.one.a.i +inf, first.three.b.i -6.3161 first.one.b.i 5.63559, second.two.b.i 19.3160 second.one.b.ii -17.63559, first.two.b.ii 10.3457 first.two.a.ii 0.0289404, second.one.a.ii 1.0037 second.two.a.ii +inf, first.two.a.i -2.939357 first.one.a.ii 0.0/; * output of the default display statement display p; * use a global option option decimals = 1; display 'p = ',p; * use different output formats. In general: * option f:d:r:c; * means that when displaying the "f" identifier we use * d decimal places * r of the dimensions are displayed in the row label * c of the dimensions are displayed in the column label * use 5 decimal places, three-dimensional row labels, * one-dimensional column labels option p:5:3:1; display ' displaying p again... ',p; * use 4 decimal places, two-dimensional row labels, * two-dimensional column labels option p:4:2:2; display p; * use 6 decimal places, one-dimensional row labels, * two-dimensional column labels option p:6:1:2; display p;