IPOPT: problem becomes infeasible after relaxing constraint?!

392 views
Skip to first unread message

Niklas Hinkel

unread,
Jul 31, 2018, 3:40:52 PM7/31/18
to Pyomo Forum

I changed a parameter (that was the only change) in a working optimization problem.

The smaller the parameter, the more relaxed becomes one of the inequality constraints.
The change was from 0.489 to 0.355881.
The whole problem is scaled to have input and objective variables at similar size around 1.

The altered parameter would relax one inequality constraint.
I solved the problem again with IPOPT (as before) and it became infeasible.

Then, I tinkered with the problem in a couple of ways (each separately):
- I rounded the parameter to more than 2 decimals (0.356 etc.) ----> the model was still infeasible
- I rounded the parameter to 0.36 or 0.4 ----> the model was feasible again with optimal solution
- I reduced the parameter further to .3 (i.e. relaxing the constraint more) ---> the model was feasible again with optimal solution
- I used different starting points ---> the model was feasible again with optimal solution

I don't see why the problem would become infeasible.
Do you have any ideas?
Please help! Thanks!

Niklas

p.s.:
I use Pyomo 5.5 (CPython 3.6.3 on Windows 10).
The detailed solver print out is below.


******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

This is Ipopt version 3.12.4, running with linear solver pardiso.

Number of nonzeros in equality constraint Jacobian...:        0
Number of nonzeros in inequality constraint Jacobian.:      152
Number of nonzeros in Lagrangian Hessian.............:      112

Total number of variables............................:       64
                     variables with only lower bounds:        0
                variables with lower and upper bounds:       64
                     variables with only upper bounds:        0
