Search code examples
pythonoptimizationscipor-toolsmixed-integer-programming

How to use SCIP in ORTOOLS for MILP [python]


I have recently started with Ortools for a MILP problem.

I have tried CBC, but it is not providing global optimal solutions, only local (it seems to have a bug as reported in https://groups.google.com/forum/#!topic/or-tools-discuss/WYZrd-B7Esc)

I am trying SCIP (as suggested in some articles) by installing http://scip.zib.de/ and using the following command (python)

solver = pywraplp.Solver('L1', pywraplp.Solver.SCIP_MIXED_INTEGER_PROGRAMMING)

However, I have received the following error message:

type object 'Solver' has no attribute 'SCIP_MIXED_INTEGER_PROGRAMMING'

It looks like I have to inform Ortools I have this solver installed on my computer.

Could someone help me please?

Thanks in advance


Solution

  • You need to recompile from sources.

    Which platform are you on (OS, version, compiler) ?