<div dir="ltr">Hi,<div><br></div><div>I am using IpOpt to optimize a problem with 5 decision variables in successive runs. My first run involves using all 5 variables (relaxing all variables simultaneously). IpOpt terminates successfully and gives an optimum solution. Next I relax only one variable (4th) of the 5 (keeping other 4 variables constant from the earlier run). I find that IpOpt provides a relatively "bad" optimum solution with higher objective value (i am minimising my obj fn). NLP functions are being evaluated using a DAE solver.</div>
<div><br></div><div><b>First Run:</b></div><div><br></div><div><div>Total number of variables............................: 5</div><div> variables with only lower bounds: 0</div><div> variables with lower and upper bounds: 5</div>
<div> variables with only upper bounds: 0</div><div>Total number of equality constraints.................: 0</div><div>Total number of inequality constraints...............: 0</div>
<div> inequality constraints with only lower bounds: 0</div><div> inequality constraints with lower and upper bounds: 0</div><div> inequality constraints with only upper bounds: 0</div>
<div><br></div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 0 3.4059520e-001 0.00e+000 1.26e-001 0.0 0.00e+000 - 0.00e+000 0.00e+000 0</div><div> 1 3.3227739e-001 0.00e+000 5.39e-002 -5.0 6.09e-002 - 9.86e-001 1.00e+000f 1</div>
<div> 2 2.8068876e-001 0.00e+000 2.95e-002 -2.5 5.58e-001 - 9.75e-001 8.79e-001f 1</div><div> 3 2.7651747e-001 0.00e+000 7.72e-003 -2.6 1.62e-001 - 9.93e-001 1.00e+000f 1</div><div> 4 2.6969369e-001 0.00e+000 9.19e-003 -4.1 2.00e-001 - 9.98e-001 9.85e-001f 1</div>
<div> 5 2.6371187e-001 0.00e+000 1.16e-002 -4.0 7.34e-001 - 1.00e+000 5.35e-001f 1</div><div> 6 2.5342676e-001 0.00e+000 2.66e-002 -4.9 3.35e+000 - 1.00e+000 3.31e-001f 1</div><div> 7 2.3664505e-001 0.00e+000 5.43e-002 -4.2 5.52e+000 - 8.07e-001 1.00e+000f 1</div>
<div> 8 2.3213622e-001 0.00e+000 1.01e-002 -5.1 1.97e+000 - 1.00e+000 1.00e+000f 1</div><div> 9 2.3155882e-001 0.00e+000 6.38e-003 -3.9 5.49e-001 - 1.00e+000 1.00e+000f 1</div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div>
<div> 10 2.3030322e-001 0.00e+000 6.01e-003 -4.6 1.16e+000 - 9.98e-001 1.00e+000f 1</div><div> 11 2.3008095e-001 0.00e+000 4.60e-002 -2.6 3.02e+001 - 5.36e-001 2.27e-001f 2</div><div> 12 2.2783106e-001 0.00e+000 1.06e-001 -2.4 2.06e+001 - 1.00e+000 2.02e-001f 2</div>
<div> 13 2.1571297e-001 0.00e+000 5.67e-002 -2.3 8.77e+000 - 1.00e+000 2.21e-001f 3</div><div> 14 1.8078192e-001 0.00e+000 5.68e-002 -2.9 7.69e+000 - 9.97e-001 3.62e-001f 2</div><div> 15 1.4540550e-001 0.00e+000 8.58e-002 -3.8 6.54e+000 - 1.00e+000 3.26e-001f 1</div>
<div> 16 1.5533380e-001 0.00e+000 1.25e-001 -2.4 5.58e+000 - 9.45e-001 5.00e-001f 2</div><div> 17 1.4003026e-001 0.00e+000 4.40e-002 -2.6 1.05e+000 - 1.00e+000 2.93e-001f 2</div><div> 18 1.1513233e-001 0.00e+000 3.28e-002 -3.5 1.65e+000 - 1.00e+000 1.00e+000f 1</div>
<div> 19 1.1058175e-001 0.00e+000 5.58e-002 -3.5 7.25e-001 - 1.00e+000 1.83e-001f 1</div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 20 1.0840715e-001 0.00e+000 2.40e-002 -4.6 5.04e-001 - 1.00e+000 5.00e-001f 2</div>
<div> 21 1.0730184e-001 0.00e+000 2.59e-003 -4.7 8.46e-002 - 1.00e+000 4.43e-001f 1</div><div> 22 1.0693632e-001 0.00e+000 1.15e-003 -6.2 1.83e-002 - 1.00e+000 1.00e+000f 1</div><div> 23 1.0692761e-001 0.00e+000 3.95e-005 -8.0 1.93e-003 - 1.00e+000 9.85e-001f 1</div>
<div> 24 1.0692755e-001 0.00e+000 1.11e-004 -11.0 1.05e-003 - 1.00e+000 1.00e+000f 1</div><div> 25 1.0692753e-001 0.00e+000 1.09e-006 -11.0 6.86e-004 - 1.00e+000 1.00e+000f 1</div><div><br></div><div>Number of Iterations....: 25</div>
<div><br></div><div> (scaled) (unscaled)</div><div>Objective...............: <b>1.0692753478330776e-001 </b> 1.0692753478330776e-001</div><div>Dual infeasibility......: 1.0936467431047899e-006 1.0936467431047899e-006</div>
<div>Constraint violation....: 0.0000000000000000e+000 0.0000000000000000e+000</div><div>Complementarity.........: 1.0027270245806282e-011 1.0027270245806282e-011</div><div>Overall NLP error.......: 1.0936467431047899e-006 1.0936467431047899e-006</div>
<div><br></div><div><br></div><div>Number of objective function evaluations = 62</div><div>Number of objective gradient evaluations = 26</div><div>Number of equality constraint evaluations = 0</div>
<div>Number of inequality constraint evaluations = 0</div><div>Number of equality constraint Jacobian evaluations = 0</div><div>Number of inequality constraint Jacobian evaluations = 0</div><div>Number of Lagrangian Hessian evaluations = 0</div>
<div>Total CPU secs in IPOPT (w/o function evaluations) = 25.657</div><div>Total CPU secs in NLP function evaluations = 1809.632</div></div><div><br></div><div>Optimal Solution : 5.24069, 1.21765, 5.77537e-10, <b>3.33815e-10</b>, 3.99296e-10</div>
<div><br></div><div><b>Second Run: (The bold variable is changed in this run)</b></div><div><div>Total number of variables............................: 1</div><div> variables with only lower bounds: 0</div>
<div> variables with lower and upper bounds: 1</div><div> variables with only upper bounds: 0</div><div>Total number of equality constraints.................: 0</div>
<div>Total number of inequality constraints...............: 0</div><div> inequality constraints with only lower bounds: 0</div><div> inequality constraints with lower and upper bounds: 0</div>
<div> inequality constraints with only upper bounds: 0</div><div><br></div><div>iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls</div><div> 0 1.0692753e-001 0.00e+000 2.99e-002 0.0 0.00e+000 - 0.00e+000 0.00e+000 0</div>
<div> 1 1.0998169e-001 0.00e+000 6.45e-002 -1.1 8.05e-002 - 9.98e-001 1.00e+000f 1</div><div> 2 1.6595396e-001 0.00e+000 2.03e-002 -1.1 5.84e-001 - 1.00e+000 1.00e+000f 1</div><div> 3 1.3200249e-001 0.00e+000 4.12e-003 -1.8 2.83e-001 - 1.00e+000 1.00e+000f 1</div>
<div> 4 1.1346410e-001 0.00e+000 5.79e-003 -2.7 2.35e-001 - 1.00e+000 1.00e+000f 1</div><div> 5 1.0877403e-001 0.00e+000 1.68e-003 -4.0 9.49e-002 - 1.00e+000 1.00e+000f 1</div><div> 6 1.0735574e-001 0.00e+000 3.01e-004 -4.0 3.88e-002 - 1.00e+000 1.00e+000f 1</div>
<div> 7 1.0696293e-001 0.00e+000 3.89e-005 -6.0 1.25e-002 - 1.00e+000 1.00e+000f 1</div><div> 8 1.0692884e-001 0.00e+000 9.98e-007 -6.0 1.14e-003 - 1.00e+000 1.00e+000f 1</div><div><br></div><div>Number of Iterations....: 8</div>
<div><br></div><div> (scaled) (unscaled)</div><div>Objective...............: <b>1.0692884325163618e-001</b> 1.0692884325163618e-001</div><div>Dual infeasibility......: 9.9778841742863659e-007 9.9778841742863659e-007</div>
<div>Constraint violation....: 0.0000000000000000e+000 0.0000000000000000e+000</div><div>Complementarity.........: 1.3088189011168833e-006 1.3088189011168833e-006</div><div>Overall NLP error.......: 1.3088189011168833e-006 1.3088189011168833e-006</div>
<div><br></div><div><br></div><div>Number of objective function evaluations = 9</div><div>Number of objective gradient evaluations = 9</div><div>Number of equality constraint evaluations = 0</div>
<div>Number of inequality constraint evaluations = 0</div><div>Number of equality constraint Jacobian evaluations = 0</div><div>Number of inequality constraint Jacobian evaluations = 0</div><div>Number of Lagrangian Hessian evaluations = 0</div>
<div>Total CPU secs in IPOPT (w/o function evaluations) = 20.861</div><div>Total CPU secs in NLP function evaluations = 228.325</div><div><br></div><div>EXIT: Optimal Solution Found.</div></div><div><br>
</div><div><br></div><div>Objective fn value changed from <b>1.0692753478330776e-001 ---> </b><b>1.0692884325163618e-001</b></div><div>Variable value changed from <b>3.33815e-10 ---> 4.36996e-5</b></div><div><b><br>
</b></div><div>I presume that for the second run, the optimal dual is calculated in the 8 iterations but my solution degrades from the starting point.</div><div><br></div><div>My options:</div><div><div>app->Options()->SetNumericValue("tol", 1e-5);</div>
<div>app->Options()->SetNumericValue("constr_viol_tol", 1e-10);</div><div>app->Options()->SetNumericValue("bound_frac", 1e-15);</div><div>app->Options()->SetNumericValue("bound_push", 1e-15);</div>
<div>app->Options()->SetNumericValue("tiny_step_tol", 1e-10);</div><div>app->Options()->SetNumericValue("tiny_step_y_tol", 1e-10);</div><div>app->Options()->SetNumericValue("bound_relax_factor", 0);</div>
<div>app->Options()->SetStringValue("mu_strategy", "adaptive");</div><div>app->Options()->SetStringValue("hessian_approximation", "limited-memory");<br></div></div><div>
<br></div><div><br></div><div>Is there a way to avoid calculating new iterations or considering the initial solution as the final solution?</div><div><br></div><div>Thank You</div><div><br></div><div>Regards</div><div>Udit Gupta</div>
<div><b><br></b></div></div>