Total number of equality constraints.................:        0
Total number of inequality constraints...............:       17
        inequality constraints with only lower bounds:        8
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        9

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0 2.5214806e+000 0.00e+000 1.00e+000  -1.0 0.00e+000    -  0.00e+000 0.00e+000   0
   1 2.4737837e+000 0.00e+000 1.00e+000  -1.0 3.68e+000    -  7.29e-001 1.00e+000f  1
   2 2.4369291e+000 0.00e+000 8.73e-002  -1.0 2.94e+000    -  9.88e-001 1.00e+000f  1
   3 1.3663375e+000 0.00e+000 1.47e-002  -1.0 5.86e+001    -  9.57e-001 1.00e+000f  1
   4 5.1228197e-001 0.00e+000 5.55e-003  -1.0 6.81e+002    -  9.87e-001 1.00e+000f  1
   5 1.9864862e-001 0.00e+000 3.76e-002  -1.0 6.83e+004    -  7.84e-001 1.00e+000f  1
   6 -4.4837005e-001 0.00e+000 4.10e-001  -1.0 1.35e+006    -  2.44e-001 4.40e-001f  1
   7 -5.9509218e-001 0.00e+000 1.89e-002  -1.0 1.62e+005    -  1.00e+000 8.90e-001f  1
   8 -4.6760459e-001 0.00e+000 2.79e-003  -1.0 3.53e+005    -  1.00e+000 1.00e+000f  1
   9 -7.9516515e-001 0.00e+000 2.80e-002  -1.7 1.30e+005    -  9.06e-001 1.00e+000h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  10 -1.0944033e+000 0.00e+000 2.24e-002  -2.5 1.83e+005    -  7.15e-001 9.43e-001h  1
  11 -1.2052518e+000 0.00e+000 8.92e-004  -2.5 1.46e+005    -  1.00e+000 1.00e+000h  1
  12 -1.2361786e+000 0.00e+000 2.36e-004  -2.5 1.04e+005    -  1.00e+000 1.00e+000h  1
  13 -1.2341972e+000 0.00e+000 1.49e-005  -2.5 6.83e+003    -  1.00e+000 1.00e+000h  1
  14 -1.2339619e+000 0.00e+000 3.00e-007  -2.5 2.16e+002    -  1.00e+000 1.00e+000h  1
  15 -1.2995369e+000 8.58e+002 2.61e-003  -3.8 1.16e+005    -  7.16e-001 1.00e+000f  1
  16 -1.3143877e+000 1.64e+001 6.35e-003  -3.8 1.42e+004    -  7.84e-001 1.00e+000h  1
  17 -1.3174137e+000 0.00e+000 1.86e-005  -3.8 8.90e+003    -  1.00e+000 1.00e+000h  1
  18 -1.3176631e+000 0.00e+000 1.20e-005  -3.8 1.20e-001  -4.0 1.00e+000 1.00e+000h  1
  19 -1.3176870e+000 0.00e+000 7.26e-006  -3.8 2.18e-001  -4.5 1.00e+000 1.00e+000h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  20 -1.3208126e+000 0.00e+000 3.83e-002  -5.7 2.29e+000  -5.0 8.66e-001 7.53e-001h  1
  21 -1.3221350e+000 2.04e+001 9.72e-003  -5.7 2.65e+000  -5.4 7.52e-001 7.50e-001h  1
  22 -1.3225158e+000 7.20e+000 2.77e-005  -5.7 5.16e-001  -5.9 1.00e+000 1.00e+000h  1
  23 -1.3225100e+000 0.00e+000 1.85e-006  -5.7 1.55e+000  -6.4 1.00e+000 1.00e+000h  1
  24 -1.3225366e+000 0.00e+000 6.36e-007  -5.7 4.64e+000  -6.9 1.00e+000 1.00e+000h  1
  25 -1.3226904e+000 3.82e-001 1.34e-004  -8.6 1.40e+001  -7.3 9.44e-001 9.97e-001h  1
  26 -1.3241387e+000 3.60e+000 2.34e-004  -8.6 6.76e+007    -  3.31e-004 3.55e-004f  1
  27 -1.3250017e+000 3.65e+000 1.27e-004  -8.6 2.56e+008    -  1.83e-004 1.78e-004h  1
  28 -1.3255461e+000 3.64e+000 6.27e-003  -8.6 5.15e+007    -  1.22e-003 3.62e-004h  1
  29 -1.3255457e+000 3.64e+000 6.26e-003  -8.6 7.23e+001  -6.0 1.82e-003 1.01e-004h  5
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  30 -1.3255458e+000 3.64e+000 5.69e-003  -8.6 7.96e+000  -6.5 9.14e-002 3.90e-005h  1
  31 -1.3255520e+000 2.86e+000 4.72e-003  -8.6 5.93e+000  -7.0 1.71e-001 2.13e-001f  1
  32 -1.3258193e+000 4.42e+000 5.26e-003  -8.6 2.43e+007    -  2.02e-004 8.63e-004h  1
  33 -1.3258195e+000 4.42e+000 5.25e-003  -8.6 1.77e+001  -7.4 2.59e-003 9.54e-004h  1
  34 -1.3260189e+000 4.53e+000 6.58e-003  -8.6 5.86e+007    -  3.62e-004 2.04e-004f  1
  35 -1.3261268e+000 4.72e+000 6.60e-003  -8.6 2.25e+007    -  6.20e-004 5.76e-004h  1
  36 -1.3261395e+000 1.47e+001 6.46e-003  -8.6 1.05e+003  -7.9 2.23e-002 9.79e-003h  1
  37 -1.3263555e+000 1.45e+001 5.59e-003  -8.6 2.11e+007    -  5.95e-004 1.91e-003h  1
  38 -1.3263563e+000 1.45e+001 8.22e-001  -8.6 1.62e+007    -  9.03e-003 1.87e-005h  1
  39 -1.3264961e+000 1.44e+001 8.09e-001  -8.6 8.06e+006    -  1.64e-002 9.92e-003h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  40 -1.3264961e+000 1.44e+001 7.88e-001  -8.6 9.10e+001  -8.4 2.60e-002 1.57e-006h  2
  41r-1.3264961e+000 1.44e+001 9.99e+002  -1.1 0.00e+000    -  0.00e+000 5.54e-012R  7
  42r-1.3262621e+000 1.72e+001 9.99e+002  -1.1 4.53e+004    -  3.48e-006 2.17e-005f  1
  43r-1.3262540e+000 1.66e+001 9.99e+002  -1.1 5.64e+004    -  1.12e-005 5.17e-006f  1
  44r-1.3242322e+000 1.73e+000 9.99e+002  -1.1 1.55e+004    -  3.86e-005 1.01e-003f  1
  45r-1.3225159e+000 0.00e+000 9.95e+002  -1.1 1.03e+004    -  3.71e-003 1.16e-003f  1
  46r-1.3159921e+000 0.00e+000 9.85e+002  -1.1 3.47e+003    -  1.01e-002 5.41e-003f  1
  47r-1.3087683e+000 0.00e+000 9.76e+002  -1.1 2.04e+003    -  9.20e-003 7.62e-003f  1
  48r-1.2033231e+000 0.00e+000 8.82e+002  -1.1 1.59e+003    -  9.63e-002 1.28e-001f  1
  49r-1.2008001e+000 0.00e+000 8.58e+002  -1.1 3.59e+002    -  2.73e-002 1.07e-002h  2
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  50r-1.1915435e+000 0.00e+000 4.90e+001  -1.1 3.12e-001   0.0 1.00e+000 2.23e-001h  1
  51r-1.1127064e+000 0.00e+000 1.72e+000  -1.1 1.53e+002    -  9.66e-001 1.00e+000f  1
  52r-5.3446789e-001 0.00e+000 2.35e+000  -1.1 9.38e+001    -  3.62e-001 7.10e-001f  1
  53r-7.3847126e-001 0.00e+000 2.69e-002  -1.1 4.00e+001    -  1.00e+000 1.00e+000f  1
  54r-8.2011480e-001 0.00e+000 2.57e+000  -1.8 2.06e+002    -  8.63e-001 1.00e+000f  1
  55r-8.1554612e-001 0.00e+000 1.61e-004  -1.8 2.16e+001    -  1.00e+000 1.00e+000h  1
  56r-9.6399660e-001 0.00e+000 1.59e+000  -4.1 1.64e+002    -  7.62e-001 9.98e-001f  1
  57r-9.8030031e-001 0.00e+000 1.82e-004  -4.1 6.42e+000    -  1.00e+000 1.00e+000h  1
  58r-1.1181732e+000 0.00e+000 7.45e-005  -4.1 5.39e+001    -  1.00e+000 1.00e+000h  1
  59r-1.1511414e+000 0.00e+000 6.14e-006  -4.1 1.37e+001    -  1.00e+000 1.00e+000h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  60r-1.1544972e+000 0.00e+000 6.60e-008  -4.1 1.01e+000    -  1.00e+000 1.00e+000h  1
  61r-1.2367954e+000 0.00e+000 1.18e-002  -6.2 4.54e+001    -  9.12e-001 1.00e+000h  1
  62r-1.2410269e+000 0.00e+000 1.43e-006  -6.2 2.46e+000    -  1.00e+000 1.00e+000h  1
  63r-1.2675371e+000 0.00e+000 2.85e-007  -6.2 1.30e+001    -  1.00e+000 1.00e+000h  1
  64r-1.2733319e+000 0.00e+000 1.33e-008  -6.2 2.72e+000    -  1.00e+000 1.00e+000h  1
  65r-1.2736503e+000 0.00e+000 3.64e-011  -6.2 1.29e-001    -  1.00e+000 1.00e+000h  1
  66r-1.3000540e+000 0.00e+000 1.19e-004  -9.0 1.38e+001    -  9.69e-001 1.00e+000h  1

