[Coin-ipopt] points list

Andreas Waechter andreasw at watson.ibm.com
Sat Sep 23 17:18:56 EDT 2006


Hi Yahia,

There is no way to obtain such information from AMPL.  What you could do 
is to use the Ipopt output file and increase the file_print_level to at 
least 7.  This will print out a lot of stuff, and for each iteration it 
also prints the values of the variables (look for curr_x[...]).

Now, you will need to find out the relationship between the ordering of 
the variables as Ipopt sees them (in curr_x) and the AMPL variable names.

For this, you can use AMPL's 'auxfiles' option:  Set auxfiles to 'c', e.g.

option auxfiles 'c';

and then, after you load the model, before you do the 'solve' command, use 
the write command

write gbla;

This will create files bla.nl and bla.col, and the second of those files 
contains the names of the variables in the AMPL model in the order that 
corresponds to the order of curr_x.

If you want to do some programming, you could use the 
intermediate_callback method of the TNLP.  This method is called once per 
iteration, and you can just implement something for intermediate_callback 
in AmplTNLP.cpp that writes the current values for the variables into a 
file or whatever you want to do with it.

I hope this helps,

Andreas

On Thu, 21 Sep 2006, yahia lebbah wrote:

> Hi,
>
> I'am using IPOPT through its AMPL interface.
> I want to know if there is a way to call IPOPT/AMPL
> and get the history of the previous points visited by
> IPOPT until reaching the final optimal point.
> Else, if I can get some of these points, this should
> be also useful.
>
> With best regards,
>
> ---
> Yahia Lebbah
>
>
>
>
>
>
> ___________________________________________________________________________
> Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
> Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
> http://fr.answers.yahoo.com
>
> _______________________________________________
> Coin-ipopt mailing list
> Coin-ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-ipopt
>


More information about the Coin-ipopt mailing list