replace "+/-INF" in outputfile with a number

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

replace "+/-INF" in outputfile with a number

Post by Archiver »



Hi,
is it possible to use a value instead the "+/- INF" string in the
outputfile (which is generated by putfile)?

regards

Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: replace "+/-INF" in outputfile with a number

Post by Archiver »



Michael,

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 postprocess your output files with some batch editing
tools like sed or awk (part of the GAMS distribution for Windows).
Search google for some sed/awk tutorials.

Hope this helps,
Michael Bussieck - GAMSWorld Coordinator

On Dec 14, 2:15 pm, mic wrote:
> > Hi,
> > is it possible to use a value instead the "+/- INF" string in the
> > outputfile (which is generated by putfile)?
> >
> > regards
> >
> > Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Post Reply