How can I set scip options using pyomo?

1.1k Views Asked by At

I am trying to set parameter values for solving a pyomo model using SCIP. When I run

opt = SolverFactory('scipampl')
solver_message = opt.solve(model, tee=True)

SCIP solves the model mich means that the setup of scipampl has worked. Yet I'm not sure what's the right way to add options. I found that this was adressed here before and seems to have been integrated in this git commit.

I have tried setting options via

opt.options['limits/time'] = 100

which results in the error

.../scipoptsuite-6.0.2/scip/src/scip/paramset.c:2569] ERROR: cannot open file <limits/time=100> for reading
limits/time=100: No such file or directory

Any suggestions how to set SCIP options properly in pyomo?

Edit: While I would still be interested in how passing SCIP-options via pyomo is intended, I found a workaround which worked for me. I set options via the SCIP interactive shell and saved the file (also via shell) as scip.set at the place from which the python script is run.

0

There are 0 best solutions below