diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b72be953..a73d7bc347 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix write_status with UCommit = WriteShadowPrices = 1 (#645) - Fix write_multi_stage_cost.jl: add discount with OPEX multipliers to cUnmetPolicyPenalty (#679) +- Add FLEX power constraint (#677) ## [0.3.7] - 2024-04-02 diff --git a/src/model/resources/flexible_demand/flexible_demand.jl b/src/model/resources/flexible_demand/flexible_demand.jl index ed4d99132a..f95d659610 100644 --- a/src/model/resources/flexible_demand/flexible_demand.jl +++ b/src/model/resources/flexible_demand/flexible_demand.jl @@ -17,6 +17,12 @@ At any given time step, the amount of demand that can be shifted or deferred can \Pi_{y,t} \leq \rho^{max}_{y,z,t}\Delta_{y,z} \hspace{4 cm} \forall y \in \mathcal{DF}, z \in \mathcal{Z}, t \in \mathcal{T} \end{aligned} ``` +At any given time step, the amount of demand that can be met cannot exceed the capacity of the FLEX resources. +```math +\begin{aligned} +\eta_{y,z}^{dflex}\Theta_{y,z,t} \leq \Delta_{y,z} \hspace{4 cm} \forall y \in \mathcal{DF}, z \in \mathcal{Z}, t \in \mathcal{T} +\end{aligned} +``` **Maximum time delay and advancements** Delayed demand must then be served within a fixed number of time steps. This is done by enforcing the sum of demand satisfied ($\Theta_{y,z,t}$) in the following $\tau^{delay}_{y,z}$ time steps (e.g., t + 1 to t + $\tau^{delay}_{y,z}$) to be greater than or equal to the level of energy deferred during time step $t$. ```math @@ -91,11 +97,10 @@ for z in 1:Z # NOTE: no maximum energy "stored" or deferred for later hours # NOTE: Flexible_Demand_Energy_Eff corresponds to energy loss due to time shifting [y in FLEX_Z, t in 1:T], EP[:vS_FLEX][y,t] == EP[:vS_FLEX][y, hoursbefore(hours_per_subperiod, t, 1)] - dfGen[y, :Flexible_Demand_Energy_Eff] * EP[:vP][y,t] + EP[:vCHARGE_FLEX][y,t] - # Maximum charging rate - # NOTE: the maximum amount that can be shifted is given by hourly availability of the resource times the maximum capacity of the resource [y in FLEX_Z, t=1:T], EP[:vCHARGE_FLEX][y,t] <= inputs["pP_Max"][y,t]*EP[:eTotalCap][y] - # NOTE: no maximum discharge rate unless constrained by other factors like transmission, etc. + # Maximum discharging rate + [y in FLEX_Z, t = 1:T], dfGen[y, :Flexible_Demand_Energy_Eff] * EP[:vP][y, t] <= EP[:eTotalCap][y] end)