[Ipopt] Same input, different output if executed in a loop (c++)

Antonello Lobianco antonello at lobianco.org
Wed Jan 8 08:18:40 EST 2014

ciao Roberto,
 you could also use a tool like valgrind to check that your algorithm
doesn't have any memory problem.


2014/1/7 Roberto Verdelli <roberto.verdelli at techedgegroup.com>

> Scenario: c++ code.
> Whenever I run my optimization problem with the same inputs, by double
> clicking the executable twice or more, I get the exact same output every
> time. That's logical because the algorithm is deterministic.
> The weird thing is that if I wrap my code in a loop that solves twice the
> same exact problem I get two different results. (in terms of number of
> iterations and value of the figure of merit)
> I checked and there's no persistent variable that could hold some result
> of the previous iteration.
> I guess the problem is related to the primal/dual infeasibility problem
> because, checking the verbose output, I see the divergence of the two
> solutions start as soon as the P/D infeasibility problem is solved for the
> first time (first iteration).
> Should this happen or should I double check for some persistent data that
> is shared between iterations? (I'm pretty sure there's no such data)
> Does IpOpt keep in memory something of the previous run? Is there a way to
> clear this data?
> Thanks for your help.
> Roberto.
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt

Antonello Lobianco
AgroParisTech, Laboratoire d'Economie Forestière
14 Rue Girardet - 54000 Nancy, France
Tel: +33.383396865
Email: antonello.lobianco at nancy.inra.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20140108/f063e81d/attachment.html>

More information about the Ipopt mailing list