[Couenne] Ampl code trying to solve using couenne solver
Chawal, Ukesh
ukesh.chawal at mavs.uta.edu
Mon Oct 10 15:03:52 EDT 2016
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://owa.uta.edu/owa/chawalu@exchange.uta.edu/redir.aspx?SURL=KvdqIrJYYFJEInR__ScoZicftjVuRA8fhtn9F2i-SuhixzhS37PSCG0AYQBpAGwAdABvADoAdQBrAGUAcwBoAC4AYwBoAGEAdwBhAGwAQAB1AHQAYQAuAGUAZAB1AA..&URL=mailto%3aukesh.chawal%40uta.edu>
________________________________
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=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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/couenne/attachments/20161010/8f6762e4/attachment.html>
More information about the Couenne
mailing list