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;

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.