Number of Iterations....: 66

                                   (scaled)                 (unscaled)
Objective...............: -1.3007808010731214e+000  -1.3007808010731214e+000
Dual infeasibility......:  1.2326756390476079e+000   1.2326756390476079e+000
Constraint violation....:  0.0000000000000000e+000   0.0000000000000000e+000
Complementarity.........:  5.6313471319406950e-009   5.6313471319406950e-009
Overall NLP error.......:  1.2326756390476079e+000   1.2326756390476079e+000


Number of objective function evaluations             = 83
Number of objective gradient evaluations             = 43
Number of equality constraint evaluations            = 0
Number of inequality constraint evaluations          = 83
Number of equality constraint Jacobian evaluations   = 0
Number of inequality constraint Jacobian evaluations = 69
Number of Lagrangian Hessian evaluations             = 67
Total CPU secs in IPOPT (w/o function evaluations)   =      0.165
Total CPU secs in NLP function evaluations           =      0.003

EXIT: Converged to a point of local infeasibility. Problem may be infeasible.
WARNING: Loading a SolverResults object with a warning status into
    model=unknown;
        message from solver=Ipopt 3.12.4\x3a Converged to a locally infeasible
        point. Problem may be infeasible.
Ipopt 3.12.4:

Bynum, Michael Lee

