Skip to content

Commit

Permalink
Add FLEX power constraint (GenXProject#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbonaldo committed Apr 16, 2024
1 parent 3ca97dc commit f80db7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 8 additions & 3 deletions src/model/resources/flexible_demand/flexible_demand.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)


Expand Down

0 comments on commit f80db7a

Please sign in to comment.