Showing posts with label minor bug. Show all posts
Showing posts with label minor bug. Show all posts

Wednesday, June 25, 2008

GAMS/IDE GDX reload

The GAMS/IDE will ask and try to update an open GDX file if the GDX file has changed. This is especially the case when the IDE gets the focus again. In some cases it will try then to reload the GDX file while GAMS is writing to this file. This results in a run-time error. The IDE does not crash: it will show a popup window with the run-time error but will continue to work otherwise.

Preferably the IDE should not reload a GDX while it is being written to.

Friday, June 13, 2008

In search of missing empty lines

I looked at a GAMS listing file that essentially looks like:
----     17 aaa

---- 18 aaa

---- 19 aaa
---- 21 aaa

---- 22 aaa

---- 23 aaa

Why did some entries have a missing empty line between them? Not really a useful way to spent my time, but I wanted to know the answer. The reason turned out to be a solve statement with all output turned off. This does not only not write anything, it actually eats up a line from the listing file! Here is the code to demonstrate:

variable x;
equation e;
e.. x=e=1;
model m/e/;

*
* options to reduce output and speed up things
*
option limrow=0;
option limcol=0;
m.solprint=2;
m.solvelink=2;

display "aaa";
display "aaa";
display "aaa";
solve m using lp minimizing x;
display "aaa";
display "aaa";
display "aaa";

I believe this is only cosmetic and that no lines with valuable information are lost.

Saturday, May 31, 2008

GAMS/IDE bug (minor)

In case of a syntax error, the GAMS/IDE will usually place the cursor on the correct place. This makes it easy to fix errors quickly without even consulting the listing file. Here is a case where the GAMS/IDE gets confused due to substitution of a macro:


In this case the cursor should go to symbol a which has not been declared. For the first error the macro %x% causes the cursor to point to parameterb.