[Ipopt] Same input, different output if executed in a loop (c++)
Roberto Verdelli
roberto.verdelli at techedgegroup.com
Thu Jan 9 06:16:48 EST 2014
Hi,
I did some testing and I noticed that it also happens with the tutorial
problem written on the ipopt website.
My code looks like this:
int main(int argv, char* argc[]){
for(int i = 0; i < 15; i++)
loop();
}
int loop(){
// Create a new instance of your nlp
// (use a SmartPtr, not raw)
SmartPtr<TNLP> mynlp = new hs071_nlp(/*a,b,c,d*/);
// Create a new instance of IpoptApplication
...
The function called 'loop' contains the tutorial ipopt problem.
If I lower the tolerance to 1e-3 (which shouldn't be a problem because if
the algorithm is deterministic two consecutive runs should look the same,
independently from the tolerance) I get this results:
iterations
1.Objective...............: 1.7014117428683792e-007
1.7014117428683793e+001
2.Objective...............: 1.7014117428684237e-007
1.7014117428684237e+001
3.Objective...............: 1.7014117428684237e-007
1.7014117428684237e+001
4.Objective...............: 1.7014117428684237e-007
1.7014117428684237e+001
Why the first iteration is different?
Kind regards,
Roberto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20140109/bda60f7d/attachment.html>
More information about the Ipopt
mailing list