(function from pyomo.core.expr.relational_expr)
pyomo.core.expr.relational_expr
A utility function that can be used to declare inequality and ranged inequality expressions. The expression:
inequality(2, model.x)
is equivalent to the expression:
2 <= model.x
The expression:
inequality(2, model.x, 3)
2 <= model.x <= 3
Note
This ranged inequality syntax is deprecated in Pyomo. This function provides a mechanism for expressing ranged inequalities without chained inequalities.
lower – an expression defines a lower bound
body – an expression defines the body of a ranged constraint
upper – an expression defines an upper bound
strict (bool) – A boolean value that indicates whether the inequality is strict. Default is False.
False
A relational expression. The expression is an inequality if any of the values lower, body or upper is None. Otherwise, the expression is a ranged inequality.
lower
body
upper
None