User Tools

Site Tools


Replacing +/- INF

Q: Is it possible to use a value instead the “+/- INF” string in the output file (which is generated by a put statement)?

There is no option or switch in GAMS that would do that. You could assign a large/small number of your choice to the parameters/variables with a ±INF value:

x(i,j)$(mapval(x(i,j))=6) =  1e300;
x(i,j)$(mapval(x(i,j))=7) = -1e300;

or you could post process your output files with some batch editing tools like sed or awk (which is part of the GAMS distribution for Windows). Search Google for some sed/awk tutorials.

gams/replacing_-_inf.txt · Last modified: 2008/12/15 05:40 by support