2
$\begingroup$

Did anyone have experiences with Pyomo and GAMS as solver? I had looked into the pyomo documentation (GAMSShell Solver) and in the CPLEX Manuals, but doesnt find the correct syntax.

My Code looks like:

slv = SolverFactory('gams')
results = slv.solve(model, tee=True,timelimit=100)

I have also tried it with the io_options=dict(timelimit=100):

results = slv.solve(model,tee=True,io_options=io_options)

I get all time the error: "ValueError - GAMS writer passed unrecognized io_options". I think the problem I have is that I havent the correct parameter to set the time limit over the Python GAMS API.

Did anyone know how I can set the time limit with the GAMS Python API ?

$\endgroup$
  • $\begingroup$ Welcome to OR.SE. Why do not you try using Pyomo itself instead of GAMS or vice versa? $\endgroup$ – A.Omidi Sep 29 at 9:29
  • $\begingroup$ Hi and welcome to OR.SE. Did you import GAMSShell in your script? If you did, what does this comment prints? print(GAMSShell.available()) in your code? Could you use GAMS without io_options? $\endgroup$ – Oguz Toragay Sep 29 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.