unread,
Jul 31, 2018, 3:51:45 PM7/31/18
to pyomo...@googlegroups.com
Ipopt converging to a point of local infeasibility does not necessarily mean your problem is infeasible, particularly if your problem is nonconvex. The key word is “local”. It means something along the lines of converging to a local minimum of the constraint violation. This is why you are able to find feasible solutions by changing your initialization.

Michael

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Niklas Hinkel

unread,
Aug 1, 2018, 4:23:58 PM8/1/18
to Pyomo Forum
Thanks Michael, for clearifying that it doesn't need to be infeasible.

I am still puzzled how relaxing a constraint can create a (potential) infeasibility issue.

jose santiago rodriguez

unread,
Aug 1, 2018, 4:49:15 PM8/1/18
to pyomo...@googlegroups.com
Can you share the output of a feasibile run? Does it regularize at the solution?

To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum+unsubscribe@googlegroups.com.

jose santiago rodriguez

unread,
Aug 1, 2018, 5:52:59 PM8/1/18
to pyomo...@googlegroups.com
Also one way of diagnosing the problem will be to see what's the active set at the solution. Since either way you are getting a solution from ipopt, if I were you I would compare which constraints are binding at the two different solutions. It could be that when you relaxed the constraint, the active set changed and the problem became infeasible.

Check however that the feasible solution you are getting is not regularizing at the solution, nor is running into restoration phase.

Maybe that helps

Niklas Hinkel

unread,
Aug 2, 2018, 11:10:47 AM8/2/18
to Pyomo Forum
What follows are the solver details when I change the starting vector and the problem has an optimal solution:

Ipopt 3.12.4:

******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

This is Ipopt version 3.12.4, running with linear solver pardiso.

Number of nonzeros in equality constraint Jacobian...:        0
Number of nonzeros in inequality constraint Jacobian.:      152
Number of nonzeros in Lagrangian Hessian.............:      112

Total number of variables............................:       64
                     variables with only lower bounds:        0
                variables with lower and upper bounds:       64
                     variables with only upper bounds:        0
