You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@constraint(m, [t insetdiff(p.heating_techs, p.techs_can_serve_process_heat), ts in p.time_steps], m[:dvHeatToStorage][b,t,"ProcessHeat",ts] ==0)
232
-
else
233
-
@constraint(m, [t in p.heating_techs, ts in p.time_steps], m[:dvHeatToStorage][b,t,"ProcessHeat",ts] ==0)
234
-
end
218
+
@constraint(m, [q in p.heating_loads, ts in p.time_steps], m[:dvHeatFromStorage][b,q,ts] ==0)
219
+
@constraint(m, [t inunion(p.techs.heating, p.techs.chp), q in p.heating_loads, ts in p.time_steps], m[:dvHeatToStorage][b,t,q,ts] ==0)
235
220
end
236
221
else
237
222
add_storage_size_constraints(m, p, b)
@@ -244,6 +229,7 @@ function build_reopt!(m::JuMP.AbstractModel, p::REoptInputs)
244
229
end
245
230
elseif b in p.s.storage.types.hot
246
231
add_hot_thermal_storage_dispatch_constraints(m, p, b)
232
+
add_hot_tes_flow_restrictions!(m, p, b)
247
233
elseif b in p.s.storage.types.cold
248
234
add_cold_thermal_storage_dispatch_constraints(m, p, b)
249
235
else
@@ -714,6 +700,7 @@ function add_variables!(m::JuMP.AbstractModel, p::REoptInputs)
714
700
end
715
701
end
716
702
if!isempty(p.s.storage.types.hot)
703
+
#TODO introduce these as sparse variables, add a set of techs charging storage?
717
704
@variable(m, dvHeatToStorage[p.s.storage.types.hot, union(p.techs.heating, p.techs.chp), p.heating_loads, p.time_steps] >=0) # Power charged to hot storage b at quality q [kW]
718
705
@variable(m, dvHeatFromStorage[p.s.storage.types.hot, p.heating_loads, p.time_steps] >=0) # Power discharged from hot storage system b for load q [kW]
0 commit comments