Which CBC Option to relax the integrality requirements (using Pyomo)

378 views Asked by At

I am using the CBC solver with Pyomo and I have been not been able to get an integer solution within the specified time limit when solving a particular model.

Is there an option to pass to CBC that can relax the integrality requirements? I notice that CBC has a huge number of options, but I am not sure which is the one that we should use for this.

1

There are 1 answers

0
pybegginer On

For integer feasibility you can relax such feasibility in pyomo in the cbc interface using the option integerTolerance. Default tolerance is 1E-7 in CBC:

model = pyo.ConcreteModel()
#...Your whole model
solver = pyo.SolverFactory('cbc')
solver.solve(model, tee=True, options={'integerTolerance':1E-3})

In the printed info you should se some message like:

...integerTolerance was changed from 1e-07 to 0.001