Search code examples
pythonpyomo

SolveFactory('gams'): modify OPTCA and OPTCR


When invoking gams solver in pyomo as follows

SolverFactory('gams').solve(model, solver = 'CONOPT', tee = True)

is it possible to modify the solver options OPTCR and OPTCA ?

Thanks in advance for your time !


Solution

  • Yes. You can use the add_options parameter to insert arbitrary lines:

    SolverFactory('gams').solve(model, solver='baron', tee=True, add_options=['option optcr=0.001;', 'option optca=0.01;'])