(class from pyomo.common.errors)
pyomo.common.errors
Bases: InvalidExpressionError
InvalidExpressionError
Exception raised for constraints that cannot be represented or emitted.
Pyomo will raise this exception when:
Creating a constraint with a trivial (Boolean) expression. Creating a constraint from an incorrectly structured tuple. Compiling a ranged constraint (lb <= body <= ub) where either lb or ub are variable expressions. Compiling a constraint that cannot be expressed / written in the target format or interface.
Creating a constraint with a trivial (Boolean) expression.
Creating a constraint from an incorrectly structured tuple.
Compiling a ranged constraint (lb <= body <= ub) where either lb or ub are variable expressions.
lb <= body <= ub
lb
ub
Compiling a constraint that cannot be expressed / written in the target format or interface.
Member Documentation
Exception.add_note(note) – add a note to the exception
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.