<div dir="ltr"><div><div><div><div><div><div><div>This is due to Couenne not having convexification routines for max and min operators. For this particular model where x3 has a non-negative coefficient in the objective function and the objective is to be minimized, you can replace<br><br></div>x3 = max (0, x1 - 2)<br><br></div>with<br></div><br></div>x3 >= max (0, x1 - 2)<br><br></div>and therefore with<br><br></div>x3 >= 0<br></div><div>x3 >= x1 - 2<br><br></div><div>This is not true in general, as x3 = max (0, x1-2) might require a binary variable.<br><br></div><div>Hope this helps,<br></div><div>Pietro<br></div><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 10, 2016 at 8:03 PM, Chawal, Ukesh <span dir="ltr"><<a href="mailto:ukesh.chawal@mavs.uta.edu" target="_blank">ukesh.chawal@mavs.uta.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div>


<div dir="ltr">
<div id="m_-8487606085438910264x_divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Stefan,</p>
<p>                 Appreciate your help. </p>
<p>                              </p>
<p>Will  you please suggest me how do I reformulate the constraint <span style="color:rgb(33,33,33);font-size:13.3333px">X3 = max (0, X1 -2)? <span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">Can
 you help me with an example code?</span></span></p><span class="">
<p><br>
</p>
<div id="m_-8487606085438910264x_Signature">
<div id="m_-8487606085438910264x_divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p class="m_-8487606085438910264x_x_MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
Thank You.</p>
<p class="m_-8487606085438910264x_x_MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<br>
</p>
<p class="m_-8487606085438910264x_x_MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
Regards,</p>
<p class="m_-8487606085438910264x_x_MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
Ukesh Chawal</p>
<p class="m_-8487606085438910264x_x_MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
Graduate Teaching and Research Assistant</p>
<p class="m_-8487606085438910264x_x_MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
IMSE PhD Student</p>
<p class="m_-8487606085438910264x_x_MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
The University of Texas at Arlington</p>
<p class="m_-8487606085438910264x_x_MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__owa.uta.edu_owa_chawalu-40exchange.uta.edu_redir.aspx-3FSURL-3DKvdqIrJYYFJEInR-5F-5FScoZicftjVuRA8fhtn9F2i-2DSuhixzhS37PSCG0AYQBpAGwAdABvADoAdQBrAGUAcwBoAC4AYwBoAGEAdwBhAGwAQAB1AHQAYQAuAGUAZAB1AA..-26URL-3Dmailto-253aukesh.chawal-2540uta.edu&d=CwMF-g&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=ZxcvfrgBj_XEFq5Ymi2c2hQYsUUIXtcIIzgczKPIqFs&m=Kl-_A0EWC0GU0zn_NXBiff9CpniGjDUbFxQlaZkMoDI&s=UqMaf2EokQDPZaVp4cxZ4-Mc8T2zRStVmAxn-jWCwQ0&e=" id="m_-8487606085438910264LPNoLP" target="_blank"><span style="color:blue">ukesh.chawal@mavs.uta.edu</span></a></p>
</div>
</div>
</span></div>
<hr style="display:inline-block;width:98%">
<div id="m_-8487606085438910264x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Stefan Vigerske <<a href="mailto:stefan@math.hu-berlin.de" target="_blank">stefan@math.hu-berlin.de</a>><br>
<b>Sent:</b> Monday, October 10, 2016 1:48:46 PM<br>
<b>To:</b> Chawal, Ukesh; <a href="mailto:couenne@list.coin-or.org" target="_blank">couenne@list.coin-or.org</a>; <a href="mailto:pbelott@clemson.edu" target="_blank">pbelott@clemson.edu</a><br>
<b>Subject:</b> Re: [Couenne] Ampl code trying to solve using couenne solver</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div class="m_-8487606085438910264PlainText"><div><div class="h5">Hi,<br>
<br>
AMPLs presolve will have replaced max (0, 9 -2) by a constant before <br>
Couenne had a chance to complain.<br>
You will have to reformulate X3 = max (0, X1 -2).<br>
<br>
Stefan<br>
<br>
On 10/10/2016 08:27 PM, Chawal, Ukesh wrote:<br>
> Hello,<br>
><br>
>           I have a weird problem while trying to solve the ampl code using couenne solver. When I tried to minimize it using constraint, X3 = max (0, X1 -2); it gave me the ERROR: unknown operator. But when I used constraint,  X3 = max (0, 9 -2); it gave
 me the optimal solution. Will you be able to help me with this? I have included the code and the solver output as a reference:-<br>
