[AMPL 16066] Updating NL files changing only bounds

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[AMPL 16066] Updating NL files changing only bounds

Rodrigo Garcia
Hi, 
I've been using AMPL for solving a two stage problem, using a simple benders decomposition.
I'm part of a larger group which also uses Julia -JuMP-. Here is the deal:

We've divided the problem in electricity investment (master) & operation (subproblem). 
I'm solving on AMPL the operational problem and I'm returning the duals to the master that's being solved inside Julia; from the master I receive updated bounds to be used in the subproblem and I solve again in AMPL.

The way we were doing until now, is through output files "text files written at the end of each problem solving process". The thing is that I believe that every time the command "solve" is executed in AMPL, a new .nl file is completely generated (in which only the bounds have changed) which makes the process slower.

Is there a way to only update the bounds in the .nl file without completly regenerating/rewritring it and then resolving it in AMPL?

Thank you.

Rodrigo

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [AMPL 16073] Updating NL files changing only bounds

AMPL mailing list
You can define a parameter to represent the bounds. For example, you could say param x_ub ;
var x {i in 1..n} <= x_ub;

You can change the bound by means of "let x_ub := <New_Value>;".

--
Paras Tiwari
[hidden email]
{#HS:553007826-4304#}
On Mon, Apr 2, 2018 at 2:07 PM UTC, <[hidden email]> wrote:
Hi,
I've been using AMPL for solving a two stage problem, using a simple benders decomposition.
I'm part of a larger group which also uses Julia -JuMP-. Here is the deal:

We've divided the problem in electricity investment (master) & operation (subproblem).
I'm solving on AMPL the operational problem and I'm returning the duals to the master that's being solved inside Julia; from the master I receive updated bounds to be used in the subproblem and I solve again in AMPL.

The way we were doing until now, is through output files "text files written at the end of each problem solving process". The thing is that I believe that every time the command "solve" is executed in AMPL, a new .nl file is completely generated (in which only the bounds have changed) which makes the process slower.

Is there a way to only update the bounds in the .nl file without completly regenerating/rewritring it and then resolving it in AMPL?

Thank you.

Rodrigo

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [AMPL 16081] Updating NL files changing only bounds

AMPL mailing list
In reply to this post by Rodrigo Garcia
Anytime you invoke "solve" in AMPL, an entire new .nl file is written, even if only some bounds were changed. So there isn't a way to speed up that part of the process. (AMPL does save some processing time by only regenerating the in-memory representations of those constraints that are affected by the bound changes.)

If you have some data on how much time is being spent exchanging files between AMPL and the solver, compared to the time spent actually solving, we would be interested to see it.

--
Robert Fourer
[hidden email]
{#HS:553007826-4304#}
On Mon, Apr 2, 2018 at 9:29 PM UTC, AMPL Google Group <[hidden email]> wrote:
You can define a parameter to represent the bounds. For example, you could say param x_ub ;
var x {i in 1..n} <= x_ub;

You can change the bound by means of "let x_ub := <New_Value>;".

--
Paras Tiwari
[hidden email]


On Mon, Apr 2, 2018 at 2:07 PM UTC, <[hidden email]> wrote:
Hi,
I've been using AMPL for solving a two stage problem, using a simple benders decomposition.
I'm part of a larger group which also uses Julia -JuMP-. Here is the deal:

We've divided the problem in electricity investment (master) & operation (subproblem).
I'm solving on AMPL the operational problem and I'm returning the duals to the master that's being solved inside Julia; from the master I receive updated bounds to be used in the subproblem and I solve again in AMPL.

The way we were doing until now, is through output files "text files written at the end of each problem solving process". The thing is that I believe that every time the command "solve" is executed in AMPL, a new .nl file is completely generated (in which only the bounds have changed) which makes the process slower.

Is there a way to only update the bounds in the .nl file without completly regenerating/rewritring it and then resolving it in AMPL?

Thank you.

Rodrigo

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.