many thanks for the answer.
I was wondering if AMPL-Gurobi supports the suffix ".unbdd" when a model is unbounded. If not, is there any workaround for this issue?
On Mon, Feb 21, 2022 at 3:58 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
You can write this condition equivalently as
Z = 0 ==> | X - Y | <= 0.01
which is equivalent to
Z = 0 ==> -0.01 <= X - Y <= 0.01
Constraints of this form are recognized by CPLEX, Gurobi, and Xpress (search "indicator constraint" in this forum for more information). For other solvers, this constraint can be linearized as
-0.01 - M * Z <= X - Y <= 0.001 + M * Z
where M is some upper limit on | X - Y |.
--
Robert Fourer
am...@googlegroups.com
|
|
Sender notified by Mailtrack | 03/01/22, 06:12:49 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/NT4yMEz0gsw/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-1793392955-5301161312-1646066892-1246598970%40helpscout.net.
--
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/NT4yMEz0gsw/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-1793392955-5301161312-1646066892-1246598970%40helpscout.net.
hello,
I have attached my model. I implement a Benders-like algorithm, where :
1- subproblems SP1 & SP2 have bilinear terms only in the objective and return the extreme points.
2- subproblem SP3 which computes the extreme ray (using "var.unbdd") is Linear.
here is the problem :
AMPL does not allow getting the "var.unbdd" from SP3 (line 172 of file *.run) although it is a linear model because SP1 and SP3 are not linear in the loop.
Is this an AMPL issue or solvers?
On Tue, Mar 1, 2022 at 4:07 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
many thanks for the detailed description.
In my problem, there is only a bi-linear term in the objective, and no integer variables. what is the workaround to get the direction of unboundedness? What about using CPLEX?
Sender notified by
Mailtrack
03/01/22, 06:12:49 AM
On Mon, Feb 28, 2022 at 4:47 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
For unbounded problems that have linear objectives and constraints, and continuous variables, Gurobi uses the .unbdd suffix to return a direction (ray) of unboundedness.
Gurobi does not support the .unbdd suffix for other kinds of problems. However, for unbounded problems that have linear objectives and constraints, but some integer (including binary) variables, it may be useful to know a direction of unboundedness for the continuous relaxation (which is also unbounded). You can get that by setting "option relax_integrality 1;" before solving.
Note that when there are constraints that are not linear, like indicator constraints, it is not possible to get .unbdd values from Gurobi.
(In testing this, I noticed that "variable.unbdd returned" sometimes appears in the Gurobi messages even when the .unbdd suffix is not created or returned. This issue has been reported.)
--
Robert Fourer
am...@googlegroups.com
|
|
Sender notified by Mailtrack |
| 03/02/22, 08:21:26 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/NT4yMEz0gsw/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-1793392955-5306606854-1646172002-643555117%40helpscout.net.
hello,
when solving a bi-linear mip model with Gurobi (by setting "nonconvex =2"), sometimes the solution time gets very long. Is there any control, to terminate the solver (in a loop with repeated solve statements) from proving optimality and continuing the solution process with the best bound found?
On Wed, Mar 2, 2022 at 2:27 PM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
On Tue, Mar 1, 2022 at 9:59 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
The problem here is that you are referencing the solver-defined suffix .unbdd inside a loop that includes your solve statements. In that case, to prevent the "Bad suffix .unbdd" error, you must explicitly define the .unbdd suffix in your script, by adding the statement
suffix unbdd OUT;
before the loop. (The cause of this problem is that AMPL does an initial analysis of all the statements in the loop, before it starts executing the loop. But during AMPL's initial analysis of the loop, .unbdd has not yet been created by the solver.)
--
Robert Fourer
am...@googlegroups.com
hello,
my model works well but sometimes it gives the following error, which seems to be a bug in the AMPL software:
UC_var_ToU_ddu.run, line 266 (offset 74443454):
missing "
context: >>> ********* "> UC_var_ToU.stt; <<<
UC_var_ToU_ddu.run, line 267 (offset 74443499):
Bug: Bad ncmd = 71 in havestmt()
context: printf "\n" > >>> UC_var_ToU.stt; <<<
sw:
I have attached my model. could you please advise me on how to resolve it?
03/20/22, 09:02:39 AM
On Mon, Mar 14, 2022 at 1:33 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
When you have a long run with nonconvex=2, Gurobi is doing a branch-and-bound search similar to what it does for problems that have integer variables. Thus the following settings (listed under Gurobi Options for AMPL) will stop Gurobi and return the best solution found, as soon as a certain condition is satisfied:
mipgap r -- when the relative gap between lower and upper bounds is <= r
mipgapabs r -- when the absolute gap between lower and upper bounds is <= r
nodelim n -- when the number of search nodes generated equals n
solnlimit n -- when the number of solutions found equals n
timelim n -- when the elapsed time is n seconds
--
Robert Fourer
am...@googlegroups.com
|
|
Sender notified by Mailtrack |
| 03/23/22, 06:46:35 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/NT4yMEz0gsw/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-1793392955-5369798363-1647964903-985434708%40helpscout.net.
thank you for following up. here are the answers questions:
- this eros appears only sometimes, not always.
- I use Windows 7 os.
- the output of command "ampl -vv" is : "AMPL Version 20220219 (MS VC++ 10.0, 64-bit), .. , Maintenance expires with version 20220531."
Sender notified by
Mailtrack
03/23/22, 06:46:35 AM
On Tue, Mar 22, 2022 at 4:01 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
I do not see this error when I run "UC_var_ToU_ddu.run" on my computer. The output, in the attached file, does not show any error messages. Here are some questions to follow up:
- When the error appears for a particular run file, does it appear every time that you execute that run file? Or for the same file, does it sometimes appear, and sometimes not?
- Which operating system (Windows, Mac, or LInux) are you using?
- What is the output of the command "ampl -v" on your computer?
--
Robert Fourer
am...@googlegroups.com
|
|
Sender notified by Mailtrack |
| 03/25/22, 06:10:39 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/NT4yMEz0gsw/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-1793392955-5377855735-1648142523-1408004764%40helpscout.net.