Has anyone tried encapsulating a problem as a "named problem" and then
calling it recursively? How does one do it for a huge problem with
thousands of variables? (it seems that declaring the problem's
variables would be rather unwieldy) Or is there a better way?
Thanks.
Robert Fourer wrote:
> There is an example on pages 407-409 of the AMPL book, where the variables are
> assigned values in the statements that declare them. AMPL "let" statement can
> also be used to assign values to variables.
Yup, that's similar to what I want to do.... but I was wondering if it
could be, sort of, automated....
i.e. a kind of "let" that will take all the values of solution and use
them as initial guesses for the next "solve".
I have thousands of variables in my problem... it's a bit tedious to
write thousands of "let" statements after every solve phase.
> I'm not sure what you have in mind here. Can you give a specific example?
What I had in mind is something like a two-tier strategy.
I have a problem with many degrees of freedom, so there is a whole set
of admissible optimal solutions. In that sense, it is quite sensitive
to initial guesses. What I want to do is this....
1) Start with an arbitrary initial guess for all decision variables,
x0.
2) Run it through the solver once, obtain values for the decision
variables, x and the objective function, Obj = p, where p is a scalar.
3) This is the part that I need AMPL to do: take the values of x from
the previous solution, and use those as the initial guess.
4) On my part, I will take the previous value of the objective
function, p, and constrain the objective function to equal to p. I will
also impose some other constraints to narrow down the set of solutions.
5) Re-solve the system.
6) Repeat from (3) until a single solution is obtained.
So I was thinking of something along the lines of encapsulating my
problem as a "named problem", and then solving it, and then somehow
getting the values of the decision variables and calling the "named
problem" again with those values as initial guesses. Of course I may be
completely off-base here....
That is excellent!
Thanks for this information!
warmest regards,
David
--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/MTuKyFXLjOQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
________________________________________________________ Francesca Maggioni, PhD Assistant Professor of Operations Research
Department of Management, Economics and Quantitative Methods,
University of Bergamo Via dei Caniana 2, 24127 Bergamo, Italy
tel: +39-035-2052649 e-mail: francesca...@unibg.it home-page: http://www.matapp.unimib.it/~maggioni ________________________________________________________
--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/MTuKyFXLjOQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.