--
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/IGtr2gaplgY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/reply-77152-1505616648-4372019963-1620323971-584072298%40helpscout.net.
|
|
Sender notified by Mailtrack 05/07/21, 10:21:52 AM |
many thanks for the reply. I have attached the structure of the loop.
basically, it has two "nested Benders Loops" for a specific purpose.
On Thu, May 6, 2021 at 5:59 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
At the start of each pass through the repeat loop, the "while" condition is tested; if the condition is true, the repeat stops immediately without executing any more statements in the loop. Maybe you are not writing the loop correctly. With only the information that you give, however, it is not possible to say what the error might be.
--
Robert Fourer
am...@googlegroups.com
|
|
Sender notified by Mailtrack 05/10/21, 02:55:40 AM |
--
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/IGtr2gaplgY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/reply-77152-1505616648-4378628837-1620585271-1950909611%40helpscout.net.
ampl: display PGmp; PGmp := 3 1 1 1 1 2.1247 3 1 1 1 2 2.1247 3 2 1 1 1 2.48695 3 2 1 1 2 2.48695 3 3 1 1 1 2.5 3 3 1 1 2 2.5 ;
thank you for your comments. The codes were not complete.
The full model is attached. Please try to display "PGmp" variable.
(p.s. please do not share the codes in the group. )
Sender notified by
Mailtrack 05/10/21, 02:55:40 AM
On Sun, May 9, 2021 at 6:34 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
Your example shows only one loop, the "while" loop at the beginning. So it is not clear what you mean by the "two nested Benders Loops". The one loop will test the condition "(GAP_o >= 10 || GAP_i >= 10) && (nCUT <= 10 && innCUT <= 15)" at the beginning of the first pass through the loop, and at the end of every pass through the loop, and when the condition is found to be false then the loop will terminate immediately. There are no if, break, or continue statements that would cause only part of the loop to be executed.
I can't say why "no values are recorded for variables in the last iter., say x[3]. that is, only x[1], x[2] have values". There are no variables actually named x, so it is not clear which variables are not having values recorded. In any case, be sure to check that all of the "solve" statements are showing an "optimal solution" message, since if the solver reports some other status then it may not be returning anything to AMPL.
--
Robert Fourer
am...@googlegroups.com