Total number of equality constraints.................:        0
Total number of inequality constraints...............:       17
        inequality constraints with only lower bounds:        8
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        9

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0 2.1007235e+000 0.00e+000 1.00e+000  -1.0 0.00e+000    -  0.00e+000 0.00e+000   0
   1 2.0504587e+000 0.00e+000 2.85e+000  -1.0 4.78e+000    -  4.03e-001 1.00e+000f  1
   2 2.0569749e+000 0.00e+000 1.35e+000  -1.0 6.40e+000    -  7.02e-001 1.00e+000f  1
   3 1.8656338e+000 0.00e+000 6.14e-001  -1.0 6.73e+000    -  7.34e-001 1.00e+000f  1
   4 1.7602636e+000 0.00e+000 7.08e-002  -1.0 1.04e+001    -  9.82e-001 1.00e+000f  1
   5 8.5497634e-001 0.00e+000 1.22e-002  -1.0 1.20e+002    -  9.90e-001 1.00e+000f  1
   6 5.1774013e-001 0.00e+000 1.57e-002  -1.0 1.20e+004    -  9.32e-001 1.00e+000f  1
   7 -2.1443062e-001 0.00e+000 1.78e-001  -1.0 9.28e+005    -  2.59e-001 3.40e-001f  1
   8 -5.3924241e-001 0.00e+000 6.83e-002  -1.0 3.56e+005    -  7.56e-001 1.00e+000f  1
   9 -3.8863281e-001 0.00e+000 5.14e-003  -1.0 2.93e+005    -  1.00e+000 1.00e+000h  1

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  10 -7.5980488e-001 0.00e+000 3.75e-002  -1.7 1.48e+005    -  8.75e-001 1.00e+000h  1
  11 -9.7984229e-001 0.00e+000 2.06e-003  -1.7 1.67e+005    -  1.00e+000 1.00e+000h  1
  12 -9.7907874e-001 0.00e+000 1.26e-004  -1.7 2.31e+004    -  1.00e+000 1.00e+000h  1
  13 -1.1752265e+000 0.00e+000 1.48e-002  -3.8 8.19e+004    -  7.62e-001 9.71e-001h  1
  14 -1.2622163e+000 1.69e+002 5.74e-003  -3.8 2.13e+005    -  5.92e-001 8.23e-001h  1
  15 -1.3027701e+000 1.23e+003 2.98e-003  -3.8 1.38e+005    -  7.21e-001 9.04e-001h  1
  16 -1.3146120e+000 8.13e+000 9.83e-004  -3.8 5.55e+003    -  9.71e-001 9.35e-001h  1
  17 -1.3166232e+000 0.00e+000 2.04e-004  -3.8 2.04e+000  -4.0 1.00e+000 1.00e+000h  1
  18 -1.3168226e+000 0.00e+000 3.63e-005  -3.8 1.09e+000  -4.5 1.00e+000 1.00e+000h  1
  19 -1.3186813e+000 1.06e+003 9.08e-004  -3.8 2.81e+005    -  5.67e-002 6.98e-002h  1

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  20 -1.3173543e+000 0.00e+000 2.79e-005  -3.8 2.51e+000  -5.0 1.00e+000 1.00e+000h  1
  21 -1.3174992e+000 0.00e+000 1.84e-005  -3.8 2.86e+000  -5.4 1.00e+000 1.00e+000h  1
  22 -1.3175028e+000 0.00e+000 8.20e-006  -3.8 6.64e+000  -5.9 1.00e+000 1.00e+000h  1
  23 -1.3209432e+000 1.08e+001 1.64e-002  -5.7 3.87e+000  -6.4 8.43e-001 7.91e-001h  1
  24 -1.3223478e+000 2.86e+001 1.20e-002  -5.7 4.58e+000  -6.9 7.57e-001 9.84e-001h  1
  25 -1.3234429e+000 1.83e+002 1.23e-002  -5.7 1.02e+007    -  3.38e-003 2.68e-003h  1
  26 -1.3234445e+000 1.79e+002 1.26e-002  -5.7 1.68e+002  -7.3 2.99e-001 2.42e-002h  1
  27 -1.3237938e+000 1.80e+002 1.25e-002  -5.7 9.85e+006    -  1.40e-004 5.64e-004h  1
  28 -1.3237937e+000 1.80e+002 1.08e-002  -5.7 3.47e+004  -6.9 5.95e-004 1.19e-005h  1
  29 -1.3247272e+000 2.43e+002 9.05e-003  -5.7 6.03e+006    -  1.56e-003 6.38e-003f  1

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  30 -1.3256575e+000 2.44e+002 1.28e-002  -5.7 1.00e+006    -  2.78e-002 1.61e-002h  1
  31 -1.3256580e+000 2.44e+002 2.52e-002  -5.7 1.55e+003  -7.4 8.67e-002 1.92e-003h  1
  32 -1.3259770e+000 2.38e+002 6.71e-002  -5.7 3.68e+005    -  1.61e-001 2.34e-002h  1
  33 -1.3265604e+000 1.90e+002 1.08e-001  -5.7 4.00e+005    -  4.26e-001 2.15e-001h  1
  34 -1.3265218e+000 8.10e+001 1.06e-001  -5.7 1.86e+005    -  9.89e-001 5.79e-001h  1
  35 -1.3264774e+000 4.17e+001 5.61e-002  -5.7 1.79e+004    -  6.37e-001 4.75e-001h  1
  36 -1.3264190e+000 0.00e+000 1.77e-004  -5.7 9.41e+003    -  1.00e+000 1.00e+000h  1
  37 -1.3264188e+000 0.00e+000 3.81e-005  -5.7 4.09e+001    -  1.00e+000 1.00e+000h  1
  38 -1.3264185e+000 0.00e+000 3.02e-006  -5.7 5.46e+000    -  1.00e+000 1.00e+000h  1
  39 -1.3264185e+000 0.00e+000 2.27e-007  -5.7 1.14e+000    -  1.00e+000 1.00e+000h  1

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  40 -1.3265294e+000 1.94e+000 1.59e-005  -8.6 1.73e+004    -  9.42e-001 9.84e-001h  1
  41 -1.3265298e+000 4.21e-002 5.46e-009  -8.6 8.57e+002    -  1.00e+000 1.00e+000h  1
  42 -1.3265298e+000 0.00e+000 7.25e-010  -8.6 6.10e+000    -  1.00e+000 1.00e+000h  1