><br>
><br>
> var X1 >=0 <=9.5 integer;<br>
> var X2 >=0 <=9.5 integer;<br>
> var X3 >=0 integer;<br>
> minimize Y: -2540.33 -154.669 * X1 + 40.0895 * X2 + X3;<br>
> subject to a1: X3 = max (0, X1 -2);<br>
><br>
><br>
> ampl: reset;<br>
> ampl: include trial.run;<br>
> couenne:<br>
> ANALYSIS TEST: ERROR: unknown operator (address 0p741f20), aborting.<br>
> exit code 18446744073709551615<br>
> <BREAK><br>
> ******************************<wbr>******************************<wbr>******************************<wbr>*************************<br>
> var X1 >=0 <=9.5 integer;<br>
> var X2 >=0 <=9.5 integer;<br>
> var X3 >=0 integer;<br>
> minimize Y: -2540.33 -154.669 * X1 + 40.0895 * X2 + X3;<br>
> subject to a1: X3 = max (0, 9 -2);<br>
><br>
><br>
> ampl: reset;<br>
> ampl: include trial.run;<br>
> couenne:<br>
> ANALYSIS TEST: Problem size before reformulation: 2 variables (2 integer), 0 constraints.<br>
> Problem size after  reformulation: 3 variables (2 integer), 0 constraints.<br>
> ******************************<wbr>******************************<wbr>******************<br>
> This program contains Ipopt, a library for large-scale nonlinear optimization.<br>
>  Ipopt is released as open source code under the Common Public License (CPL).<br>
>          For more information visit <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__projects.coin-2Dor.org_Ipopt&d=CwIFAw&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=73-Q-GECsIsyPehmiseVQOKhwoqWO0aQLacYmzMgTzs&s=XPz_APTl-ruSmbCXxqC8uPk61hQqr3s4ZVqN_xo6y7k&e=" target="_blank">
https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__<wbr>projects.coin-2Dor.org_Ipopt&<wbr>d=CwIFAw&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>BRcuJnQr5NAzU29t80hk2rsLc4vrlR<wbr>ySBDabuq0O1ZI&m=73-Q-<wbr>GECsIsyPehmiseVQOKhwoqWO0aQLac<wbr>YmzMgTzs&s=XPz_APTl-<wbr>ruSmbCXxqC8uPk61hQqr3s4ZVqN_<wbr>xo6y7k&e=</a><br>
> ******************************<wbr>******************************<wbr>******************<br>
> NOTE: You are using Ipopt by default with the MUMPS linear solver.<br>
>       Other linear solvers might be more efficient (see Ipopt documentation).<br>
> Cbc0012I Integer solution of -3925.35 found by Init Rounding NLP after 0 iterations and 0 nodes (0.00 seconds)<br>
> Cbc0001I Search completed - best objective -3925.351, took 0 iterations and 0 nodes (0.00 seconds)<br>
> Cbc0035I Maximum depth 0, 0 variables fixed on redu<br>
>   "Finished"<br>
> couenne: Optimal<br>
><br>
><br>
><br>
> Thank You.<br>
><br>
><br>
> Regards,<br>
><br>
> Ukesh Chawal<br>
><br>
> Graduate Teaching and Research Assistant<br>
><br>
> IMSE PhD Student<br>
><br>
> The University of Texas at Arlington<br>
><br>
> <a href="mailto:ukesh.chawal@mavs.uta.edu" target="_blank">ukesh.chawal@mavs.uta.edu</a><<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__owa.uta.edu_owa_chawalu-40exchange.uta.edu_redir.aspx-3FSURL-3DKvdqIrJYYFJEInR-5F-5FScoZicftjVuRA8fhtn9F2i-2DSuhixzhS37PSCG0AYQBpAGwAdABvADoAdQBrAGUAcwBoAC4AYwBoAGEAdwBhAGwAQAB1AHQAYQAuAGUAZAB1AA..-26URL-3Dmailto-253aukesh.chawal-2540uta.edu&d=CwIFAw&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=73-Q-GECsIsyPehmiseVQOKhwoqWO0aQLacYmzMgTzs&s=wnUGMjsCwsbbVM6y6kxOZ7Djax9_D1iz3A9HzE0pNl8&e=" target="_blank">http<wbr>s://urldefense.proofpoint.com/<wbr>v2/url?u=https-3A__owa.uta.<wbr>edu_owa_chawalu-40exchange.<wbr>uta.edu_redir.aspx-3FSURL-<wbr>3DKvdqIrJYYFJEInR-5F-<wbr>5FScoZicftjVuRA8fhtn9F2i-<wbr>2DSuhixzhS37PSCG0AYQBpAGwAdABv<wbr>ADoAdQBrAGUAcwBoAC4AYwBoAGEAdw<wbr>BhAGwAQAB1AHQAYQAuAGUAZAB1AA..<wbr>-26URL-3Dmailto-253aukesh.<wbr>chawal-2540uta.edu&d=CwIFAw&c=<wbr>Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>BRcuJnQr5NAzU29t80hk2rsLc4vrlR<wbr>ySBDabuq0O1ZI&m=73-Q-<wbr>GECsIsyPehmiseVQOKhwoqWO0aQLac<wbr>YmzMgTzs&s=<wbr>wnUGMjsCwsbbVM6y6kxOZ7Djax9_<wbr>D1iz3A9HzE0pNl8&e=</a>
 ><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Couenne mailing list<br>
> <a href="mailto:Couenne@list.coin-or.org" target="_blank">Couenne@list.coin-or.org</a><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_mailman_listinfo_couenne&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=73-Q-GECsIsyPehmiseVQOKhwoqWO0aQLacYmzMgTzs&s=XnWorzI8Umgrc_UsPjzPnUOrrXHuCHYSclws6t9daPI&e=" target="_blank">
https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__list.<wbr>coin-2Dor.org_mailman_<wbr>listinfo_couenne&d=CwICAg&c=<wbr>Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>BRcuJnQr5NAzU29t80hk2rsLc4vrlR<wbr>ySBDabuq0O1ZI&m=73-Q-<wbr>GECsIsyPehmiseVQOKhwoqWO0aQLac<wbr>YmzMgTzs&s=XnWorzI8Umgrc_<wbr>UsPjzPnUOrrXHuCHYSclws6t9daPI&<wbr>e=</a><br>
><br>
<br>
<br>
-- <br>
</div></div><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.gams.com_-7Estefan&d=CwMF-g&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=ZxcvfrgBj_XEFq5Ymi2c2hQYsUUIXtcIIzgczKPIqFs&m=Kl-_A0EWC0GU0zn_NXBiff9CpniGjDUbFxQlaZkMoDI&s=EJHo7nOIyU93uVF0vNC1KQQ89EmzjSxFmEabSScFmjc&e=" target="_blank">http://www.gams.com/~stefan</a><br>
</div>
</span></font>
</div>

</blockquote></div><br></div>