[Coin-ipopt] Maximum constraint violation
Andreas Waechter
andreasw at watson.ibm.com
Tue Aug 30 14:56:22 EDT 2005
Hi Danh,
It's hard to say anything specific without knowing what g1(x) and g2(x)
are in your constraints.
The convergence behavior we see in the output is certainly not nice; it
takes many iterations, and even though the error is small at those high
iterations, it does not converge quickly.
Ipopt requires smooth objective and constraint function, because it
essentially works with a local linear/quadratic model of those functions,
based on a first and second order Taylor expansions. Therefore, if you
give Ipopt functions that are not continuously differentiable, this model
can be bad and might not sufficiently well predict the behavior of the
actual objective and constraint functions, so that the computed search
direction, which are based on the model, can be bad.
In practice, Ipopt might still work fine if the functions are not smooth
at some points, and if the algorithm doesn't get trapped at a non-smooth
point.
In your case, not knowing what g1(x) and g2(x) are, I assume you chose
"C(x)=constant if x=0" to make this constraint continuous. Maybe you can
even have continuous first (and even second) derivatives, or does the
function have a "kink" at x=0? If it doesn't have a kink, are you
providing the correct derivative value at x=0 (which is not necessarily
0)?
Don't know if that is his helpful...
Andreas
On Tue, 30 Aug 2005, Su Ba wrote:
> Dear Andreas,
>
> Warmly congratulations for a new version of Ipopt!
>
> I met the following difficulty. I ran one optimisation problem with two
> tolerances 1e-4 and 1e-6.
> With the first my problem converged [1](its solution is similar to
> Lancelot´s) but the latter[2] does not. Is there any numerical noise?
> I tested DPRECFACT,DMOVEBOUND,IMERIT... But it is same.
>
> My constraints has the following form:
> C(x)=g1(x)+sqrt(g2(x))-const<=0 if x<>0 (its geometry is a cone with a
> rounded cap)
> C(x)=constant if x=0
> Its gradients and derivatives are determined.
>
> I know that Ipopt uses really smooth functions. It needs at a least twice
> differentiable function. In my case, could Ipopt solve my problem?
>
> Does the following error mean that my constraints are not bounded at the
> trial point? Does my model have any mistake in constraint condition? Could
> you recommend me how to overcome this difficulty?
>
> Maximum constraint violation 7.07936555E-07 below tolerance.
> filter: Error: resto_filter returns IERR = 18
> solve_barrier: filter returns IERR = 18
> mainloop: Error: solve_barrier ends with IERR = 18
>
> Thank you so much in advance.
>
> Danh.
>
>
> [1]
> ******************************************************************************
> This program contains IPOPT, a program for large-scale nonlinear
> optimization.
> IPOPT is released as open source under the Common Public License (CPL).
> For more information visit www.coin-or.org/Ipopt
> ******************************************************************************
>
> Going to allocate double precision work space of size 54007
> integer work space of size 13715
>
>
> Number of variables : 161
> of which are fixed : 0
> Number of constraints : 82
> Number of lower bounds : 1
> Number of upper bounds : 64
> Number of nonzeros in Jacobian: 1088
> Number of nonzeros in Hessian : 433
> get_scale: |g|_inf = 1.
> get_scale: QFSCALE = 1.
> get_scale: smallest CSCALE = 1.
> get_scale: No scaling of constraints necessary
>
> ITER ERR MU ||C|| ||YPY|| ||PZ|| ||D|| ALFA(V)
> ALFA(X) NU #LS F #cor Regu CPU(s)
> 0 .101E+03c .100E+00 .124E+03 .000E+00 .000E+00 .000E+00 .000E+00
> .000E+00 .000E+00 0 -.10065946E+03 0 .000E+00 .270E-01
> Constraints not dependent.
> Hessian not dependent.
> 1 .572E+03d .100E+00 .630E+02 .000E+00 .000E+00 .156E+03 .627E-03d
> .100E+01f .000E+00 1 -.80104232E+02 0 .000E+00 .350E-01
> 2 .176E+03d .100E+00 .614E+02 .000E+00 .000E+00 .582E+02 .281E-01p
> .248E-01h .000E+00 1 -.79934027E+02 5 .100E+05 .450E-01
> 3 .172E+03d .100E+00 .614E+02 .000E+00 .000E+00 .570E+02 .649E-01p
> .321E-03h .000E+00 1 -.79931485E+02 1 .333E+04 .510E-01
> 4 .363E+03d .100E+00 .610E+02 .000E+00 .000E+00 .595E+02 .128E+00p
> .622E-02h .000E+00 1 -.79858141E+02 2 .889E+04 .580E-01
> 5 .326E+03d .100E+00 .598E+02 .000E+00 .000E+00 .595E+02 .657E-01p
> .205E-01h .000E+00 1 -.79599898E+02 1 .296E+04 .650E-01
> 6 .359E+03d .100E+00 .586E+02 .000E+00 .000E+00 .585E+02 .180E+00p
> .214E-01h .000E+00 1 -.79323396E+02 2 .790E+04 .730E-01
> 7 .219E+03d .100E+00 .173E+02 .000E+00 .000E+00 .580E+02 .131E+00d
> .100E+01h .000E+00 1 -.66605659E+02 1 .263E+04 .790E-01
> 8 .425E+03d .100E+00 .301E+01 .000E+00 .000E+00 .822E+01 .532E+00d
> .100E+01h .000E+00 1 -.62991091E+02 2 .702E+04 .870E-01
> 9 .626E+03d .100E+00 .711E+00 .000E+00 .000E+00 .150E+01 .209E-01d
> .100E+01f .000E+00 1 -.62171617E+02 2 .187E+05 .950E-01
>
> ...
> ...
>
> ITER ERR MU ||C|| ||YPY|| ||PZ|| ||D|| ALFA(V)
> ALFA(X) NU #LS F #cor Regu CPU(s)
> 1000 .353E-03p .100E-04 .965E-03 .000E+00 .000E+00 .307E-01 .100E+01
> .250E+00h .000E+00 3 -.69106563E+02 0 .000E+00 .747E+01
> filter: It is possible that filter blocks progress.
> Wake up watchdog for next iteration.
> 1001 .259E-03p .100E-04 .698E-03 .000E+00 .000E+00 .241E-01 .100E+01
> .250E+00h .000E+00 3 -.69106562E+02 0 .000E+00 .748E+01
> 1002 .113E-02p .100E-04 .396E-02 .000E+00 .000E+00 .191E-01 .100E+01
> .100E+01w .000E+00 2 -.69106559E+02 0 .000E+00 .748E+01
> 1003 .243E-03p .100E-04 .646E-03 .000E+00 .000E+00 .191E-01 .100E+01
> .250E+00J .000E+00 3 -.69106561E+02 0 .000E+00 .749E+01
> 1004 .179E-03p .100E-04 .470E-03 .000E+00 .000E+00 .150E-01 .100E+01
> .250E+00h .000E+00 3 -.69106561E+02 0 .000E+00 .750E+01
> 1005 .169E-03p .100E-04 .440E-03 .000E+00 .000E+00 .120E-01 .100E+01
> .250E+00h .000E+00 3 -.69106560E+02 0 .000E+00 .750E+01
> 1006 .126E-03p .100E-04 .325E-03 .000E+00 .000E+00 .936E-02 .100E+01
> .250E+00h .000E+00 3 -.69106560E+02 0 .000E+00 .751E+01
> 1007 .119E-03p .100E-04 .306E-03 .000E+00 .000E+00 .746E-02 .100E+01
> .250E+00h .000E+00 3 -.69106560E+02 0 .000E+00 .752E+01
> filter: It is possible that filter blocks progress.
> Wake up watchdog for next iteration.
> 1008 .892E-04p .100E-04 .231E-03 .000E+00 .000E+00 .584E-02 .100E+01
> .250E+00h .000E+00 3 -.69106559E+02 0 .000E+00 .752E+01
>
> Number of iterations taken ............. 1008
> Final value of objective function is....-0.6910655927650168E+02
>
> Errors at final point (scaled) (unscaled)
> Final maximal constraint violation is... 0.891716E-04 0.891716E-04
> Final value for dual infeasibility is... 0.172521E-04 0.172511E-04
> Final value of complementarity error is. 0.100002E-04 0.100008E-04
>
> The objective function was evaluated 2390 times.
> The constraints were evaluated 2390 times.
>
> EXIT: OPTIMAL SOLUTION FOUND
>
> CPU seconds spent in IPOPT and function evaluations = 7.5000
>
>
> The solution was found after 1008 Iterations.
>
> The final value of the objective function is -69.1065593
>
>
> [2]
> ******************************************************************************
> This program contains IPOPT, a program for large-scale nonlinear
> optimization.
> IPOPT is released as open source under the Common Public License (CPL).
> For more information visit www.coin-or.org/Ipopt
> ******************************************************************************
>
> Going to allocate double precision work space of size 54007
> integer work space of size 13715
>
>
> Number of variables : 161
> of which are fixed : 0
> Number of constraints : 82
> Number of lower bounds : 1
> Number of upper bounds : 64
> Number of nonzeros in Jacobian: 1088
> Number of nonzeros in Hessian : 433
> get_scale: |g|_inf = 1.
> get_scale: QFSCALE = 1.
> get_scale: smallest CSCALE = 1.
> get_scale: No scaling of constraints necessary
>
> ITER ERR MU ||C|| ||YPY|| ||PZ|| ||D|| ALFA(V)
> ALFA(X) NU #LS F #cor Regu CPU(s)
> 0 .101E+03c .100E+00 .124E+03 .000E+00 .000E+00 .000E+00 .000E+00
> .000E+00 .000E+00 0 -.10065946E+03 0 .000E+00 .280E-01
> Constraints not dependent.
> Hessian not dependent.
> 1 .572E+03d .100E+00 .630E+02 .000E+00 .000E+00 .156E+03 .627E-03d
> .100E+01f .000E+00 1 -.80104232E+02 0 .000E+00 .360E-01
> 2 .176E+03d .100E+00 .614E+02 .000E+00 .000E+00 .582E+02 .281E-01p
> .248E-01h .000E+00 1 -.79934027E+02 5 .100E+05 .470E-01
> 3 .172E+03d .100E+00 .614E+02 .000E+00 .000E+00 .570E+02 .649E-01p
> .321E-03h .000E+00 1 -.79931485E+02 1 .333E+04 .530E-01
> 4 .363E+03d .100E+00 .610E+02 .000E+00 .000E+00 .595E+02 .128E+00p
> .622E-02h .000E+00 1 -.79858141E+02 2 .889E+04 .600E-01
> 5 .326E+03d .100E+00 .598E+02 .000E+00 .000E+00 .595E+02 .657E-01p
> .205E-01h .000E+00 1 -.79599898E+02 1 .296E+04 .680E-01
> 6 .359E+03d .100E+00 .586E+02 .000E+00 .000E+00 .585E+02 .180E+00p
> .214E-01h .000E+00 1 -.79323396E+02 2 .790E+04 .750E-01
> 7 .219E+03d .100E+00 .173E+02 .000E+00 .000E+00 .580E+02 .131E+00d
> .100E+01h .000E+00 1 -.66605659E+02 1 .263E+04 .820E-01
> 8 .425E+03d .100E+00 .301E+01 .000E+00 .000E+00 .822E+01 .532E+00d
> .100E+01h .000E+00 1 -.62991091E+02 2 .702E+04 .900E-01
> 9 .626E+03d .100E+00 .711E+00 .000E+00 .000E+00 .150E+01 .209E-01d
> .100E+01f .000E+00 1 -.62171617E+02 2 .187E+05 .970E-01
> ...
> ...
> ITER ERR MU ||C|| ||YPY|| ||PZ|| ||D|| ALFA(V)
> ALFA(X) NU #LS F #cor Regu CPU(s)
> 6280 .100E+01d .100E-06 .134E-03 .000E+00 .000E+00 .730E-03 .100E+01r
> .100E+01h .000E+00 1 -.67851161E+02 0 .000E+00 .598E+02
> 6281 .100E+01d .100E-06 .612E-04 .000E+00 .000E+00 .344E-03 .100E+01r
> .100E+01h .000E+00 1 -.67851146E+02 0 .000E+00 .598E+02
> 6282 .100E+01d .100E-06 .286E-04 .000E+00 .000E+00 .158E-03 .100E+01r
> .100E+01h .000E+00 1 -.67851154E+02 0 .000E+00 .598E+02
> 6283 .100E+01d .100E-06 .132E-04 .000E+00 .000E+00 .738E-04 .100E+01r
> .100E+01h .000E+00 1 -.67851151E+02 0 .000E+00 .599E+02
> 6284 .100E+01d .100E-06 .614E-05 .000E+00 .000E+00 .341E-04 .100E+01r
> .100E+01h .000E+00 1 -.67851152E+02 0 .000E+00 .599E+02
> Restoration phase problem converged.
> Maximum constraint violation 7.07936555E-07 below tolerance.
> filter: Error: resto_filter returns IERR = 18
> solve_barrier: filter returns IERR = 18
> mainloop: Error: solve_barrier ends with IERR = 18
>
> Number of iterations taken ............. 6284
> Final value of objective function is....-0.6785115169842510E+02
>
> Errors at final point (scaled) (unscaled)
> Final maximal constraint violation is... 0.707937E-06 0.707937E-06
> Final value for dual infeasibility is... 0.100000E+01 0.100000E+01
> Final value of complementarity error is. 0.100000E-06 0.100000E-06
>
> The objective function was evaluated 75765 times.
> The constraints were evaluated 75765 times.
>
> EXIT: Restoration phase cannot further improve feasibility
>
> CPU seconds spent in IPOPT and function evaluations = 59.8490
>
>
> An error occoured after 6284 Iterations.
> The error code is 18
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
> _______________________________________________
> Coin-ipopt mailing list
> Coin-ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-ipopt
>
>
More information about the Coin-ipopt
mailing list