<div dir="ltr">Dear Stefan,<div><br></div><div>I managed to find out why the init start didn&#39;t work: instead of copying my initial values into the double array x, I mistakenly wrote: x=myInitialValues; thereby overwriting the reference to the array.</div>

<div><br></div><div>Unfortunately, I&#39;m still having some weird results with the initial starts. </div><div><br></div><div><br></div><div style>1. I initialized my model with a heuristically obtained solution, limit the number of iterations to 0, and solve the model. This is the result:</div>
<div style><br></div><div><div>                                   (scaled)                 (unscaled)</div><div>Objective...............:   1.4348357906583399e+02    1.4348357906583399e+02</div><div>Dual infeasibility......:   3.4494939467173791e+00    1.1992447967144086e+00</div>
<div>Constraint violation....:   2.5542688232884450e+02    2.7080707935425266e+03</div><div>Complementarity.........:   1.0000000000015498e+09    1.0000000000015498e+09</div><div>Overall NLP error.......:   1.0000000000015498e+09    1.0000000000015498e+09</div>
</div><div><br></div><div style>The objective is indeed identical to my heuristic objective. However, I&#39;m puzzled by the large Constraint Violation. I wrote some additional code which inserts my initial solution into the function protected boolean eval_g(int n, double[] x, boolean new_x, int m, double[] g), and compares the result against the lower and upper bounds of the constraints. The result was a maximum bound violation of 0.0000000001 caused by a rounding error. So, how is it possible that Ipopt reports a bound violation of 255.42, which is significant larger?</div>
<div style><br></div><div style><br></div><div style>2. Another problem occurs as follows:</div><div><br></div><div>1. Solve the problem.</div><div>Result:</div>
<div>Number of Iterations....: 122<br></div><div><div>                                   (scaled)                 (unscaled)</div><div>Objective...............:   1.4023993576871166e+02    1.4023993576871166e+02</div>
<div>Dual infeasibility......:   3.2150729385190527e-10    3.2150729385190527e-10</div><div>Constraint violation....:   0.0000000000000000e+00    0.0000000000000000e+00</div><div>Complementarity.........:   2.5415311533493614e-09    2.5415311533493614e-09</div>

<div>Overall NLP error.......:   2.5415311533493614e-09    2.5415311533493614e-09</div><div><br></div><div>2. Take the solution, and use that solution as an initial start.</div><div>3. Set the max iterations to 0 (or 1).</div>

<div>4. Resolve.</div><div><br></div><div>Result:</div><div>Number of Iterations....: 0<br></div><div><div>                                   (scaled)                 (unscaled)</div><div>Objective...............:   1.4023993576871166e+02    1.4023993576871166e+02</div>

<div>Dual infeasibility......:   9.2604242966773098e-01    9.2604242966773098e-01</div><div>Constraint violation....:   0.0000000000000000e+00    0.0000000000000000e+00</div><div>Complementarity.........:   5.7376840606707844e+13    5.7376840606707844e+13</div>

