[Osi] How to define SOS constraint

John Forrest jjhforrest at gmail.com
Wed May 19 04:04:45 EDT 2010


Christian,

There are many reasons why replacing integer variables with SOS can 
degrade performance.

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.  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.

Other possibilities are three way branching objects if c) is a problem.

John Forrest




On 18/05/10 21:07, Christian Schmidt wrote:
> Hi John,
>
> thank you very much your answer. With your help, I was able to add SOS constraints and receive correct results.
>
> But the performance is terrible! With one of my small real world problems I could solve using SOS in 2.5 secs and using binary variables instead of SOS in only 0.6 secs.
> A medium sized problem was solved with binaries within 6 secs and did not solve within 5 minutes using SOS.
>
> Why is that? Is there still something wrong?
> At least in theory, the solver should benefit significantly from SOS...
>
> Any ideas?
>
>
>    




More information about the Osi mailing list