[Ipopt] AMPL/Iopt weirdness

Horand Gassmann Horand.Gassmann at Dal.Ca
Wed Aug 31 16:53:32 EDT 2011


I have two versions of an AMPL model for a Rosenbrock-type function.

The first AMPL file looks like this:

param scale = 100.0;



var x{0..3} >=0, <=10;



minimize objective: 5.01 + (1-x[0]**2)**2

              + scale*   (x[0]-x[1]**2)**2

              + scale**2*(x[1]-x[2]**2)**2

              + scale**3*(x[2]-x[3]**2)**2;

and in the second one I replaced the bounds by explicit constraints:

param scale = 100.0;

param lbl = 0.0;

param ubl = 10.0;



var x{0..3};



minimize objective: 5.01 + (1-x[0]**2)**2

              + scale*   (x[0]-x[1]**2)**2

              + scale**2*(x[1]-x[2]**2)**2

              + scale**3*(x[2]-x[3]**2)**2;



subject to boxL{i in 0..3}: lbl <= x[i] ;

subject to boxU{i in 0..3}: ubl >= x[i] ;


I solve each version in two ways: calling Ipopt from AMPL, and using  
AMPL to write the .nl file (in ASCII form) and then calling Ipopt as a  
standalone.

What I do not understand is the output that is generated. I end up  
with the same optimal solution (objective value 5.01), but I get there  
via different paths! The version with the bounds takes 136 iterations  
either way, as does the version with the explicit constraints if I  
start it from AMPL. But if I write out the second model to a .nl file  
and read that into Ipopt at the command line,the problem solves in 11  
iterations. I do not understand how that can be. The executable is the  
same, and the .nl file is the same (I am working under Ubuntu 11.04,  
which supports IEEE floating point --- right?) So what is different?

Any ideas?

Thanks

gus



More information about the Ipopt mailing list