VariableOutOfRangeError ¶
Bases: Exception
Referenced variable is out of bounds for the environment.
Raised when a variable referenced in an expression is out of bounds for the environment.
This error typically occurs when querying coefficients (linear, quadratic,
or higher-order) from an Expression
using a Variable
whose index does not
exist in the environment's internal registry.
This may happen if: - A variable is used from a different environment - A variable was removed or never registered properly - A raw index or tuple refers to a non-existent variable ID