Skip to content

Commit c3e4768

Browse files
authored
Merge pull request #594 from NatLabRockies/fix-tes-results-fields
Bug fixes in TES-to-Turbine results and CHP heuristic input processing
2 parents b7470e8 + bba8662 commit c3e4768

11 files changed

Lines changed: 47 additions & 43 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ Classify the change according to the following categories:
2525
### Deprecated
2626
### Removed
2727

28+
## fix-tes-results-fields
29+
### Changed
30+
- Refactored some results expressions so that `value.` isn't called within them.
31+
32+
### Fixed
33+
- Fixed an error creating results for flows from hot TES to the steam turbine.
34+
- Fixed an bug preventing `include_cooling_in_chp_size` from being included in CHP inputs.
35+
2836
## hrly-gen-costs
2937
### Added
3038
- **Generator** **om_cost_per_hr_per_kw_rated**: Generator non-fuel variable operations and maintenance costs in \$/hr/kw_rated (default of 0.0)

src/core/chp.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ conflict_res_min_allowable_fraction_of_max = 0.25
4343
serve_absorption_chiller_only::Bool = false # If CHP produced heat either serves absorption chiller or sends it to waste; only applies to the months specified in months_serving_absorption_chiller_only if true
4444
months_serving_absorption_chiller_only::AbstractVector{Int64} = Int64[] # months in which CHP only sevres the absorption chiller, with 1=January and 12=December; only applied when serve_absorption_chiller_only = true
4545
follow_electrical_load::Bool = false # If CHP follows the electrical load by running at capacity or meeting the load only.
46-
include_cooling_in_chp_size::Bool = false # If true, includes cooling load (via absorption chiller) in the heuristic CHP sizing calculation along with heating loads. Defaults to true when AbsorptionChiller is present with CHP. Requires CoolingLoad to be specified.
4746
4847
macrs_option_years::Int = 5 # Notes: this value cannot be 0 if aiming to apply 100% bonus depreciation; default may change if Site.sector is not "commercial/industrial"
4948
macrs_bonus_fraction::Float64 = 1.0 #Note: default may change if Site.sector is not "commercial/industrial"

src/core/scenario.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,11 @@ function Scenario(d::Dict; flex_hvac_from_json=false)
473473
avg_cooling_load_kw = nothing
474474
absorption_chiller_cop = nothing
475475
# User can override by explicitly setting include_cooling_in_chp_size = false
476-
include_cooling_in_size = get(d["CHP"], "include_cooling_in_chp_size", haskey(d, "AbsorptionChiller"))
476+
if "include_cooling_in_chp_size" in keys(d["CHP"])
477+
include_cooling_in_size = pop!(d["CHP"], "include_cooling_in_chp_size")
478+
else
479+
include_cooling_in_size = haskey(d, "AbsorptionChiller")
480+
end
477481

478482
if max_cooling_demand_kw > 0 && include_cooling_in_size
479483
# Use already-processed cooling_load object
@@ -498,7 +502,7 @@ function Scenario(d::Dict; flex_hvac_from_json=false)
498502
sector = site.sector,
499503
federal_procurement_type = site.federal_procurement_type)
500504
else # Only if modeling CHP without heating_load and existing_boiler (for prime generator, electric-only)
501-
chp = CHP(d["CHP"],
505+
chp = CHP(d["CHP"];
502506
electric_load_series_kw = electric_load.loads_kw,
503507
avg_cooling_load_kw = avg_cooling_load_kw,
504508
absorption_chiller_cop = absorption_chiller_cop,

src/results/boiler.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ function add_boiler_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _n="
5555
r["thermal_to_steamturbine_series_mmbtu_per_hour"] = round.(value.(NewBoilerToSteamTurbine), digits=3)
5656

5757
if "AbsorptionChiller" in p.techs.cooling
58-
@expression(m, NewBoilertoAbsorptionChillerKW[ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller]["Boiler",q,ts] for q in p.heating_loads)))
59-
@expression(m, NewBoilertoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller]["Boiler",q,ts])))
58+
@expression(m, NewBoilertoAbsorptionChillerKW[ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller]["Boiler",q,ts] for q in p.heating_loads))
59+
@expression(m, NewBoilertoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller]["Boiler",q,ts]))
6060
else
6161
@expression(m, NewBoilertoAbsorptionChillerKW[ts in p.time_steps], 0.0)
6262
@expression(m, NewBoilertoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], 0.0)

