[Osi] How to define SOS constraint
Christian Schmidt
christian2.schmidt at gmx.de
Thu May 20 10:30:49 EDT 2010
Hi John,
> There are many reasons why replacing integer variables with SOS can
> degrade performance.
That is very surprising to me, because to replace a SOS constraint with
binaries I need to use the "Big-M" method:
SOS: x1, ..., xn <= 1
<=>
forall_i xi <= M yi
sum_i yi <= 1
y1, ... , yn: binary
At least from theory Big-M should produce bad relaxations.
> a) Cut generators don't work.
> b) Most heuristics don't work
> c) Can take longer to get good solutions due to branching strategy.
> d) Fast Clp based mini branch and bound doesn't work with SOS.
>
> For a) and b) what you can do is leave variables as integer but add SOS
> - see sos.cpp. The sample program did not use a) or b) anyway.
I did not use any special cut generators oder heuristics knowingly. I
simply adapted your raw example in sosTest.cpp by using the
OsiCbcSolverInterface's getModelPtr to add CbcSOS - so a) and b) should
not be the cause, right?
> If you were comparing to standalone solver then it is not surprising
> performance suffered. You could try moving some of sos/sosTest into
> an example like driver4.cpp to use standalone solver.
The problems I need to solve are large linear models (1000's of
constraints, 100'000's of variables - multicommodity networks flows with
some linear side constraints) except for a few SOS1 constraints. I might
add SOS2-constraints in the future, but besides that I don't have any
integer variables.
> Other possibilities are three way branching objects if c) is a problem.
Could you clarify this? Example?
More information about the Osi
mailing list