<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_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>
<p><br>
</p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p class="x_x_MsoNormal" style="margin:0in 0in 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif">
Thank You.</p>
<p class="x_x_MsoNormal" style="margin:0in 0in 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif">
<br>
</p>
<p class="x_x_MsoNormal" style="margin:0in 0in 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif">
Regards,</p>
<p class="x_x_MsoNormal" style="margin:0in 0in 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif">
Ukesh Chawal</p>
<p class="x_x_MsoNormal" style="margin:0in 0in 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif">
Graduate Teaching and Research Assistant</p>
<p class="x_x_MsoNormal" style="margin:0in 0in 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif">
IMSE PhD Student</p>
<p class="x_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="x_x_MsoNormal" style="margin:0in 0in 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif">
<a href="https://owa.uta.edu/owa/chawalu@exchange.uta.edu/redir.aspx?SURL=KvdqIrJYYFJEInR__ScoZicftjVuRA8fhtn9F2i-SuhixzhS37PSCG0AYQBpAGwAdABvADoAdQBrAGUAcwBoAC4AYwBoAGEAdwBhAGwAQAB1AHQAYQAuAGUAZAB1AA..&URL=mailto%3aukesh.chawal%40uta.edu" id="LPNoLP"><span style="color:blue">ukesh.chawal@mavs.uta.edu</span></a></p>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Stefan Vigerske <stefan@math.hu-berlin.de><br>
<b>Sent:</b> Monday, October 10, 2016 1:48:46 PM<br>
<b>To:</b> Chawal, Ukesh; couenne@list.coin-or.org; pbelott@clemson.edu<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="PlainText">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>
> *******************************************************************************************************************<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>
> ******************************************************************************<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=">
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=</a><br>
> ******************************************************************************<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>
> ukesh.chawal@mavs.uta.edu<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=
 ><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Couenne mailing list<br>
> Couenne@list.coin-or.org<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=">
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=</a><br>
><br>
<br>
<br>
-- <br>
<a href="http://www.gams.com/~stefan">http://www.gams.com/~stefan</a><br>
</div>
</span></font>
</body>
</html>