Page 1 of 1

Python API: Solving two models one after the other

Posted: Tue Apr 16, 2019 5:06 pm
by Giorgis
Hello!

I have a .gms file containing two models and two solve statements. If I just add the .gms file as a string in a naive way, only the first solve statement is executed. However, I cannot seem to find the way to run both solve statements by looking at the Tutorial and the documentation. Could someone direct me in doing this?

Best,
Giorgis

Re: Python API: Solving two models one after the other

Posted: Wed Apr 17, 2019 10:08 am
by Clemens
Giorgis,

It would be good if you can provide some code that demonstrates the problem. I assume that you are using GamsWorkspace.add_job_from_string() to create a GamsJob instance. This one can be executed using the run() method and should per default compile and execute all your GAMS code.

Best,
Clemens