Bounds ¶
Represents bounds for a variable (only supported for real and integer variables).
A Bounds
object defines the valid interval for a variable. Bounds are inclusive,
and can be partially specified by providing only a lower or upper limit. If neither
is specified, the variable is considered unbounded.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lower
|
float
|
Lower bound of the variable. Defaults to negative infinity if not specified. |
required |
upper
|
float
|
Upper bound of the variable. Defaults to positive infinity if not specified. |
required |
Examples:
Notes
- Bounds are only meaningful for variables of type
Vtype.Real
orVtype.Integer
. - If both bounds are omitted, the variable is unbounded.