[Couenne] Ampl code trying to solve using couenne solver

Stefan Vigerske stefan at math.hu-berlin.de
Mon Oct 10 14:48:46 EDT 2016


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=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&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-2DSuhixzhS37PSCG0AYQBpAGwAdABvADoAdQBrAGUAcwBoAC4AYwBoAGEAdwBhAGwAQAB1AHQAYQAuAGUAZAB1AA..-26URL-3Dmailto-253aukesh.chawal-2540uta.edu&d=CwIFAw&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_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=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=73-Q-GECsIsyPehmiseVQOKhwoqWO0aQLacYmzMgTzs&s=XnWorzI8Umgrc_UsPjzPnUOrrXHuCHYSclws6t9daPI&e=
>


-- 
http://www.gams.com/~stefan


More information about the Couenne mailing list