Friday, September 12, 2008

Bug in gams

The fragment below demonstrates a bug in GAMS. From early analysis it looks like this is fairly difficult to encounter in a real model, so it may be less alarming than it looks like at first sight.


1 SET NUM /1*2/;
2 VARIABLE X(NUM);
3 X.L(NUM) = ORD(NUM);
4
5 X.FX('2') $(X.LO('2') EQ X.UP('2')) = 234;
6 DISPLAY X.LO,X.L,X.UP;

COMPILATION TIME = 0.000 SECONDS 3 Mb WEX228-228 Jul 26, 2008

---- 6 VARIABLE X.Lo
2 234.000
---- 6 VARIABLE X.L
1 1.000, 2 234.000
---- 6 VARIABLE X.Up
2 234.000