Page 1 of 1

GAMS and Python 2

Posted: Mon Feb 12, 2018 2:25 pm
by David
Hello,

Is there a way to see the ongoing calculations through the python API?
When I run the model through python, I don't see any progress data (like the iterations, and so on).

Thanks!

Re: GAMS and Python 2

Posted: Mon Feb 12, 2018 5:07 pm
by Clemens
David,

You might want to specify the output argument in GamsJob.run() in order to redirect the GAMS log. Assuming that t1 is an instance of type GamsJob, the following code will print the log to stdout:

Code: Select all

t1.run(output=sys.stdout)
Hope that helps,
Clemens

Re: GAMS and Python 2

Posted: Mon Feb 12, 2018 6:06 pm
by David
Thanks that works perfectly!