[Ipopt] Ipopt converges not to desired point
Илья Палачев
palachev.ilya at yandex.ru
Wed Jul 9 09:57:41 EDT 2014
<div>Hi, all.</div><div> </div><div>I'm using Ipopt via C++ interface to solve the following problem:</div><div> </div><div>minimize || h - h0 ||^2</div><div> </div><div>subject to Q h >= 0</div><div> </div><div>where h0 (known) and h (unknown) is vector of dimension N and Q is M x N matrix.</div><div> </div><div>Q is always very sparse: it has only 4 non-zero elements in each row. Also we know that its rank is always (N - 3) and 3 basis vectors of its kernel are known beforehand (a priori).</div><div> </div><div>Usually N ~ 5000 and M ~ 15000. From empirical knowledge we are expecting that minimal value of the functional must be near 0, because vector h0 lies closely to the set {Q h >= 0}</div><div> </div><div>But Ipopt converges in 1-2 seconds to the point where this value is too big.</div><div> </div><div>I set tolerance values as follows:</div><div> </div><div> app->Options()->SetNumericValue("tol", 1e-10);</div><div> app->Options()->SetNumericValue("acceptable_tol", 1e-10);</div><div> </div><div>In function "get_starting_point" starting point is set to (1, 1, ..., 1) - it always lies inside the set {Q h >= 0}</div><div>In function "eval_g" the vector Q * x is computed.</div><div>In function "eval_jac_g" the matrix Q is computed</div><div>In function "eval_h" the matrix 2 * obj_value * I is computed, where I is the identity matrix.</div><div> </div><div>Can you clarify the following questions:</div><div> </div><div>1. Am I using Iptopt correctly for this problem?</div><div>2. Are there any possible options/modes that can help to avoid this problem?</div><div>3. Or the problem is infeasible itself? How can I reformulate it to be able to obtain appropriate solution?</div><div> </div><div>Here is the log from Ipopt:</div><div> </div><div>******************************************************************************</div><div>This program contains Ipopt, a library for large-scale nonlinear optimiza
tion.</div><div>Ipopt is released as open source code under the Eclipse Public License (EPL).</div><div> For more information visit http://projects.coin-or.org/Ipopt</div><div>******************************************************************************</div><div> </div><div>This is Ipopt version 3.11.7, running with linear solver ma27.</div><div> </div><div>Number of nonzeros in equality constraint Jacobian...: 0</div><div>Number of nonzeros in inequality constraint Jacobian.: 14456</div><div>Number of nonzeros in Lagrangian Hessian.............: 1240</div><div> </div><div>Total number of variables............................: 1240</div><div> variables with only lower bounds: 0</div><div> variables with lower and upper bounds: 0</div><div> variables with only upper bounds: 0</div><div>Total number of equality constraints.................: 0</div><div>Total number of inequality constraints...............: 3614</div><div> inequality constraints with only lower bounds: 3614</div><div> inequality constraints with lower and upper bounds: 0</div><div> inequality constraints with only upper bounds: 0</div><div> </div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 0 1.8336107e+03 0.00e+00 1.05e+01 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0</div><div> 1 1.6674085e+03 9.38e-03 9.96e+00 -1.0 4.94e+00 - 8.49e-02 4.82e-02
f 1</div><div> 2 1.4326345e+03 8.72e-03 3.33e+01 -1.0 4.92e+00 - 3.41e-01 7.77e-02f 1</div><div> 3 1.2617809e+03 8.15e-03 9.36e+01 -1.0 4.17e+00 - 3.21e-01 6.85e-02f 1</div><div> 4 1.0488307e+03 7.32e-03 4.45e+02 -1.0 3.88e+00 - 6.88e-01 1.04e-01f 1</div><div> 5 7.8339830e+02 6.00e-03 6.15e+02 -1.0 3.48e+00 - 1.00e+00 1.77e-01f 1</div><div> 6 6.2985014e+02 4.97e-03 9.84e+02 -1.0 2.86e+00 - 9.01e-01 1.73e-01f 1</div><div> 7 5.3144166e+02 3.94e-03 2.42e+03 -1.0 2.37e+00 - 1.00e+00 2.08e-01f 1</div><div> 8 4.9770694e+02 3.07e-03 1.94e+03 -1.0 1.87e+00 - 5.86e-01 2.21e-01h 1</div><div> 9 5.0406399e+02 2.54e-03 2.45e+03 -1.0 2.11e+00 - 5.80e-01 1.73e-01h 1</div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 10 5.3547390e+02 2.00e-03 3.58e+03 -1.0 1.99e+00 - 5.68e-01 2.12e-01h 1</div><div> 11 5.9274922e+02 1.48e-03 5.87e+03 -1.0 2.28e+00 - 1.00e+00 2.56e-01h 1</div><div> 12 6.4631623e+02 1.20e-03 9.56e+03 -1.0 2.88e+00 - 7.47e-01 1.91e-01h 1</div><div> 13 7.1841000e+02 9.18e-04 9.95e+03 -1.0 2.29e+00 - 1.00e+00 2.36e-01h 1</div><div> 14 8.1146204e+02 6.58e-04 1.56e+04 -1.0 2.23e+00 - 8.62e-01 2.83e-01h 1</div><div> 15 8.8773763e+02 5.02e-04 1.40e+04 -1.0 2.02e+00 - 1.00e+00 2.38e-01h 1</div><div> 16 9.5457040e+02 3.99e-04 3.42e+04 -1.0 2.57e+00 - 1.00e+00 2.07e-01h 1</div><div> 17
1.0558386e+03 2.78e-04 2.99e+04 -1.0 2.83e+00 - 1.00e+00 3.02e-01h 1</div><div> 18 1.1619864e+03 1.84e-04 2.61e+04 -1.0 2.36e+00 - 1.00e+00 3.38e-01h 1</div><div> 19 1.2303388e+03 1.37e-04 2.72e+04 -1.0 1.75e+00 - 1.00e+00 2.56e-01h 1</div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 20 1.3150608e+03 9.06e-05 6.56e+04 -1.0 3.25e+00 - 8.83e-01 3.36e-01h 1</div><div> 21 1.3814642e+03 6.27e-05 7.75e+04 -1.0 2.40e+00 - 7.12e-01 3.08e-01h 1</div><div> 22 1.4350326e+03 4.50e-05 5.61e+04 -1.0 3.49e+00 - 2.96e-01 2.84e-01h 1</div><div> 23 1.4589438e+03 3.83e-05 5.49e+04 -1.0 1.99e+00 - 3.16e-01 1.50e-01h 1</div><div> 24 1.5206104e+03 2.37e-05 7.37e+04 -1.0 2.93e+00 - 5.14e-01 3.78e-01h 1</div><div> 25 1.5669190e+03 1.50e-05 1.31e+05 -1.0 1.86e+00 - 7.69e-01 3.67e-01h 1</div><div> 26 1.5903011e+03 1.12e-05 1.13e+05 -1.0 1.21e+00 - 1.00e+00 2.57e-01h 1</div><div> 27 1.6230534e+03 6.42e-06 1.53e+05 -1.0 1.28e+00 - 1.00e+00 4.23e-01h 1</div><div> 28 1.6474062e+03 3.44e-06 8.28e+04 -1.0 1.36e+00 - 4.38e-01 4.63e-01h 1</div><div> 29 1.6522123e+03 2.93e-06 8.53e+05 -1.0 9.59e-01 - 1.00e+00 1.54e-01h 1</div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 30 1.6718478e+03 9.85e-07 3.39e+05 -1.0 1.03e+00 - 7.48e-01 6.32e-01h 1</div><div> 31 1.6799887e+03 4.29e-07 1
.41e+05 -1.0 3.88e-01 - 4.78e-01 5.95e-01h 1</div><div> 32 1.6840614e+03 2.54e-07 3.89e+05 -1.0 1.94e-01 - 5.80e-01 3.34e-01h 1</div><div> 33 1.6930559e+03 9.47e-08 1.70e+05 -1.0 2.36e-01 - 6.41e-01 6.19e-01h 1</div><div> 34 1.6978451e+03 6.91e-08 1.21e+06 -1.0 2.57e-01 - 6.02e-01 3.72e-01h 1</div><div> 35 1.7068217e+03 1.90e-08 1.64e+06 -1.0 2.56e-01 - 9.22e-01 6.22e-01h 1</div><div>MA27BD returned iflag=-4 and requires more memory.</div><div>Increase liw from 223615 to 447230 and la from 262915 to 535470 and factorize again.</div><div> 36 1.7162980e+03 6.31e-09 2.18e+06 -1.0 2.17e-01 - 1.00e+00 7.52e-01h 1</div><div> 37 1.7233855e+03 0.00e+00 1.00e-06 -1.0 1.19e-01 - 1.00e+00 1.00e+00h 1</div><div> 38 1.6800304e+03 0.00e+00 1.83e+07 -8.6 9.78e-01 - 4.83e-01 1.00e+00f 1</div><div> 39 1.6758852e+03 0.00e+00 1.04e+07 -8.6 3.02e-01 - 4.26e-01 5.67e-01f 1</div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 40 1.6735636e+03 0.00e+00 7.19e+06 -8.6 2.16e-01 - 2.98e-01 3.68e-01f 1</div><div> 41 1.6718941e+03 0.00e+00 5.63e+06 -8.6 1.91e-01 - 2.09e-01 2.60e-01f 1</div><div> 42 1.6702121e+03 0.00e+00 4.53e+06 -8.6 1.59e-01 - 1.81e-01 2.74e-01f 1</div><div> 43 1.6682895e+03 0.00e+00 3.33e+06 -8.6 1.53e-01 - 2.53e-01 3.45e-01f 1</div><div> 44 1.6669311e+03 0.00e+00 2.16e+06 -8.6 1.31e-01 - 3.53e-01 2.95e-01f 1</div><div> 45 1.6657351e+03 0.00e+00
2.01e+06 -8.6 1.15e-01 - 8.36e-02 3.20e-01f 1</div><div> 46 1.6652164e+03 0.00e+00 1.67e+06 -8.6 8.89e-02 - 1.73e-01 1.84e-01f 1</div><div> 47 1.6645884e+03 0.00e+00 9.83e+05 -8.6 8.30e-02 - 4.02e-01 2.51e-01f 1</div><div> 48 1.6639691e+03 0.00e+00 7.19e+05 -8.6 7.43e-02 - 2.68e-01 2.77e-01f 1</div><div> 49 1.6635414e+03 0.00e+00 5.42e+05 -8.6 6.52e-02 - 2.49e-01 2.28e-01f 1</div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 50 1.6630697e+03 0.00e+00 4.13e+05 -8.6 5.94e-02 - 2.42e-01 2.99e-01f 1</div><div> 51 1.6628218e+03 0.00e+00 3.30e+05 -8.6 4.72e-02 - 3.61e-01 2.09e-01f 1</div><div> 52 1.6626052e+03 0.00e+00 2.65e+05 -8.6 4.32e-02 - 2.12e-01 2.31e-01f 1</div><div> 53 1.6623597e+03 0.00e+00 1.36e+05 -8.6 3.52e-02 - 4.54e-01 3.33e-01f 1</div><div> 54 1.6622941e+03 0.00e+00 1.17e+05 -8.6 2.24e-02 - 1.57e-01 1.33e-01f 1</div><div> 55 1.6621419e+03 0.00e+00 9.82e+04 -8.6 1.60e-02 - 2.22e-01 3.49e-01f 1</div><div> 56 1.6620561e+03 0.00e+00 5.31e+04 -8.6 9.62e-03 - 3.70e-01 3.16e-01f 1</div><div> 57 1.6620052e+03 0.00e+00 3.80e+04 -8.6 4.76e-03 - 2.71e-01 2.86e-01f 1</div><div> 58 1.6619647e+03 0.00e+00 2.57e+04 -8.6 2.65e-03 - 4.19e-01 3.17e-01f 1</div><div> 59 1.6619354e+03 0.00e+00 2.82e+04 -8.6 1.87e-03 - 4.09e-01 3.26e-01f 1</div><div>iter objective inf_pr inf_du lg(mu
) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 60 1.6619094e+03 0.00e+00 1.35e+04 -8.6 1.36e-03 - 3.19e-01 4.18e-01f 1</div><div> 61 1.6618945e+03 0.00e+00 2.92e+04 -8.6 1.52e-03 - 3.08e-01 4.05e-01f 1</div><div> 62 1.6618912e+03 0.00e+00 2.40e+04 -8.6 1.57e-03 - 4.88e-01 1.58e-01f 1</div><div> 63 1.6618823e+03 0.00e+00 7.96e+03 -8.6 1.74e-03 - 4.09e-01 4.93e-01f 1</div><div> 64 1.6618804e+03 0.00e+00 2.46e+04 -8.6 1.03e-03 - 5.08e-01 2.16e-01f 1</div><div> 65 1.6618764e+03 0.00e+00 1.11e+04 -8.6 5.81e-04 - 4.61e-01 5.75e-01f 1</div><div> 66 1.6618747e+03 0.00e+00 5.85e+03 -8.6 3.44e-04 - 5.02e-01 5.52e-01f 1</div><div> 67 1.6618739e+03 0.00e+00 3.00e+03 -8.6 2.76e-04 - 5.40e-01 6.14e-01f 1</div><div> 68 1.6618737e+03 0.00e+00 1.41e+03 -8.6 2.09e-04 - 5.28e-01 5.16e-01f 1</div><div> 69 1.6618736e+03 0.00e+00 3.96e+03 -8.6 1.44e-04 - 6.54e-01 4.50e-01f 1</div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 70 1.6618735e+03 0.00e+00 4.37e+03 -8.6 1.13e-04 - 7.15e-01 5.20e-01f 1</div><div> 71 1.6618734e+03 0.00e+00 1.37e+03 -8.6 7.36e-05 - 6.20e-01 7.01e-01f 1</div><div> 72 1.6618734e+03 0.00e+00 4.65e+02 -8.6 3.41e-05 - 1.00e+00 8.89e-01f 1</div><div> 73 1.6618734e+03 0.00e+00 7.28e-12 -8.6 1.57e-05 - 1.00e+00 1.00e+00f 1</div><div> </div><div>Number of Iterations....: 73</div><div> </div><div> &nb
sp; (scaled) (unscaled)</div><div>Objective...............: 1.6618734205379653e+03 1.6618734205379653e+03</div><div>Dual infeasibility......: 7.2759576141834259e-12 7.2759576141834259e-12</div><div>Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00</div><div>Complementarity.........: 4.1913907266361601e-09 4.1913907266361601e-09</div><div>Overall NLP error.......: 1.5424634363936447e-11 4.1913907266361601e-09</div><div> </div><div> </div><div>Number of objective function evaluations = 74</div><div>Number of objective gradient evaluations = 74</div><div>Number of equality constraint evaluations = 0</div><div>Number of inequality constraint evaluations = 74</div><div>Number of equality constraint Jacobian evaluations = 0</div><div>Number of inequality constraint Jacobian evaluations = 74</div><div>Number of Lagrangian Hessian evaluations = 73</div><div>Total CPU secs in IPOPT (w/o function evaluations) = 0.728</div><div>Total CPU secs in NLP function evaluations = 0.032</div><div> </div><div>EXIT: Optimal Solution Found.</div><div> </div><div> </div><div> </div><div>Best regards,</div><div> </div><div>Ilya Palachev</div>
More information about the Ipopt
mailing list