Tuesday, May 13, 2008

$ifthen issue (GAMS release 22.6 bug)


The GAMS construct $ifthen has more issues. This bug in $ifthen only happens in release 22.6. The following code does not work in GAMS 22.6:



This has been fixed in GAMS 22.7. If you need to work with 22.6, a work around is to add $else everywhere:




In my case I have added a $ statement that makes sure the user can only run this code with GAMS 22.7: