[AMPL 16150] Iteratively solving

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

[AMPL 16150] Iteratively solving

Peter Greistorfer
Hi all!

Is there a way - using - CPLEX - to iteratively, i.e. basis change after change, solve an LP? What I want to have is something like the output caused by option cplex_options 'display=2', e.g.

Iteration      Dual Objective            In Variable           Out Variable
     1  I            0.000000                    x10               c5 slack
     2              38.500000                     x2               c1 artif
     3              35.500000                     x3               c2 artif
     4              28.000000                     x1               c3 artif
     5              24.000000               c5 slack                     x4
CPLEX 12.8.0.0: optimal solution; objective 24
5 dual simplex iterations (1 in phase I)
obj = 24.00

 and in addition a halt after each iteration (e.g. to manipulate the course of the optimization)..

And, consequently, is there a straightforward way to display the specific tableaus inbetween or at least at the end of a run?

Have a nice day ...

--
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 16169] Iteratively solving

AMPL mailing list
It's not clear what you are trying to achieve. CPLEX uses the iterative algorithm. You could find a brief description of the algorithm at https://ampl.com/BOOKLETS/amplcplex122userguide.pdf(pp 37). You can print the values of variables by using display command after CPLEX solves the optimization problem.

Thanks,
Paras

--
Paras Tiwari
[hidden email]
{#HS:559800133-5041#}
On Thu, Apr 12, 2018 at 12:23 PM UTC, Zeyad Kassem' Via Ampl Modeling Language <[hidden email]> wrote:
Hi all!

Is there a way - using - CPLEX - to iteratively, i.e. basis change after change, solve an LP? What I want to have is something like the output caused by option cplex_options 'display=2', e.g.

Iteration Dual Objective In Variable Out Variable
1 I 0.000000 x10 c5 slack
2 38.500000 x2 c1 artif
3 35.500000 x3 c2 artif
4 28.000000 x1 c3 artif
5 24.000000 c5 slack x4
CPLEX 12.8.0.0: optimal solution; objective 24
5 dual simplex iterations (1 in phase I)
obj = 24.00

and in addition a halt after each iteration (e.g. to manipulate the course of the optimization)..

And, consequently, is there a straightforward way to display the specific tableaus inbetween or at least at the end of a run?

Have a nice day ...
--
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 16172] Iteratively solving

Peter Greistorfer

Thank you for the response. - "It's not clear what you are trying to achieve."? That matches - targeting the simplex algorithm - almost perfectly the content of your pdf (p.38):

"Each iteration of the algorithm picks a new basic variable from among the nonbasic ones, steps to a new basic solution, and drops some basic variable at a bound."

The only thing that's missing, is that CPLEX returns to the AMPL-console after each of said iterations (and not after all iterations to the optimum are done).

Secondly, the output wanted: I know about that way, from which I would say that it is not a very comfortable one. I was searching for a type of display tableau command ...

--
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 16174] Iteratively solving

AMPL mailing list
When running CPLEX from AMPL, it is not possible to return control to AMPL after each simplex iteration, or to see the current simplex tableau. Return of control requires access to CPLEX callbacks, which is currently not possible in AMPL (though we are working on a solution for release this year). Also CPLEX does not store the simplex tableau; it's possible that using certain CPLEX APIs you could compute the tableau, but except for very small problems that would become very expensive to do at each iteration.

--
Robert Fourer
[hidden email]
{#HS:559800133-5041#}
On Fri, Apr 13, 2018 at 12:53 PM UTC, Ampl Modeling Language <[hidden email]> wrote:
Thank you for the response. - "It's not clear what you are trying to achieve."? That matches - targeting the simplex algorithm - almost perfectly the content of your pdf (p.38):

"Each iteration of the algorithm picks a new basic variable from among the nonbasic ones, steps to a new basic solution, and drops some basic variable at a bound."

The only thing that's missing, is that CPLEX returns to the AMPL-console after each of said iterations (and not after all iterations to the optimum are done).

Secondly, the output wanted: I know about that way, from which I would say that it is not a very comfortable one. I was searching for a type of display tableau command ...



On Thu, Apr 12, 2018 at 8:26 PM UTC, AMPL Google Group <[hidden email]> wrote:
It's not clear what you are trying to achieve. CPLEX uses the iterative algorithm. You could find a brief description of the algorithm at https://ampl.com/BOOKLETS/amplcplex122userguide.pdf(pp 37). You can print the values of variables by using display command after CPLEX solves the optimization problem.

Thanks,
Paras

--
Paras Tiwari
[hidden email]


On Thu, Apr 12, 2018 at 12:23 PM UTC, Ampl Modeling Language <[hidden email]> wrote:
Hi all!

Is there a way - using - CPLEX - to iteratively, i.e. basis change after change, solve an LP? What I want to have is something like the output caused by option cplex_options 'display=2', e.g.

Iteration Dual Objective In Variable Out Variable
1 I 0.000000 x10 c5 slack
2 38.500000 x2 c1 artif
3 35.500000 x3 c2 artif
4 28.000000 x1 c3 artif
5 24.000000 c5 slack x4
CPLEX 12.8.0.0: optimal solution; objective 24
5 dual simplex iterations (1 in phase I)
obj = 24.00

and in addition a halt after each iteration (e.g. to manipulate the course of the optimization)..

And, consequently, is there a straightforward way to display the specific tableaus inbetween or at least at the end of a run?

Have a nice day ...

Peter Greistorfer



--
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 16177] Iteratively solving

Peter Greistorfer
Honestly, that was actually expected. The more I'm looking forward to the outcome of your efforts ...! Thanks a lot & have a nice weekend,

Peter


On Friday, April 13, 2018 at 4:54:48 PM UTC+2, AMPL Google Group wrote:
When running CPLEX from AMPL, it is not possible to return control to AMPL after each simplex iteration, or to see the current simplex tableau. Return of control requires access to CPLEX callbacks, which is currently not possible in AMPL (though we are working on a solution for release this year). Also CPLEX does not store the simplex tableau; it's possible that using certain CPLEX APIs you could compute the tableau, but except for very small problems that would become very expensive to do at each iteration.

--
Robert Fourer
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="JNhgWGmfBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@...
{#HS:559800133-5041#}
On Fri, Apr 13, 2018 at 12:53 PM UTC, Ampl Modeling Language <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="JNhgWGmfBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@...> wrote:
Thank you for the response. - "It's not clear what you are trying to achieve."? That matches - targeting the simplex algorithm - almost perfectly the content of your pdf (p.38):

"Each iteration of the algorithm picks a new basic variable from among the nonbasic ones, steps to a new basic solution, and drops some basic variable at a bound."

The only thing that's missing, is that CPLEX returns to the AMPL-console after each of said iterations (and not after all iterations to the optimum are done).

Secondly, the output wanted: I know about that way, from which I would say that it is not a very comfortable one. I was searching for a type of display tableau command ...



On Thu, Apr 12, 2018 at 8:26 PM UTC, AMPL Google Group <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="JNhgWGmfBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@...> wrote:
It's not clear what you are trying to achieve. CPLEX uses the iterative algorithm. You could find a brief description of the algorithm at <a href="https://ampl.com/BOOKLETS/amplcplex122userguide.pdf(pp" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fampl.com%2FBOOKLETS%2Famplcplex122userguide.pdf(pp\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHq4NRysHVzKOF0p8a_GnnKmvJ9pg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fampl.com%2FBOOKLETS%2Famplcplex122userguide.pdf(pp\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHq4NRysHVzKOF0p8a_GnnKmvJ9pg&#39;;return true;">https://ampl.com/BOOKLETS/amplcplex122userguide.pdf(pp 37). You can print the values of variables by using display command after CPLEX solves the optimization problem.

Thanks,
Paras

--
Paras Tiwari
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="JNhgWGmfBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@...


On Thu, Apr 12, 2018 at 12:23 PM UTC, Ampl Modeling Language <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="JNhgWGmfBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@...> wrote:
Hi all!

Is there a way - using - CPLEX - to iteratively, i.e. basis change after change, solve an LP? What I want to have is something like the output caused by option cplex_options 'display=2', e.g.

Iteration Dual Objective In Variable Out Variable
1 I 0.000000 x10 c5 slack
2 38.500000 x2 c1 artif
3 35.500000 x3 c2 artif
4 28.000000 x1 c3 artif
5 24.000000 c5 slack x4
CPLEX <a href="http://12.8.0.0" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F12.8.0.0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEMmqFyD7y5Md4WifoRnI3LorED1g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F12.8.0.0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEMmqFyD7y5Md4WifoRnI3LorED1g&#39;;return true;">12.8.0.0: optimal solution; objective 24
5 dual simplex iterations (1 in phase I)
obj = 24.00

and in addition a halt after each iteration (e.g. to manipulate the course of the optimization)..

And, consequently, is there a straightforward way to display the specific tableaus inbetween or at least at the end of a run?

Have a nice day ...

Peter Greistorfer



--
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.