Number of Iterations....: 42

                                   (scaled)                 (unscaled)
Objective...............: -1.3265298063428457e+000  -1.3265298063428457e+000
Dual infeasibility......:  7.2523905864299802e-010   7.2523905864299802e-010
Constraint violation....:  0.0000000000000000e+000   0.0000000000000000e+000
Complementarity.........:  2.5067743561271193e-009   2.5067743561271193e-009
Overall NLP error.......:  2.5067743561271193e-009   2.5067743561271193e-009


Number of objective function evaluations             = 43

Number of objective gradient evaluations             = 43
Number of equality constraint evaluations            = 0
Number of inequality constraint evaluations          = 43

Number of equality constraint Jacobian evaluations   = 0
Number of inequality constraint Jacobian evaluations = 43
Number of Lagrangian Hessian evaluations             = 42
Total CPU secs in IPOPT (w/o function evaluations)   =      0.131
Total CPU secs in NLP function evaluations           =      0.001

EXIT: Optimal Solution Found.

Niklas Hinkel

unread,
Aug 2, 2018, 11:33:34 AM8/2/18
to Pyomo Forum
So, I see the feasible solution does not run into restoration phase.

How would I check that the feasible solution is not regularized at the solution? What does that mean?

Can I see what constraint is binding in the solver output? I just read (short tutorial by A. Wächter) that IPOPT creates internal slack variables to turn all inequality constraints into equality constraints. For the binding constraints those internal slack variables would be 0, right? Is there a way to print these out? Is there another way to see what constraint is binding? Sorry if these should be very obvious questions.

Santiago rodriguez

unread,
Aug 3, 2018, 3:54:03 PM8/3/18
to Pyomo Forum
Hi Niklas, 

1. Regularization happens in ipopt when the reduced hessian is not positive definite. You can read about regularization in ipopt's implementation paper in the section where they talk about inertia correction. You could tell from ipopt's output if a step required regularization if the  lg(rg) column is different than "-". A convex problem that is well scaled most likely never regularizes. For nonconvex problems, I would think of regularization as a mechanism to adjust the KKT system in order to find descent directions whenever the reduce hessian is not p.d. Look at ipopt's paper or at some NLP books (Biegler, Nocedal & Wright) for a more accurate explanation of regularization. If the solver regularizes at the solution that would mean the reduce hessian is not positive definite which is one of the optimality conditions.

2. To check if a constraint is binding you could do something like

def ComputeConstraintResid(con):
bodyval = value(con.body)
upper_resid = 0
if con.upper is not None:
upper_resid = max(0, bodyval - value(con.upper))
lower_resid = 0
if con.lower is not None:
lower_resid = max(0, value(con.lower) - bodyval)
return max(upper_resid, lower_resid)

you could do something similar with the inequality constraints and check if the residual is zero (within some tolerance). That way you could tell if the active set changed at the solution when you relaxed the parameter. 

I am not entirely sure but to get info on the slacks you could change the print level of ipopt. That will log more information to the screen including the slacks but is not very readable :s

Reply all
Reply to author
Forward
0 new messages