Sunday, July 4, 2010

GAMS: display

While playing with my old column generation example http://www.amsterdamoptimization.com/pdf/colgen.pdf I wanted to change the display of of the patterns a little bit:

----    181 PARAMETER pat  pattern usage

                 p1         p15         p18         p21         p25         p26         p28         p31         p34

width1       12.000                               2.000                               1.000
width2                    1.000       3.000       2.000                   1.000       1.000
width3                                            2.000       2.000       3.000                               1.000
width4                                3.000
width5                                                                                            2.000
width6                                                        1.000       1.000                   4.000       5.000
width7                                                                                3.000
width9                    3.000
width10                                                                                           1.000       1.000
width13                                                       2.000                                           1.000
Count         4.000      27.000      49.000      61.000       1.000     222.000     479.000      61.000       3.000

      +         p36         p37         p38         p39         p40         p42         p43         p44         p45

width1                                            1.000                   4.000
width2                                2.000                   1.000                                           4.000
width3        1.000       2.000       1.000       1.000                   1.000       2.000       2.000
width4                                            3.000                               1.000
width6        1.000       5.000       1.000       2.000       4.000                               1.000
width7        1.000                                                                   1.000                   1.000
width8                                1.000
width9                                                                                            1.000
width10                                                                               2.000                   1.000
width11                               2.000                   3.000       3.000                   1.000
width12                   1.000
width13       2.000
Count       191.000     101.000     103.000       1.000      79.000       1.000       1.000     347.000      20.000

      +       Total

width1      654.000
width2     1362.000
width3     1987.000
width4      151.000
width5      122.000
width6     1946.000
width7     1649.000
width8      103.000
width9      428.000
width10      86.000
width11     793.000
width12     101.000
width13     387.000
Count      1751.000

Now I wanted to drop the zero’s after the decimal point, so I did:

option pat:0;
display pat;

This gave as result:

----    183 PARAMETER pat  pattern usage

                 p1         p15         p18         p21         p25         p26         p28         p31         p34

width1           12                                   2                        ***********1
width2                        1           3           2                       1           1
width3                                                2           2           3                                   1
width4                                    3
width5                                                                                                2
width6                                                            1           1                       4           5
width7                                                                                    3
width9                        3
width10                                                                                               1           1
width13                                                           2                                               1
Count             4          27          49          61           1         222         479          61           3

      +         p36         p37         p38         p39         p40         p42         p43         p44         p45

width1                                                1                       4
width2                                    2                       1                                               4
width3            1           2           1           1                       1           2           2
width4                                                3                                   1
width6            1           5           1           2           4                                   1
width7            1                                                                       1                       1
width8                                    1
width9                                                                                                1
width10                                                                                   2                       1
width11                                   2                       3           3                       1
width12                       1
width13           2
Count           191         101         103           1          79           1           1         347          20

      +       Total

width1          654
width2         1362
width3         1987
width4          151
width5          122
width6         1946
width7         1649
width8          103
width9          428
width10          86
width11         793
width12         101
width13         387
Count          1751

It is not clear what the stars are doing there. May be some debugging output left in the code.

No comments:

Post a Comment