src/results/chp.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ function add_chp_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _n="")
100100
end
101101
r["thermal_to_steamturbine_series_mmbtu_per_hour"] = round.(value.(CHPToSteamTurbineKW) / KWH_PER_MMBTU, digits=5)
102102
if "AbsorptionChiller" in p.techs.cooling
103-
@expression(m, CHPtoAbsorptionChillerKW[ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller][t,q,ts] for t in p.techs.chp, q in p.heating_loads)))
104-
@expression(m, CHPtoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller][t,q,ts] for t in p.techs.chp)))
103+
@expression(m, CHPtoAbsorptionChillerKW[ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller][t,q,ts] for t in p.techs.chp, q in p.heating_loads))
104+
@expression(m, CHPtoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller][t,q,ts] for t in p.techs.chp))
105105
else
106106
@expression(m, CHPtoAbsorptionChillerKW[ts in p.time_steps], 0.0)
107107
@expression(m, CHPtoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], 0.0)

src/results/cst.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ function add_concentrating_solar_results(m::JuMP.AbstractModel, p::REoptInputs,
7171
r["thermal_to_steamturbine_series_mmbtu_per_hour"] = round.(value.(CSTToSteamTurbine) / KWH_PER_MMBTU, digits=3)
7272

7373
if "AbsorptionChiller" in p.techs.cooling
74-
@expression(m, CSTtoAbsorptionChillerKW[ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller]["CST",q,ts] for q in p.heating_loads)))
75-
@expression(m, CSTtoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller]["CST",q,ts])))
74+
@expression(m, CSTtoAbsorptionChillerKW[ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller]["CST",q,ts] for q in p.heating_loads))
75+
@expression(m, CSTtoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller]["CST",q,ts]))
7676
else
7777
@expression(m, CSTtoAbsorptionChillerKW[ts in p.time_steps], 0.0)
7878
@expression(m, CSTtoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], 0.0)

src/results/electric_heater.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ function add_electric_heater_results(m::JuMP.AbstractModel, p::REoptInputs, d::D
6868
r["thermal_to_steamturbine_series_mmbtu_per_hour"] = round.(value.(ElectricHeaterToSteamTurbine) / KWH_PER_MMBTU, digits=3)
6969

7070
if "AbsorptionChiller" in p.techs.cooling
71-
@expression(m, ElectricHeatertoAbsorptionChillerKW[ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller]["ElectricHeater",q,ts] for q in p.heating_loads)))
72-
@expression(m, ElectricHeatertoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller]["ElectricHeater",q,ts])))
71+
@expression(m, ElectricHeatertoAbsorptionChillerKW[ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller]["ElectricHeater",q,ts] for q in p.heating_loads))
72+
@expression(m, ElectricHeatertoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller]["ElectricHeater",q,ts]))
7373
else
7474
@expression(m, ElectricHeatertoAbsorptionChillerKW[ts in p.time_steps], 0.0)
7575
@expression(m, ElectricHeatertoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], 0.0)

src/results/existing_boiler.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ function add_existing_boiler_results(m::JuMP.AbstractModel, p::REoptInputs, d::D
5858
r["thermal_to_steamturbine_series_mmbtu_per_hour"] = round.(value.(BoilerToSteamTurbineKW) ./ KWH_PER_MMBTU, digits=5)
5959

6060
if "AbsorptionChiller" in p.techs.cooling
61-
@expression(m, BoilertoAbsorptionChillerKW[ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller]["ExistingBoiler",q,ts] for q in p.heating_loads)))
62-
@expression(m, BoilertoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller]["ExistingBoiler",q,ts])))
61+
@expression(m, BoilertoAbsorptionChillerKW[ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller]["ExistingBoiler",q,ts] for q in p.heating_loads))
62+
@expression(m, BoilertoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller]["ExistingBoiler",q,ts]))
6363
else
6464
@expression(m, BoilertoAbsorptionChillerKW[ts in p.time_steps], 0.0)
6565
@expression(m, BoilertoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], 0.0)

src/results/steam_turbine.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ function add_steam_turbine_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dic
9191
r["thermal_to_high_temp_thermal_storage_series_mmbtu_per_hour"] = round.(value.(m[:SteamTurbineToHotSensibleTESKW]) ./ KWH_PER_MMBTU, digits=5)
9292

