<div dir="ltr">Thanks very much Tony,<div><br></div><div>It seems that the problem was exactly what you mentioned.</div><div>I was doing all consecutive runs of ipopt() in a for loop, but there seems to be a necessity to clear everything, except the initial point (which is supposed to be the same across all runs)</div>
<div>Now I get exactly the same result across various runs with the same initial points</div><div><br></div><div>Thanks</div><div>Alireza</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 17, 2012 at 10:28 PM, Tony Kelman <span dir="ltr"><<a href="mailto:kelman@berkeley.edu" target="_blank">kelman@berkeley.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Alireza,<br>
<br>
Something you should try is "clear functions" and/or "clear global" between invocations of Ipopt - there may be some internal state somewhere in the mex file or in your callback functions. There shouldn't be, but it's possible. Also check that your objective and constraint functions are returning dense vectors - in the patch that Stefan linked to, I only test for and fix the issue for the gradient function. I thought it would be much less likely for anyone to write objective or constraint functions that return sparse vectors, but that might also lead to similar strange behavior if it were the case.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Tony <br>
</font></span></blockquote></div><br></div>