Decision
Caution
Proper transformation (from Julia docs to Python docs) of math mode rendering, and therefore the “detailed model reference”, is partially broken. Until this is fixed, please refer to the original Julia documentation for any math mode rendering.
Overview
Note
This section of the documentation is auto-generated from the code of the Julia-based core model. Refer to IESopt.jl and its documentation for any further details (which may require some familiarity with Julia).
A Decision
represents a basic decision variable in the model that can be used as input for various other core component’s settings, as well as have associated costs.
Parameters
lb
Minimum size of the decision value (considered for each “unit” if count allows multiple “units”).
- Mandatory:
no
- Values:
numeric
- Unit:
- Default:
0
ub
Maximum size of the decision value (considered for each “unit” if count allows multiple “units”).
- Mandatory:
no
- Values:
numeric
- Unit:
- Default:
\(+\infty\)
cost
Cost that the decision value induces, given as \(cost \cdot value\).
- Mandatory:
no
- Values:
numeric
- Unit:
monetary (per value)
- Default:
0
fixed_value
If mode: fixed
, this value is used as the fixed value of the decision. This can be useful if this Decision
was used in a previous optimization and its value should be fixed to that value in the next optimization (applying it where ever it is used, instead of needing to find all usages). Furthermore, this allows extracting the dual value of the constraint that fixes the value, assisting in approaches like Benders decomposition. Note that this does not change the induced cost in any way.
- Mandatory:
no
- Values:
numeric
- Unit:
- Default:
fixed_cost
This setting activates a “fixed cost” component for this decision variable, which requires that the model’s problem type allows for binary variables (e.g., MILP
). This can be used to model fixed costs that are only incurred if the decision variable is active (e.g., a fixed cost for an investment that is only incurred if the investment is made). If the decision is 0
, no fixed costs have to be paid; however, if the decision is greater than 0
, the fixed cost is incurred. Note that after deciding to activate the decision, the overall value is still determined in the usual (continuous) way, incuring the (variable) cost
as well. More complex cost functions can be modelled by switching to mode sos1
or sos2
and using the sos
parameter.
- Mandatory:
no
- Values:
- Unit:
monetary
- Default:
mode
Type of the decision variable that is constructed. linear
results in a continuous decision, integer
results in a integer variable, binary
constrains it to be either 0
or 1
. sos1
and sos2
can be used to activate SOS1 or SOS2 mode (used for piecewise linear costs). See fixed_value
if setting this to fixed
.
- Mandatory:
no
- Values:
linear
,binary
,integer
,sos1
,sos2
,fixed
- Unit:
- Default:
linear
sos
TODO (meanwhile, refer to the SOS or PiecewiseLinearCost example).
- Mandatory:
no
- Values:
list
- Unit:
- Default:
build_priority
Priority for the build order of components. Components with higher build_priority are built before. This can be useful for addons, that connect multiple components and rely on specific components being initialized before others.
- Mandatory:
no
- Values:
numeric
- Unit:
- Default:
1000
Detailed model reference
Variables
fixed
How to?
Access this variable by using:
# Julia
component(model, "your_decision").var.fixed
# Python
model.get_component("your_decision").var.fixed
You can find the full implementation and all details here: IESopt.jl
.
to be added
sos
How to?
Access this variable by using:
# Julia
component(model, "your_decision").var.sos
# Python
model.get_component("your_decision").var.sos
You can find the full implementation and all details here: IESopt.jl
.
to be added
value
How to?
Access this variable by using:
# Julia
component(model, "your_decision").var.value
# Python
model.get_component("your_decision").var.value
You can find the full implementation and all details here: IESopt.jl
.
Add the variable describing the value
of this decision
to the model
. If lower and upper bounds (decision.lb
and decision.ub
) are the same, the variable will immediately be fixed to that value. This can be accessed via decision.var.value
.
Expressions
Constraints
fixed
How to?
Access this constraint by using:
# Julia
component(model, "your_decision").con.fixed
# Python
model.get_component("your_decision").con.fixed
You can find the full implementation and all details here: IESopt.jl
.
to be added
sos1
How to?
Access this constraint by using:
# Julia
component(model, "your_decision").con.sos1
# Python
model.get_component("your_decision").con.sos1
You can find the full implementation and all details here: IESopt.jl
.
to be added
sos2
How to?
Access this constraint by using:
# Julia
component(model, "your_decision").con.sos2
# Python
model.get_component("your_decision").con.sos2
You can find the full implementation and all details here: IESopt.jl
.
to be added
sos_value
How to?
Access this constraint by using:
# Julia
component(model, "your_decision").con.sos_value
# Python
model.get_component("your_decision").con.sos_value
You can find the full implementation and all details here: IESopt.jl
.
to be added
Objectives
fixed
How to?
Access this objective by using:
# Julia
component(model, "your_decision").obj.fixed
# Python
model.get_component("your_decision").obj.fixed
You can find the full implementation and all details here: IESopt.jl
.
sos
How to?
Access this objective by using:
# Julia
component(model, "your_decision").obj.sos
# Python
model.get_component("your_decision").obj.sos
You can find the full implementation and all details here: IESopt.jl
.
Add the cost defined by the SOS-based value of this Decision
to the model
.
value
How to?
Access this objective by using:
# Julia
component(model, "your_decision").obj.value
# Python
model.get_component("your_decision").obj.value
You can find the full implementation and all details here: IESopt.jl
.
Add the cost defined by the value of this Decision
to the model
:
$\(
\text{value} \cdot \text{cost}
\)$
math