Skip to content

Commit

Permalink
Fix name
Browse files Browse the repository at this point in the history
  • Loading branch information
cfe316 committed Oct 3, 2023
1 parent 38e0d15 commit 603274f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/model/resources/thermal/thermal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ function thermal_maintenance_capacity_reserve_margin_adjustment!(EP::Model,
T = inputs["T"] # Number of time steps (hours)
ncapres = inputs["NCapacityReserveMargin"]
THERM_COMMIT = inputs["THERM_COMMIT"]
MAINT = intersect(get_maintenance(dfGen), THERM_COMMIT)
MAINT = resources_with_maintenance(dfGen)
applicable_resources = intersect(MAINT, THERM_COMMIT)

resource_component(y) = dfGen[y, :Resource]
capresfactor(y, capres) = dfGen[y, Symbol("CapRes_$capres")]
cap_size(y) = dfGen[y, :Cap_Size]
down_var(y) = EP[Symbol(maintenance_down_name(resource_component(y)))]
maint_adj = @expression(EP, [capres in 1:ncapres, t in 1:T],
-sum(capresfactor(y, capres) * down_var(y)[t] * cap_size(y) for y in MAINT))
-sum(capresfactor(y, capres) * down_var(y)[t] * cap_size(y) for y in applicable_resources))
add_similar_to_expression!(EP[:eCapResMarBalance], maint_adj)
end

0 comments on commit 603274f

Please sign in to comment.