GAMS and Python 2

Questions on using the GAMS APIs (Python, .NET, etc.)
Post Reply
David
User
User
Posts: 8
Joined: 10 months ago

GAMS and Python 2

Post by David » 6 days ago

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!

Clemens
Posts: 16
Joined: 1 year ago

Re: GAMS and Python 2

Post by Clemens » 6 days ago

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

David
User
User
Posts: 8
Joined: 10 months ago

Re: GAMS and Python 2

Post by David » 6 days ago

Thanks that works perfectly!

Post Reply