9393
if "AbsorptionChiller" in p.techs.cooling
94-
@expression(m, SteamTurbinetoAbsorptionChillerKW[ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller][t,q,ts] for t in p.techs.steam_turbine, q in p.heating_loads)))
95-
@expression(m, SteamTurbinetoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller][t,q,ts] for t in p.techs.steam_turbine)))
94+
@expression(m, SteamTurbinetoAbsorptionChillerKW[ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller][t,q,ts] for t in p.techs.steam_turbine, q in p.heating_loads))
95+
@expression(m, SteamTurbinetoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller][t,q,ts] for t in p.techs.steam_turbine))
9696
else
9797
@expression(m, SteamTurbinetoAbsorptionChillerKW[ts in p.time_steps], 0.0)
9898
@expression(m, SteamTurbinetoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], 0.0)

src/results/thermal_storage.jl

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,20 @@ function add_hot_storage_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict,
4343
r["storage_to_absorption_chiller_series_mmbtu_per_hour"] = round.(value.(HotTEStoAbsorptionChillerKW) / KWH_PER_MMBTU, digits=7)
4444

4545
if p.s.storage.attr[b].can_supply_steam_turbine && ("SteamTurbine" in p.techs.all)
46-
storage_to_turbine = (sum(m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,q,ts] for q in p.heating_loads) for ts in p.time_steps)
47-
storage_to_turbine_sh = (sum(m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,"SpaceHeating",ts]) for ts in p.time_steps)
48-
storage_to_turbine_dhw = (sum(m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,"DomesticHotWater",ts]) for ts in p.time_steps)
49-
storage_to_turbine_ph = (sum(m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,"ProcessHeat",ts]) for ts in p.time_steps)
50-
r["storage_to_steamturbine_series_mmbtu_per_hour"] = round.(value.(storage_to_turbine) / KWH_PER_MMBTU, digits=7)
51-
r["storage_to_load_series_mmbtu_per_hour"] = round.(value.(discharge .- storage_to_turbine .- HotTEStoAbsorptionChillerKW) / KWH_PER_MMBTU, digits=7)
46+
@expression(m, HotTEStoTurbineKW[ts in p.time_steps], sum(m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,q,ts] for q in p.heating_loads))
47+
@expression(m, HotTEStoTurbineByQualityKW[q in p.heating_loads, ts in p.time_steps], m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,q,ts])
48+
r["storage_to_steamturbine_series_mmbtu_per_hour"] = round.(value.(HotTEStoTurbineKW) / KWH_PER_MMBTU, digits=7)
49+
r["storage_to_load_series_mmbtu_per_hour"] = round.(value.(discharge .- HotTEStoTurbineKW .- HotTEStoAbsorptionChillerKW) / KWH_PER_MMBTU, digits=7)
5250
else
53-
storage_to_turbine = zeros(length(p.time_steps))
54-
storage_to_turbine_sh = zeros(length(p.time_steps))
55-
storage_to_turbine_dhw = zeros(length(p.time_steps))
56-
storage_to_turbine_ph = zeros(length(p.time_steps))
51+
@expression(m, HotTEStoTurbineKW[ts in p.time_steps], 0.0)
52+
@expression(m, HotTEStoTurbineByQualityKW[q in p.heating_loads, ts in p.time_steps], 0.0)
5753
r["storage_to_load_series_mmbtu_per_hour"] = round.(value.(discharge .- HotTEStoAbsorptionChillerKW) / KWH_PER_MMBTU, digits=7)
5854
r["storage_to_steamturbine_series_mmbtu_per_hour"] = zeros(length(p.time_steps))
5955
end
6056

6157
if "SpaceHeating" in p.heating_loads && p.s.storage.attr[b].can_serve_space_heating
6258
@expression(m, HotTESToSpaceHeatingKW[ts in p.time_steps],
63-
m[Symbol("dvHeatFromStorage"*_n)][b,"SpaceHeating",ts] - storage_to_turbine_sh[ts] - HotTEStoAbsorptionChillerByQualityKW["SpaceHeating",ts]
59+
m[Symbol("dvHeatFromStorage"*_n)][b,"SpaceHeating",ts] - HotTEStoTurbineByQualityKW["SpaceHeating",ts] - HotTEStoAbsorptionChillerByQualityKW["SpaceHeating",ts]
6460
)
6561
else
6662
@expression(m, HotTESToSpaceHeatingKW[ts in p.time_steps], 0.0)
@@ -69,7 +65,7 @@ function add_hot_storage_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict,
6965

