I am using Pyomo. I got successes in setting up options for Cbc and scip solvers as shown below. But I am unable to figure out how to set up TIME LIMIT and MIP Relative Gap limit for GLPK solver after my researches. Does anyone know how to set those options up for GLPK in Pyomo such that when either of these limits reached, we can still get the best solutions out?
import pyomo.environ as pe
opt = pe.SolverFactory(Pyomo_Solver)
if (Pyomo_Solver == 'cbc'):
opt.options ={ 'sec':60, 'ratio': 0.0001 }
elif (Pyomo_Solver == 'scip'):
opt.options ={ 'limits/time':60, 'limits/gap': 0.0001 }
elif (Pyomo_Solver == 'glpk'):
opt.options ={ ????}
results = opt.solve(model, tee=True, symbolic_solver_labels=True )