[Ipopt-tickets] [Ipopt] #183: AMPL loops tests fail with Ipopt (??? Lagrange multipliers instead of "dual/marginal_value")

Ipopt coin-trac at coin-or.org
Tue May 8 12:39:03 EDT 2012


#183: AMPL loops tests fail with Ipopt (??? Lagrange multipliers instead of
"dual/marginal_value")
----------------------------------------+------------------------
Reporter:  VladimirVV                   |      Owner:  ipopt-team
    Type:  defect                       |     Status:  new
Priority:  high                         |  Component:  Ipopt
 Version:  3.10                         |   Severity:  major
Keywords:  AMPL loops sign dual values  |
----------------------------------------+------------------------
 Ipopt returns (back to AMPL) dual variables with opposite sign as other
 AMPL-compatible solvers do.
 Take for example simplest problem:[[BR]]
  |x| -> min
 formulated as LP-problem[[BR]]
 {{{
 #===== TestDualLP.mod ======
 var x;
 var z;
 minimize MOD: z;
 s.t. upZ: x - z <= 0;
 s.t. loZ: -z - x <= 0;
 }}}

 Run the following AMPL-script (TestDualLP.amp, TestDualLP.mod in attach)
 with different value of[[BR]]
 option solver lpsolve | snopt | knitro[[BR]]
 {{{
 #===== TestDualLP.amp ======[[BR]]
 model TestDualLP.mod;
 option solver lpsolve; #and with other: snopt, knitro, ipopt
 solve LPp;
 display x;
 display upZ;
 display loZ;
 }}}

 For lpsolve, snopt and knitro you'll get the following result, i.e.
 marginal value of right side of "<= p" constraint (diff(min)/diff(p)), NOT
 the Lagrange multiplier which is positive here !! [[BR]]
 {{{
 x = 0
 upZ = -0.5
 loZ = -0.5
 }}}

 But for[[BR]]
 option solver ipopt[[BR]]
 signs of duals is opposite (i.e. Ipopt returns Lagrange multiplier instead
 of marginal value).[[BR]]

 {{{
 x = 5.19833e-23
 upZ = 0.5
 loZ = 0.5
 }}}


 The same effect may be reproduced for simplest NLP problem with equation
 constraint also (TestDualQP.amp, TestDualQP.mod in attach).[[BR]]
 {{{
 #===== TestDualEq.mod ======
 var x;
 var y;
 minimize SQ: x^2 + y^2;
 s.t. eq: x + y = 2;
 }}}


 I have found the problem on running AMPL loops demo-scripts
 ([http://www.ampl.com/NEW/loop2.html]) with different AMPL-solvers (on
 Linux):
 lpsolve, snopt, knitro and ipopt (Ipopt 3.10.0 (Linux
 2.6.32-71.29.1.el6.x86_64), ASL(20110308)).
 and found that all solvers work properly except Ipopt.

 Take multi2 for instance with "option solver ipopt;" in multi2.run.

 $ampl multi2.run
 fails with the following dump (final part of output and whole calculations
 scenario is wrong)[[BR]]
 {{{
 PHASE I -- ITERATION 3

 PRODUCT bands

 Error at _cmdno 104 executing "solve" command
 (file multi2.run, line 39, offset 1034):
 error processing param price['CLEV','STL']:
        failed check: param price['CLEV','STL'] = 0.6209092318224038
                is not <= 1e-06;
 }}}

-- 
Ticket URL: <https://projects.coin-or.org/ticket/183>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.



More information about the Ipopt-tickets mailing list