7066
if "DomesticHotWater" in p.heating_loads && p.s.storage.attr[b].can_serve_dhw
7167
@expression(m, HotTESToDHWKW[ts in p.time_steps],
72-
m[Symbol("dvHeatFromStorage"*_n)][b,"DomesticHotWater",ts] - storage_to_turbine_dhw[ts] - HotTEStoAbsorptionChillerByQualityKW["DomesticHotWater",ts]
68+
m[Symbol("dvHeatFromStorage"*_n)][b,"DomesticHotWater",ts] - HotTEStoTurbineByQualityKW["DomesticHotWater",ts] - HotTEStoAbsorptionChillerByQualityKW["DomesticHotWater",ts]
7369
)
7470
else
7571
@expression(m, HotTESToDHWKW[ts in p.time_steps], 0.0)
@@ -78,7 +74,7 @@ function add_hot_storage_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict,
7874

7975
if "ProcessHeat" in p.heating_loads && p.s.storage.attr[b].can_serve_process_heat
8076
@expression(m, HotTESToProcessHeatKW[ts in p.time_steps],
81-
m[Symbol("dvHeatFromStorage"*_n)][b,"ProcessHeat",ts] - storage_to_turbine_ph[ts] - HotTEStoAbsorptionChillerByQualityKW["ProcessHeat",ts]
77+
m[Symbol("dvHeatFromStorage"*_n)][b,"ProcessHeat",ts] - HotTEStoTurbineByQualityKW["ProcessHeat",ts] - HotTEStoAbsorptionChillerByQualityKW["ProcessHeat",ts]
8278
)
8379
else
8480
@expression(m, HotTESToProcessHeatKW[ts in p.time_steps], 0.0)
@@ -197,33 +193,29 @@ function add_high_temp_thermal_storage_results(m::JuMP.AbstractModel, p::REoptIn
197193

198194
discharge = (sum(m[Symbol("dvHeatFromStorage"*_n)][b,q,ts] for q in p.heating_loads) for ts in p.time_steps)
199195
if "AbsorptionChiller" in p.techs.cooling
200-
@expression(m, HighTempTEStoAbsorptionChillerKW[ts in p.time_steps], sum(value.(m[:dvHeatFromStorageToAbsorptionChiller][b,q,ts] for q in p.heating_loads)))
201-
@expression(m, HighTempTEStoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], value(m[:dvHeatFromStorageToAbsorptionChiller][b,q,ts]))
196+
@expression(m, HighTempTEStoAbsorptionChillerKW[ts in p.time_steps], sum(m[:dvHeatFromStorageToAbsorptionChiller][b,q,ts] for q in p.heating_loads))
197+
@expression(m, HighTempTEStoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], m[:dvHeatFromStorageToAbsorptionChiller][b,q,ts])
202198
else
203199
@expression(m, HighTempTEStoAbsorptionChillerKW[ts in p.time_steps], 0.0)
204200
@expression(m, HighTempTEStoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], 0.0)
205201
end
206202
r["storage_to_absorption_chiller_series_mmbtu_per_hour"] = round.(value.(HighTempTEStoAbsorptionChillerKW) / KWH_PER_MMBTU, digits=7)
207203