<div>Overall NLP error.......:   5.7376840606707844e+13    5.7376840606707844e+13</div><div><br></div><div><br></div><div>As you can see, the objectives and constraint violation are identical (as they should be). But why are &#39;Dual infeasibility&#39;, &#39;Complementarity&#39; and &#39;Overall NLP error&#39; so much different? Note that the IPOPT output description in the manual: <a href="http://www.coin-or.org/Ipopt/documentation/node56.html" target="_blank">http://www.coin-or.org/Ipopt/documentation/node56.html</a> does not elaborate on these values. I hope that there is a good explanation why Ipopt seems so inconsistent.</div>
<div><br></div><div style>Btw, the derivative checker does not report any errors.</div><div><br></div>
<div><br></div><div>br,</div><div><br></div><div>Joris</div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 3, 2013 at 12:42 PM, Stefan Vigerske <span dir="ltr">&lt;<a href="mailto:stefan@math.hu-berlin.de" target="_blank">stefan@math.hu-berlin.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div class="im"><br>
<br>
On 04/02/2013 07:01 PM, Joris Kinable wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear,<br>
<br>
I&#39;ve implemented a small NLP model into ipopt using the Java interface.<br>
When I hit solve, the program terminates with the following message:<br>
<br>
&quot;The problem FAILED&quot;.<br>
<br>
I&#39;m trying to debug the model to see what&#39;s wrong. Hence, I&#39;ve set the<br>
objective function to a fixed constant, thereby turning the optimization<br>
problem into a constraint satisfaction problem. Next, I&#39;ve initialized the<br>
problem with a feasible solution, i.e. a solution which satisfies all<br>
constraints. So basically, the optimizer could return the initial solution<br>
immediately; no optimization is required. Still, I get the message that the<br>
problem fails (part of the log is included at the end of this mail).<br>
<br>
1. Why doesn&#39;t the solver return the initial solution, as it is a feasible<br>
solution?<br>
</blockquote>
<br></div>
Ipopt may have moved your initial point, if it was close to the bounds.<br>
Try setting the options bound_push and bound_frac to 0.0:<br>
<a href="http://www.coin-or.org/Ipopt/documentation/node97.html" target="_blank">http://www.coin-or.org/Ipopt/<u></u>documentation/node97.html</a><br>
<a href="http://www.coin-or.org/Ipopt/documentation/node98.html" target="_blank">http://www.coin-or.org/Ipopt/<u></u>documentation/node98.html</a><div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. What could cause ipopt to return &#39;The problem Failed&#39;, i.e. what should<br>
I debug? I manually checked that all my constraints are feasible, as well<br>
as the variable bounds.<br>
</blockquote>
<br></div>
The problem failed message is written by the Java interface and not really helpful. Look at the messages from Ipopt itself (e.g., after EXIT) to see why Ipopt stopped. There you also see which infeasibility (primal, dual, or complementarity) is still too high to have Ipopt stopping successfully.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. The logger mentions that the search direction becomes too small. Why<br>
can&#39;t it identify that it has found a local/global optimum?<br>
</blockquote>
<br></div>
Maybe your implementation of gradients or hessians is wrong. Try the derivative checker:<br>
<a href="http://www.coin-or.org/Ipopt/documentation/node53.html" target="_blank">http://www.coin-or.org/Ipopt/<u></u>documentation/node53.html</a><br>
<br>
Stefan<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<br>
br,<br>
<br>
Joris<br>
<br>
<br>
<br>
==============================<u></u>=<br>
<br>
Number of Iterations....: 263<br>
<br>
                                    (scaled)                 (unscaled)<br>
Objective...............:   1.0000000000000000e+00    1.0000000000000000e+00<br>
Dual infeasibility......:   1.0999505370964350e-05    1.0999505370964350e-05<br>
Constraint violation....:   0.0000000000000000e+00    0.0000000000000000e+00<br>
Complementarity.........:   9.0909090909090941e-10    9.0909090909090941e-10<br>
Overall NLP error.......:   1.0999505370964350e-05    1.0999505370964350e-05<br>
<br>
<br>
Number of objective function evaluations             = 289<br>
Number of objective gradient evaluations             = 55<br>
Number of equality constraint evaluations            = 0<br>
Number of inequality constraint evaluations          = 289<br>
Number of equality constraint Jacobian evaluations   = 0<br>
Number of inequality constraint Jacobian evaluations = 266<br>
Number of Lagrangian Hessian evaluations             = 264<br>
Total CPU secs in IPOPT (w/o function evaluations)   =      0.180<br>
Total CPU secs in NLP function evaluations           =      0.016<br>
<br>
EXIT: Search Direction is becoming Too Small.<br>
Obj: 1.0<br>
Circle 0: (-41.30054873354737,3.<u></u>222049686239637), r:10.0<br>
Circle 1: (0.49442322310794523,-26.<u></u>773758302392906), r:10.0<br>
Circle 2: (-44.843610818313735,-23.<u></u>277936648765795), r:10.0<br>
Circle 3: (-22.36952325252463,-36.<u></u>936746537913145), r:10.0<br>
<br>
<br>
*** The problem FAILED!<br>
<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org" target="_blank">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/<u></u>mailman/listinfo/ipopt</a><br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>