[Ipopt] value of variables on intermediate_callback

Stefan Vigerske stefan at math.hu-berlin.de
Sat Jun 30 16:05:58 EDT 2012


Hi,

you can use the pointer to the IpoptData object that you get in 
intermediate_callback() to get to the current variable values.
The tricky part is that you will get the values w.r.t. Ipopt's internal 
problem representation and you would need to transform them back to see 
them as in your TNLP class.

We do this in the GAMS/Ipopt interface to store a solution with minimal 
primal infeasibility:
https://projects.coin-or.org/GAMSlinks/browser/trunk/GAMSlinks/src/SolverInterfaces/GamsNLP.cpp#L630

Stefan

On 06/30/2012 03:46 PM, Juan Carlos Lopez Alfonso wrote:
> Hi all,
> I continue with problems with the convergence of my problem, is very
> slow. So, I need a way to save the value of my variables after some
> iterations, in order to avoid lost of information if my process is
> aborted in the server for any reason.
>
> Could anyone tell me if know a way to obtain in the method
> "intermediate_callback" the value of my variables? In the method
> "finalize_solution" Number* x is a parameter and is exactly the
> information that I need to know in the method "intermediate_callback".
>
> Could anyone help me? please some ideas or suggestions...
> best regards and thanks in advance
> juan carkis
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>




More information about the Ipopt mailing list