[Scip] have binary variable represent equality of two other vars?

George Nychis gnychis at gmail.com
Fri Sep 20 03:25:38 CEST 2013


Haha, I had thought of that solution James.  It seemed a little overkill to
me, but maybe it is the only good way to do this.  Let's see if someone can
turn up with something better, and if all fails I'll settle for it.  Thanks
for pointing it out!


On Thu, Sep 19, 2013 at 9:21 PM, James Gunning <James.Gunning at csiro.au>wrote:

>  George, this may be completely dopey, but if one added a slack z to the
> objective, and equations
> z<=1, z>=a-b, z>= b-a, z=1-c   (or some suitable simplification), that
> might work..
>
> George Nychis wrote:
>
> This might be slightly off-topic, but I don't know where better to ask.
>  I'm having a hard time expressing something in ZIMPL linearly. I have two
> variables a and b. I want the variable c to be strictly binary and take on
> the value of 1 when a and b are equal, and 0 otherwise. Does anyone know of
> a good way to express this?
>
>  Thanks!
> George
>
>
> _______________________________________________
> Scip mailing listScip at zib.dehttp://listserv.zib.de/mailman/listinfo/scip
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20130919/5ee6a0d6/attachment.html>


More information about the Scip mailing list