Skip to content

Commit

Permalink
Fix storage_all capres
Browse files Browse the repository at this point in the history
  • Loading branch information
cfe316 committed Oct 26, 2023
1 parent d383b91 commit 5b4b2e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/model/resources/storage/storage_all.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function storage_all_reserves!(EP::Model, inputs::Dict, setup::Dict)
vRSV_charge = EP[:vRSV_charge]
vREG_discharge = EP[:vREG_discharge]
vRSV_discharge = EP[:vRSV_discharge]
vCAPRES_discharge = EP[:vCAPRES_discharge]

eTotalCap = EP[:eTotalCap]
eTotalCapEnergy = EP[:eTotalCapEnergy]

Expand Down Expand Up @@ -208,7 +208,7 @@ function storage_all_reserves!(EP::Model, inputs::Dict, setup::Dict)
add_similar_to_expression!(expr[STOR_REG, :], vREG_discharge[STOR_REG, :])
add_similar_to_expression!(expr[STOR_RSV, :], vRSV_discharge[STOR_RSV, :])
if CapacityReserveMargin > 0
add_similar_to_expression!(expr[STOR_ALL, :], vCAPRES_discharge[STOR_ALL, :])
add_similar_to_expression!(expr[STOR_ALL, :], EP[:vCAPRES_discharge][STOR_ALL, :])
end
# Maximum discharging rate and contribution to reserves up must be less than power rating
@constraint(EP, [y in STOR_ALL, t in T], expr[y, t] <= eTotalCap[y])
Expand Down

0 comments on commit 5b4b2e1

Please sign in to comment.