Decision Variables
DecisionVariable — a single decision variable bound on a parameter or data field.
- class DVType(*values)[source]
Domain of a decision variable.
- Values:
RANGE: Discrete integer in a contiguous range. LIST: Discrete integer drawn from an allowed list. REAL: Continuous floating-point value.
- RANGE = 'range'
- LIST = 'list'
- REAL = 'real'
- class DecisionVariable(dv, dv_table=None, dv_type=DVType.RANGE)[source]
A single decision variable bound on a model named value or data field.
Construct via
ModelConfiguration.add_decision_variable(); configure bounds and behaviour with the chainedset_*methods.- set_min(dv_min)[source]
Set the lower bound. Pass a literal/named value for a model-level DV, or a
Fieldfor a per-row DV.- Return type:
- set_max(dv_max)[source]
Set the upper bound.
Noneremoves the bound. Seeset_min()for the literal-vs-field rule.- Return type:
- set_scale(scale)[source]
Set the granularity at which the solver explores this variable.
- Return type:
- set_seed_source(seed_source)[source]
Set the model source used to seed this variable’s initial value.
Pass a
ParameterorCalculationfor a model-level decision variable, or aFieldresolved against this variable’sdv_tablefor a per-row decision variable. The source is emitted as a!!!-prefixed reference, matching the format ofcellReference.- Return type:
- set_tag_source(tag_source)[source]
Set the model source for reading tags on this decision variable.
Pass a
ParameterorCalculationfor a model-level decision variable, or aFieldresolved against this variable’sdv_tablefor a per-row decision variable. For multiple tags per variable, the referenced value should be an array.Tags are consumed by step-level
includedTagsfilters onStepConfiguration. The source is emitted as a!!!-prefixed reference, matching the format ofcellReference.- Return type: