Closed mmcloughlin closed 5 years ago
I have transitioned to using CBC directly, together with a hand-rolled wrapper layer akin to or-tools cbc_interface.cc.
I have been able to resolve my issue by adding -preprocess off
to the arguments to callCbc
. In or-tools this appears here
Clearly this is not a good option universally, since anecdotally it worsens performance slightly (as you would expect). However I wonder if these arguments could be exposed via the SetSolverSpecificParametersAsString
mechanism?
I'm assuming this comment is the reason why that's not a good idea
Do you have any context on this, and how hard it would be to patch CBC itself?
There is a Presolve parameter on the linear solver. You should use it.
Now this is clearly a CBC bug, you can send the MPS file to the cbc owners. I would not try to fix it myself.
Thanks Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 00
Le ven. 6 avr. 2018 à 04:55, Michael McLoughlin notifications@github.com a écrit :
I have transitioned to using CBC directly, together with a hand-rolled wrapper layer akin to or-tools cbc_interface.cc https://github.com/google/or-tools/blob/v6.6/ortools/linear_solver/cbc_interface.cc .
I have been able to resolve my issue by adding -preprocess off to the arguments to callCbc. In or-tools this appears here
Clearly this is not a good option universally, since anecdotally it worsens performance slightly (as you would expect). However I wonder if these arguments could be exposed via the SetSolverSpecificParametersAsString mechanism?
I'm assuming this comment is the reason why that's not a good idea
Do you have any context on this, and how hard it would be to patch CBC itself?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/or-tools/issues/642#issuecomment-379134540, or mute the thread https://github.com/notifications/unsubscribe-auth/AKj17cQ7cHBsG0wC3r5nJR2Akk_aGxWhks5tltkQgaJpZM4TGLLk .
There is a Presolve parameter on the linear solver. You should use it.
It's ignored by the CBC interface.
https://github.com/google/or-tools/blob/e993c93f4afbb6d772354fca2cd8e6bfe511cf8e/ortools/linear_solver/cbc_interface.cc#L358-L360 https://github.com/google/or-tools/blob/e993c93f4afbb6d772354fca2cd8e6bfe511cf8e/ortools/linear_solver/cbc_interface.cc#L497-L505
Now this is clearly a CBC bug, you can send the MPS file to the cbc owners. I would not try to fix it myself.
I am increasingly unimpressed by CBC to be honest. I now have a problem where it's selecting the value 2 for a binary variable.
We do not use CBC ourselves. I find it unreliable. I have not yet tried SCIP 5.0 yet. Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 00
Le ven. 6 avr. 2018 à 20:06, Michael McLoughlin notifications@github.com a écrit :
There is a Presolve parameter on the linear solver. You should use it.
It's ignored by the CBC interface.
Now this is clearly a CBC bug, you can send the MPS file to the cbc owners. I would not try to fix it myself.
I am increasingly unimpressed by CBC to be honest. I now have a problem where it's selecting the value 2 for a binary variable.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/google/or-tools/issues/642#issuecomment-379332066, or mute the thread https://github.com/notifications/unsubscribe-auth/AKj17Tl5FarJJuwlMYndbCyQpkXzeZ0hks5tl66jgaJpZM4TGLLk .
I've been working on this: #638, and also would like some context on that comment about the memory leak.
@lperron curious, which do you recommend for Mixed Integer Programming? From here, seems like CBC is the default?
@jlo1 I can't speak for the authors, but I would guess CBC is the default only because of its permissive license. All of the others need some kind of license that ortools developers cannot be sure people will have.
As for a recommendation, it will depend on your use case and which licenses you can acquire. But open source benchmarks suggest the following performance ranking (best to worst):
Guroby is proprietary, need a license key SCIP they require you to download it form their web site i.e. we can't integrate it in or-tools (also dual license academic/commercial so you must register etc....) GLPK worse than CBC -> or-tools shipped with CBC by default so binary package will(could) only contain it.
I have a mixed-integer programming problem such that
ExportModelAsMpsFormat
and usingcbc
from the command line succeedsMy current theory is that CBC is run with different parameters in the two cases. In particular the
preprocessing
step seems to be enabled via or-tools but not from the command line, and through or-tools I get warnings in the solver output. Unfortunately the CBC interface has very poor support for modifying underlying solver parameters.I would switch to a different solver but I have strong interest in CBC because of the permissive license.
Any help/ideas appreciated.
More details:
Output from the solver when run from or-tools:
Then from
VerifySolution()
I getAfter exporting the problem and running
cbc
on the command line I see