[Cbc] Constraint to make a solution infeasible

Ed Bulog ed.bulog at gmail.com
Sun Jun 12 20:56:52 EDT 2011


Hi Terry,

While I'm far from an expert, I remember that the "repeat.cpp" example (
https://projects.coin-or.org/Cbc/browser/stable/2.7/Cbc/examples/repeat.cpp)
essentially does this. I believe it repeatedly finds the optimal solution
and then adds a cut to remove it, so that you end up with the 20 "best"
solutions. Hope that helps you.

Cheers,

Ed

On 13 June 2011 11:08, Terry <maillst at aol.com> wrote:

>
> CBC will find an optimal solution to my IP problem. Now I want the "next"
> optimal solution. That is, I want to make the previous solution infeasible
> and run CBC again to find another solution.
>
> Here's an example I'm working with:
>
> Minimize
>  x1 + x2 + x3 + x4
> Subject To
>  5 x1 +  5 x2 >= 10
>  7 x3 + 14 x4 >= 21
> Integers
>  x1
>  x2
>  x3
>  x4
> End
>
>
> Optimal - objective value 4.00000000
>      0 x1                     2                      1
>      1 x2                     0                      1
>      2 x3                     1                      1
>      3 x4                     1                      1
>
>
> Can I add a constraint so that [2 0 1 1] is infeasible, but allows any
> other answer? I'm afraid this is a stupid question, but I don't see how to
> do it.
>
> Thanks.
> Terry
>
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cbc/attachments/20110613/a4f51311/attachment.html 


More information about the Cbc mailing list