Internals
StorageSystemsSimulations.StateofChargeTargetConstraint
— TypeStruct to create the state of charge target constraint at the end of period. Used when the attribute energy_target = true
.
The specified constraint is formulated as:
\[e^{st}_{T} + e^{st+} - e^{st-} = E^{st}_{T},\]
StorageSystemsSimulations.StorageRegularizationConstraintCharge
— TypeStruct to specify the auxiliary constraints for regularization terms in the objective function for the charge variable. Used when the attribute regularization = true
.
The specified constraints are formulated as:
\[\begin{align*} & \left(\sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} R^*_{p,t-1} sb_{stc,p,t-1} + p^{st,ch}_{t-1} - \sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} R^*_{p,t-1} sb_{stc,p,t-1}\right) - \left(\sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} R^*_{p,t} sb_{stc,p,t} + p^{st,ch}_{t} - \sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} R^*_{p,t} sb_{stc,p,t}\right) \le z^{st, ch}_{t}, \forall t \in \{2,\dots, T\}\\ & \left(\sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} R^*_{p,t-1} sb_{stc,p,t-1} + p^{st,ch}_{t-1} - \sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} R^*_{p,t-1} sb_{stc,p,t-1}\right) - \left(\sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} R^*_{p,t} sb_{stc,p,t} + p^{st,ch}_{t} - \sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} R^*_{p,t} sb_{stc,p,t}\right) \ge -z^{st, ch}_{t}, \forall t \in \{2,\dots, T\} \end{align*}\]
StorageSystemsSimulations.StorageRegularizationConstraintDischarge
— TypeStruct to specify the auxiliary constraints for regularization terms in the objective function for the discharge variable. Used when the attribute regularization = true
.
The specified constraints are formulated as:
\[\begin{align*} & \left(\sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} R^*_{p,t-1} sb_{std,p,t-1} + p^{st,ds}_{t-1} - \sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} R^*_{p,t-1} sb_{std,p,t-1}\right) -\left(\sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} R^*_{p,t} sb_{std,p,t} + p^{st,ds}_{t} - \sum_{p \in \mathcal{P}^{\text{as}_ ext{dn}}} R^*_{p,t} sb_{std,p,t}\right) \le z^{st, ds}_{t}, \forall t \in \{2,\dots, T\}\\ & \left(\sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} R^*_{p,t-1} sb_{std,p,t-1} + p^{st,ds}_{t-1} - \sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} R^*_{p,t-1} sb_{std,p,t-1}\right) -\left(\sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} R^*_{p,t} sb_{std,p,t} + p^{st,ds}_{t} - \sum_{p \in \mathcal{P}^{\text{as}_ ext{dn}}} R^*_{p,t} sb_{std,p,t}\right) \ge -z^{st, ds}_{t}, \forall t \in \{2,\dots, T\} \end{align*}\]
StorageSystemsSimulations.StorageRegularizationVariable
— TypeAbstract used for StorageRegularization variables
PowerSimulations.add_constraints!
— Methodadd_constraints!(
container::PowerSimulations.OptimizationContainer,
_::Type{PowerSimulations.EnergyBalanceConstraint},
devices::InfrastructureSystems.FlattenIteratorWrapper{V<:Storage},
model::PowerSimulations.DeviceModel{V<:Storage, StorageDispatchWithReserves},
network_model::PowerSimulations.NetworkModel{X<:PowerModels.AbstractPowerModel}
)
Add Energy Balance Constraints for AbstractStorageFormulation
PowerSimulations.add_constraints!
— Methodadd_constraints!(
container::PowerSimulations.OptimizationContainer,
_::Type{ReserveDischargeConstraint},
devices::InfrastructureSystems.FlattenIteratorWrapper{V<:Storage},
model::PowerSimulations.DeviceModel{V<:Storage, StorageDispatchWithReserves},
network_model::PowerSimulations.NetworkModel{X<:PowerModels.AbstractPowerModel}
)
Add Energy Balance Constraints for AbstractStorageFormulation
PowerSimulations.add_feedforward_constraints!
— Methodadd_feedforward_constraints!(
container::PowerSimulations.OptimizationContainer,
_::PowerSimulations.DeviceModel,
devices::InfrastructureSystems.FlattenIteratorWrapper{T<:Component},
ff::EnergyLimitFeedforward
)
add_feedforward_constraints(container::OptimizationContainer,
cons_name::Symbol,
param_reference,
var_key::VariableKey)
Constructs a parameterized integral limit constraint to implement feedforward from other models. The Parameters are initialized using the upper boundary values of the provided variables.
sum(variable[var_name, t] for t in 1:affected_periods)/affected_periods <= param_reference[var_name]
LaTeX
$\sum_{t} x \leq param^{max}$
Arguments
- container::OptimizationContainer : the optimization_container model built in PowerSimulations
- model::DeviceModel : the device model
- devices::IS.FlattenIteratorWrapper{T} : list of devices
- ff::FixValueFeedforward : a instance of the FixValue Feedforward
PowerSimulations.add_feedforward_constraints!
— Methodadd_feedforward_constraints!(
container::PowerSimulations.OptimizationContainer,
_::PowerSimulations.DeviceModel{T<:Storage, U<:StorageSystemsSimulations.AbstractStorageFormulation},
devices::InfrastructureSystems.FlattenIteratorWrapper{T<:Storage},
ff::EnergyTargetFeedforward
)
add_feedforward_constraints(
container::OptimizationContainer,
::DeviceModel,
devices::IS.FlattenIteratorWrapper{T},
ff::EnergyTargetFeedforward,
) where {T <: PSY.Component}
Constructs a equality constraint to a fix a variable in one model using the variable value from other model results.
variable[var_name, t] + slack[var_name, t] >= param[var_name, t]
LaTeX
$x + slack >= param$
Arguments
- container::OptimizationContainer : the optimization_container model built in PowerSimulations
- model::DeviceModel : the device model
- devices::IS.FlattenIteratorWrapper{T} : list of devices
- ff::EnergyTargetFeedforward : a instance of the EnergyTarget Feedforward
PowerSimulations.get_min_max_limits
— Methodget_min_max_limits(
d::Storage,
_::Type{StateofChargeLimitsConstraint},
_::Type{<:StorageSystemsSimulations.AbstractStorageFormulation}
) -> NamedTuple{(:min, :max), <:Tuple{Any, Any}}
Min and max limits for Energy Capacity Constraint and AbstractStorageFormulation