[Couenne] Ampl code trying to solve using couenne solver

Pietro Belotti petr.7b6 at gmail.com
Mon Oct 10 18:52:09 EDT 2016


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

x3 = max (0, x1 - 2)

with

x3 >= max (0, x1 - 2)

and therefore with

x3 >= 0
x3 >= x1 - 2

This is not true in general, as x3 = max (0, x1-2) might require a binary
variable.

Hope this helps,
Pietro


On Mon, Oct 10, 2016 at 8:03 PM, Chawal, Ukesh <ukesh.chawal at mavs.uta.edu>
wrote:

> Hi Stefan,
>
>                  Appreciate your help.
>
>
>
> Will  you please suggest me how do I reformulate the constraint X3 = max
> (0, X1 -2)? Can you help me with an example code?
>
>
> Thank You.
>
>
> Regards,
>
> Ukesh Chawal
>
> Graduate Teaching and Research Assistant
>
> IMSE PhD Student
>
> The University of Texas at Arlington
>
> ukesh.chawal at 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=CwMF-g&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=ZxcvfrgBj_XEFq5Ymi2c2hQYsUUIXtcIIzgczKPIqFs&m=Kl-_A0EWC0GU0zn_NXBiff9CpniGjDUbFxQlaZkMoDI&s=UqMaf2EokQDPZaVp4cxZ4-Mc8T2zRStVmAxn-jWCwQ0&e=>
> ------------------------------
> *From:* Stefan Vigerske <stefan at math.hu-berlin.de>
> *Sent:* Monday, October 10, 2016 1:48:46 PM
> *To:* Chawal, Ukesh; couenne at list.coin-or.org; pbelott at clemson.edu
> *Subject:* Re: [Couenne] Ampl code trying to solve using couenne solver
>
> Hi,
>
> AMPLs presolve will have replaced max (0, 9 -2) by a constant before
> Couenne had a chance to complain.
> You will have to reformulate X3 = max (0, X1 -2).
>
> Stefan
>
> On 10/10/2016 08:27 PM, Chawal, Ukesh wrote:
> > Hello,
> >
> >           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:-
> >
> >
> > var X1 >=0 <=9.5 integer;
> > var X2 >=0 <=9.5 integer;
> > var X3 >=0 integer;
> > minimize Y: -2540.33 -154.669 * X1 + 40.0895 * X2 + X3;
> > subject to a1: X3 = max (0, X1 -2);
> >
> >
> > ampl: reset;
> > ampl: include trial.run;
> > couenne:
> > ANALYSIS TEST: ERROR: unknown operator (address 0p741f20), aborting.
> > exit code 18446744073709551615
> > <BREAK>
> > ************************************************************
> *******************************************************
> > var X1 >=0 <=9.5 integer;
> > var X2 >=0 <=9.5 integer;
> > var X3 >=0 integer;
> > minimize Y: -2540.33 -154.669 * X1 + 40.0895 * X2 + X3;
> > subject to a1: X3 = max (0, 9 -2);
> >
> >
> > ampl: reset;
> > ampl: include trial.run;
> > couenne:
> > ANALYSIS TEST: Problem size before reformulation: 2 variables (2
> integer), 0 constraints.
> > Problem size after  reformulation: 3 variables (2 integer), 0
> constraints.
> > ************************************************************
> ******************
> > This program contains Ipopt, a library for large-scale nonlinear
> optimization.
> >  Ipopt is released as open source code under the Common Public License
> (CPL).
> >          For more information visit https://urldefense.proofpoint.
> com/v2/url?u=http-3A__projects.coin-2Dor.org_Ipopt&d=CwIFAw&c=Ngd-
> ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlR
> ySBDabuq0O1ZI&m=73-Q-GECsIsyPehmiseVQOKhwoqWO0aQLacYmzMgTzs&s=XPz_APTl-
> ruSmbCXxqC8uPk61hQqr3s4ZVqN_xo6y7k&e=
> > ************************************************************
> ******************
> > NOTE: You are using Ipopt by default with the MUMPS linear solver.
> >       Other linear solvers might be more efficient (see Ipopt
> documentation).
> > Cbc0012I Integer solution of -3925.35 found by Init Rounding NLP after 0
> iterations and 0 nodes (0.00 seconds)
> > Cbc0001I Search completed - best objective -3925.351, took 0 iterations
> and 0 nodes (0.00 seconds)
> > Cbc0035I Maximum depth 0, 0 variables fixed on redu
> >   "Finished"
> > couenne: Optimal
> >
> >
> >
> > Thank You.
> >
> >
> > Regards,
> >
> > Ukesh Chawal
> >
> > Graduate Teaching and Research Assistant
> >
> > IMSE PhD Student
> >
> > The University of Texas at Arlington
> >
> > ukesh.chawal at 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-
> 2DSuhixzhS37PSCG0AYQBpAGwAdABvADoAdQBrAGUAcwBoAC4AYwBoAGEAdw
> BhAGwAQAB1AHQAYQAuAGUAZAB1AA..-26URL-3Dmailto-253aukesh.
> chawal-2540uta.edu&d=CwIFAw&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx
> WPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=73-Q-
> GECsIsyPehmiseVQOKhwoqWO0aQLacYmzMgTzs&s=wnUGMjsCwsbbVM6y6kxOZ7Djax9_
> D1iz3A9HzE0pNl8&e= >
> >
> >
> >
> > _______________________________________________
> > Couenne mailing list
> > Couenne at list.coin-or.org
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__list.
> coin-2Dor.org_mailman_listinfo_couenne&d=CwICAg&c=Ngd-
> ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlR
> ySBDabuq0O1ZI&m=73-Q-GECsIsyPehmiseVQOKhwoqWO0aQLac
> YmzMgTzs&s=XnWorzI8Umgrc_UsPjzPnUOrrXHuCHYSclws6t9daPI&e=
> >
>
>
> --
> http://www.gams.com/~stefan
> <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=>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/couenne/attachments/20161010/cd30a197/attachment.html>


More information about the Couenne mailing list