E-CE0204 — Invalid decision variable bound
Error Type |
|
|---|---|
Phase |
compiling the problem into an OMMX instance |
Python exception |
|
Message
Invalid bound for a decision variable: {...}
({...} names the two bound values and the rule they break, for example lower(0) or upper(NaN) never be NAN, lower(inf) = +inf or upper(10) = -inf is not allowed, or Lower is larger than Upper: lower(5) > upper(3). The traceback above the message names the decision variable being registered.)
Cause
A decision variable’s evaluated bounds do not describe a feasible interval, so constructing the OMMX bound failed. One of the following holds for some element of the variable:
the lower bound is greater than the upper bound
either bound is
NaNthe lower bound is
+inf, or the upper bound is-inf
Unbounded variables (lower -inf, upper +inf) are allowed.
Constant NaN and inverted infinities written directly into the model are caught earlier, when the variable is declared; see E-MD0009. This error therefore usually concerns bounds whose value is only known once the model is evaluated, such as bounds supplied by a placeholder.
Fix
Check the bound values the message quotes. When a bound comes from a placeholder, correct the value in the instance data; when it is written in the model, change the expression so that for every element the lower bound is a number no greater than the upper bound. To leave a side unbounded, use -inf as the lower bound or +inf as the upper bound.