<div dir="ltr">Hi Ambros,<div><br></div><div>Thanks a bunch for that trick, I appreciate it.  That does work for me also.  Learning more of these hidden gems day by day in ZIMPL and SCIP...</div><div><br></div><div>- George</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 23, 2013 at 1:19 AM, Ambros Gleixner <span dir="ltr"><<a href="mailto:gleixner@zib.de" target="_blank">gleixner@zib.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Of course it should read c == 1 - vabs( a - b ).<br>
<br>
Am 23.09.2013 07:13, schrieb Ambros Gleixner:<div class="HOEnZb"><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi George,<br>
<br>
mathematically, you want c = 1 - |a-b|, and James' answer is the<br>
standard linearization for this.  You can let Zimpl do this<br>
reformulation for you automatically by writing<br>
<br>
    c == vabs( a - b )<br>
<br>
or using vabs( a - b ) directly in your constraints.<br>
<br>
Happy zimpling,<br>
<br>
Ambros<br>
<br>
<br>
<br>
<br>
Am 20.09.2013 03:25, schrieb George Nychis:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Haha, I had thought of that solution James.  It seemed a little overkill<br>
to me, but maybe it is the only good way to do this.  Let's see if<br>
someone can turn up with something better, and if all fails I'll settle<br>
for it.  Thanks for pointing it out!<br>
<br>
<br>
On Thu, Sep 19, 2013 at 9:21 PM, James Gunning <James.Gunning@csiro.au<br>
<mailto:<a href="mailto:James.Gunning@csiro.au" target="_blank">James.Gunning@csiro.au</a><u></u>>> wrote:<br>
<br>
    George, this may be completely dopey, but if one added a slack z to<br>
    the objective, and equations<br>
    z<=1, z>=a-b, z>= b-a, z=1-c   (or some suitable simplification),<br>
    that might work..<br>
<br>
    George Nychis wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    This might be slightly off-topic, but I don't know where better to<br>
    ask.  I'm having a hard time expressing something in ZIMPL<br>
    linearly. I have two variables a and b. I want the variable c to<br>
    be strictly binary and take on the value of 1 when a and b are<br>
    equal, and 0 otherwise. Does anyone know of a good way to express<br>
    this?<br>
<br>
    Thanks!<br>
    George<br>
<br>
<br>
    ______________________________<u></u>_________________<br>
    Scip mailing list<br>
    <a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>  <mailto:<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>><br>
    <a href="http://listserv.zib.de/mailman/listinfo/scip" target="_blank">http://listserv.zib.de/<u></u>mailman/listinfo/scip</a><br>
</blockquote>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Scip mailing list<br>
<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
<a href="http://listserv.zib.de/mailman/listinfo/scip" target="_blank">http://listserv.zib.de/<u></u>mailman/listinfo/scip</a><br>
<br>
</blockquote></blockquote>
______________________________<u></u>_________________<br>
Scip mailing list<br>
<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
<a href="http://listserv.zib.de/mailman/listinfo/scip" target="_blank">http://listserv.zib.de/<u></u>mailman/listinfo/scip</a><br>
</div></div></blockquote></div><br></div>