208204
if p.s.storage.attr[b].can_supply_steam_turbine && ("SteamTurbine" in p.techs.all)
209-
storage_to_turbine = (sum(m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,q,ts] for q in p.heating_loads) for ts in p.time_steps)
210-
storage_to_turbine_sh = (sum(m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,"SpaceHeating",ts]) for ts in p.time_steps)
211-
storage_to_turbine_dhw = (sum(m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,"DomesticHotWater",ts]) for ts in p.time_steps)
212-
storage_to_turbine_ph = (sum(m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,"ProcessHeat",ts]) for ts in p.time_steps)
213-
r["storage_to_steamturbine_series_mmbtu_per_hour"] = round.(value.(storage_to_turbine) / KWH_PER_MMBTU, digits=7)
214-
r["storage_to_load_series_mmbtu_per_hour"] = round.(value.(discharge .- storage_to_turbine .- HighTempTEStoAbsorptionChillerKW) / KWH_PER_MMBTU, digits=7)
205+
@expression(m, HighTempTEStoTurbineKW[ts in p.time_steps], sum(m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,q,ts] for q in p.heating_loads))
206+
@expression(m, HighTempTEStoTurbineByQualityKW[q in p.heating_loads, ts in p.time_steps], m[Symbol("dvHeatFromStorageToTurbine"*_n)][b,q,ts])
207+
r["storage_to_steamturbine_series_mmbtu_per_hour"] = round.(value.(HighTempTEStoTurbineKW) / KWH_PER_MMBTU, digits=7)
208+
r["storage_to_load_series_mmbtu_per_hour"] = round.(value.(discharge .- HighTempTEStoTurbineKW .- HighTempTEStoAbsorptionChillerKW) / KWH_PER_MMBTU, digits=7)
215209
else
216-
storage_to_turbine = zeros(length(p.time_steps))
217-
storage_to_turbine_sh = zeros(length(p.time_steps))
218-
storage_to_turbine_dhw = zeros(length(p.time_steps))
219-
storage_to_turbine_ph = zeros(length(p.time_steps))
210+
@expression(m, HighTempTEStoTurbineKW[ts in p.time_steps], 0.0)
211+
@expression(m, HighTempTEStoTurbineByQualityKW[q in p.heating_loads, ts in p.time_steps], 0.0)
220212
r["storage_to_load_series_mmbtu_per_hour"] = round.(value.(discharge .- HighTempTEStoAbsorptionChillerKW) / KWH_PER_MMBTU, digits=7)
221213
r["storage_to_steamturbine_series_mmbtu_per_hour"] = zeros(length(p.time_steps))
222214
end
223215

224216
if "SpaceHeating" in p.heating_loads && p.s.storage.attr[b].can_serve_space_heating
225217
@expression(m, HighTempTESToSpaceHeatingKW[ts in p.time_steps],
226-
m[Symbol("dvHeatFromStorage"*_n)][b,"SpaceHeating",ts] - storage_to_turbine_sh[ts] - HighTempTEStoAbsorptionChillerByQualityKW["SpaceHeating",ts]
218+
m[Symbol("dvHeatFromStorage"*_n)][b,"SpaceHeating",ts] - HighTempTEStoTurbineByQualityKW["SpaceHeating",ts] - HighTempTEStoAbsorptionChillerByQualityKW["SpaceHeating",ts]
227219
)
228220
else
229221
@expression(m, HighTempTESToSpaceHeatingKW[ts in p.time_steps], 0.0)
@@ -232,7 +224,7 @@ function add_high_temp_thermal_storage_results(m::JuMP.AbstractModel, p::REoptIn
232224

233225
if "DomesticHotWater" in p.heating_loads && p.s.storage.attr[b].can_serve_dhw
234226
@expression(m, HighTempTESToDHWKW[ts in p.time_steps],
235-
m[Symbol("dvHeatFromStorage"*_n)][b,"DomesticHotWater",ts] - storage_to_turbine_dhw[ts] - HighTempTEStoAbsorptionChillerByQualityKW["DomesticHotWater",ts]
227+
m[Symbol("dvHeatFromStorage"*_n)][b,"DomesticHotWater",ts] - HighTempTEStoTurbineByQualityKW["DomesticHotWater",ts] - HighTempTEStoAbsorptionChillerByQualityKW["DomesticHotWater",ts]
236228
)
237229
else
238230
@expression(m, HighTempTESToDHWKW[ts in p.time_steps], 0.0)
@@ -241,7 +233,7 @@ function add_high_temp_thermal_storage_results(m::JuMP.AbstractModel, p::REoptIn
241233

242234
if "ProcessHeat" in p.heating_loads && p.s.storage.attr[b].can_serve_process_heat
243235
@expression(m, HighTempTESToProcessHeatKW[ts in p.time_steps],
244-
m[Symbol("dvHeatFromStorage"*_n)][b,"ProcessHeat",ts] - storage_to_turbine_ph[ts] - HighTempTEStoAbsorptionChillerByQualityKW["ProcessHeat",ts]
236+
m[Symbol("dvHeatFromStorage"*_n)][b,"ProcessHeat",ts] - HighTempTEStoTurbineByQualityKW["ProcessHeat",ts] - HighTempTEStoAbsorptionChillerByQualityKW["ProcessHeat",ts]
245237
)
246238
else
247239
@expression(m, HighTempTESToProcessHeatKW[ts in p.time_steps], 0.0)

0 commit comments

Comments
 (0)