Presolve Message: all variables eliminated, but lower bound = 1 > 0

967 views
Skip to first unread message

Sabine Reuter

unread,
May 20, 2014, 2:33:21 PM5/20/14
to am...@googlegroups.com
Dear Bob,

I have a problem with my model formulation. Attached you will find the .mod and .dat file. When solving I recieve the message

presolve, constraint Machine_Assignment[7]:
        all variables eliminated, but lower bound = 1 > 0
presolve, constraint Machine_Assignment[6]:
        all variables eliminated, but lower bound = 1 > 0
presolve, constraint Machine_Assignment[5]:
        all variables eliminated, but lower bound = 1 > 0
presolve, constraint Machine_Assignment[4]:
        all variables eliminated, but lower bound = 1 > 0
presolve, constraint Machine_Assignment[3]:
        all variables eliminated, but lower bound = 1 > 0
58 presolve messages suppressed.

How can I fix the problem? I have to solve that with a much larger instance, too.

Thanks in advance!

Sabine Reuter

simpledata.dat
APS.mod

Robert Fourer

unread,
May 20, 2014, 9:08:10 PM5/20/14
to am...@googlegroups.com
AMPL's presolve phase can determine, from an analysis of the constraints
prior to optimization, that some of the variables must be fixed at certain
values. Presolve fixes these variables at their required values and
eliminates them from the constraints before it sends the problem to the
solver.

In the constraint Machine_Assignment[7] and the others listed, AMPL's
presolve phase has fixed and eliminated ALL of the variables. Since the
Machine_Assignment constraints have the form

sum {k in eligible_MACHINES[p]} Z[p,k] = 1;

the expression on the left has a lower bound of 1. What presolve is telling
you is that this constraint can't possibly by satisfied, because after all
the variables are fixed, the expression on the left is equal to 0.

Presumably the problem is that all of the variables in these constraints
have been fixed to zero, and hence there's no way that the sum can be 1.
This represents an error of some sort in your model. You should consider
how it is that the other constraints are forcing all of these Z[p,k]
variables to be zero.

Bob Fourer
am...@googlegroups.com

=======

Gaetano Di Felice

unread,
Jul 30, 2022, 10:37:11 AM7/30/22
to AMPL Modeling Language
Hi! i have the same error but it give me an upper bound negative that is impossible because the variables X[i,j] are binary. Could someone help me? The error occours when i insert the line 69 constraint. Thank you! ( there are a lot of comments "#" , don't mind it).

The error message is :
presolve, constraint grado_0_uscente:
        all variables eliminated, but upper bound = -1 < 0
Prova_TV.dat
Prova_TV.mod

AMPL Google Group

unread,
Aug 1, 2022, 3:29:26 PM8/1/22
to AMPL Modeling Language
I tried your files, with AMPL's presolve turned on, but they were solved successfully without any presolve warning messages:

ampl: solve;

Presolve eliminates 7 constraints and 10 variables.
Adjusted problem:
26 variables, all binary
21 constraints, all linear; 103 nonzeros
	9 equality constraints
	12 inequality constraints
1 linear objective; 26 nonzeros.

Set parameter Username
Gurobi 9.5.2: optimal solution; objective 33
8 simplex iterations
1 branch-and-cut nodes

Also you say that "the error occurs when i insert the line 69 constraint" but the model file Prova_TV.mod has only 63 lines. Can you post model and data files that give the presolve message that you observed?

Here's a simple example of how that message can occur with a constraint on some binary variables:

ampl: var x {1..3} binary;
ampl: subj to con: sum {j in 1..3} x[j] = 2;
ampl: fix {j in 1..3} x[j] := 1;
ampl: solve;

presolve, constraint con:
all variables eliminated, but upper bound = -1 < 0
Infeasible constraints determined by presolve.

This happens because presolve moves all constants, including values of fixed variables, to the right of the = sign. Thus when x[1], x[2], and x[3] are all fixed to 1, the constraint becomes 0 = -1. Presolve works with inequalities, however, so it views 0 = -1 as -1 <= 0 <= -1; there you can see that the infeasibility occurs because the upper bound -1 is less than 0.


--
Robert Fourer
am...@googlegroups.com
{#HS:1964344442-111258#}
--
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 ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/598600cb-24c4-4971-909a-95a238b325c0n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages