ASL component Lastx_

2 views
Skip to first unread message

Ali Baharev

unread,
May 20, 2009, 1:10:39 PM5/20/09
to am...@googlegroups.com
Dear AMPL Developers.

I could not figure out from the PDF "Hooking Your Solver to AMPL" what
Lastx_ is used for:

asl->i.Lastx_[j]

In the asl.h header i see that Lastx_ is meant for internal use.

Does this store the solution vector if the solver actually managed to
solve the problem and called write_sol?

Any hint is appreciated.

Ali

Robert Fourer

unread,
May 21, 2009, 10:48:12 AM5/21/09
to am...@googlegroups.com, Ali Baharev

Lastx_ is used by the routines that evaluate functions and gradients. It
contains the "last" x in the sense of the "most recent" one, not the one
returned by the solver as optimal. The variable x normally holds the
optimal solution vector after the solver has finished.

Bob Fourer
4...@ampl.com

Ali Baharev

unread,
May 22, 2009, 5:59:56 AM5/22/09
to am...@googlegroups.com, 4...@ampl.com
Dear Professor Fourer,

Thank you for the reply. My question then boils down to the following:
which member holds the optimal solution (assuming the solver found a
solution)?

Sincerely,

Ali

Reply all
Reply to author
Forward
0 new messages