How to set solver options in Pyomo with GAMS Python API?

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 ?

• Welcome to OR.SE. Why do not you try using Pyomo itself instead of GAMS or vice versa? – A.Omidi Sep 29 at 9:29
• 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? – Oguz Toragay Sep 29 at 16:25