Skip to content
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
215805c
added max_ton to GHP
Dec 23, 2024
4105abf
Merge branch 'develop' into allow_presized_GHP_GHX
Dec 23, 2024
58896fc
Update scenario.jl
Dec 23, 2024
5fc72e1
set capacity_sizing_factor= 1.0 when user provides GHP size
Dec 23, 2024
c7087c9
Update ghp.jl
Dec 23, 2024
a34571e
only input scaled down load to GhpGhx.jl if presized GHP
Dec 24, 2024
9c79798
Update scenario.jl
Dec 24, 2024
2abbf90
clean up
Dec 24, 2024
137bc76
set sizing factor = 1 if user inputs their own GHP size
Dec 31, 2024
ef4af55
Update CHANGELOG.md
Dec 31, 2024
fa6f434
clean up
Dec 31, 2024
56a5734
Merge branch 'develop' into allow_presized_GHP_GHX
Dec 31, 2024
1c6d461
add methods to calculate load served by GHP
Jan 21, 2025
031612d
Merge branch 'develop' into allow_presized_GHP_GHX
Jan 22, 2025
b098d3b
some clean up
Jan 22, 2025
c2edf0f
Merge branch 'develop' into allow_presized_GHP_GHX
Feb 21, 2025
656d23d
added option for max number of boreholes
Feb 21, 2025
4358ddf
added loop to force number of boreholes output = user-specified one
Feb 21, 2025
2b8e97c
changed parameter name for max number of boreholes
Feb 21, 2025
dc8c936
corrected naming errors
Feb 21, 2025
d217757
minor clean up
Feb 21, 2025
ac450d3
Update scenario.jl
Feb 21, 2025
2b34f33
Update scenario.jl
Feb 21, 2025
e5d03c0
Merge branch 'develop' into allow_presized_GHP_GHX
Mar 22, 2025
12246fe
Update scenario.jl
Mar 28, 2025
3f9e0e3
resolved ghp output reporting issues
Apr 2, 2025
41c7e4a
cleaned up
Apr 2, 2025
0c3b4bf
updated ghp output to capture reduced load dispatch
Apr 4, 2025
d109c4d
fixed issues with cooling load
Apr 4, 2025
d02e798
Update scenario.jl
Apr 4, 2025
b422da1
Update scenario.jl
Apr 8, 2025
c59934d
added scaled thermal load option
Apr 8, 2025
1650b0f
fixed cooling load issues
Apr 14, 2025
95f7fe0
clean up
Apr 14, 2025
659c4a1
clean up
Apr 14, 2025
58c7b1b
reduced GHP size when reduced load for presized GHX
Apr 15, 2025
5189abc
output annual thermal production from GHP
Apr 15, 2025
4187614
Update ghp.jl
Apr 15, 2025
7e74136
set default load_served_by_ghp as nonpeak
Apr 16, 2025
9cf8d3d
Update scenario.jl
Apr 16, 2025
20427ed
add presized GHP GHX tests
Apr 16, 2025
3b1631a
clean up and update tests
Apr 16, 2025
0ea61a3
added warning messages and info
Apr 16, 2025
a941b46
Update runtests.jl
Apr 16, 2025
0847ebe
Merge branch 'develop' into allow_presized_GHP_GHX
Apr 16, 2025
333a7f9
Update runtests.jl
Apr 17, 2025
775b332
temporarily remove presized GHP/GHX tests
Apr 17, 2025
1ec37cd
Try to get GhpGhx.jl to run in GitHub Actions
Bill-Becker May 1, 2025
a5f81c9
Add GhpGhx.jl and import AFTER activating TestEnv environment
Bill-Becker May 1, 2025
04599da
Remove redundant GHP tests up front which were just to test adding Gh…
Bill-Becker May 2, 2025
c7f845b
fixed typo
May 2, 2025
0128d78
un-hardcode tonne to mmbtu conversion
May 2, 2025
b0bf8ad
added space between math operators
May 2, 2025
918730f
removed redundant code
May 2, 2025
0ae17d9
Merge branch 'develop' into allow_presized_GHP_GHX
May 11, 2025
0f54181
remove setting sizing factor
May 11, 2025
2636ecc
Update runtests.jl
May 11, 2025
fa243c3
Update runtests.jl
May 12, 2025
209b525
resolved failed tests
May 12, 2025
94a517f
Update runtests.jl
May 12, 2025
b33a13d
Update runtests.jl
May 14, 2025
dabaff8
Update runtests.jl
May 15, 2025
943e3de
Update runtests.jl
May 16, 2025
3d85690
Merge branch 'develop' into allow_presized_GHP_GHX
May 19, 2025
7b594b4
Update runtests.jl
May 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ Classify the change according to the following categories:

## v0.48.2
### Added
- Add new optional parameter **max_ton** to GHP module to allow user to size GHP smaller than peak load
- Battery residual value if choosing replacement strategy for degradation
- Add new **ElectricStorage** parameters **max_duration_hours** and **min_duration_hours** to bound the energy duration of battery storage
### Changed
Expand Down
16 changes: 11 additions & 5 deletions src/core/ghp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ struct with outer constructor:
installed_cost_ghx_per_ft::Float64 = 14.0
installed_cost_building_hydronic_loop_per_sqft = 1.70
om_cost_per_sqft_year::Float64 = -0.51
building_sqft::Float64 # Required input
building_sqft::Float64 # Required input
space_heating_efficiency_thermal_factor::Float64 = NaN # Default depends on building and location
cooling_efficiency_thermal_factor::Float64 = NaN # Default depends on building and location
cooling_efficiency_thermal_factor::Float64 = NaN # Default depends on building and location
ghpghx_response::Dict = Dict()
can_serve_dhw::Bool = false
max_ton::Real # Maximum heat pump capacity size. Default at a big number
max_number_of_boreholes::Real # Maximum GHX size
load_served_by_ghp::String # "scaled" or "nonpeak"

macrs_option_years::Int = 5
macrs_bonus_fraction::Float64 = 0.6
Expand Down Expand Up @@ -77,6 +80,9 @@ Base.@kwdef mutable struct GHP <: AbstractGHP
can_serve_space_heating::Bool = true
can_serve_process_heat::Bool = false
can_supply_steam_turbine::Bool = false
max_ton::Real = BIG_NUMBER
max_number_of_boreholes::Real = BIG_NUMBER
load_served_by_ghp::String = "nonpeak"

aux_heater_type::String = "electric"
is_ghx_hybrid::Bool = false
Expand Down Expand Up @@ -154,7 +160,7 @@ function GHP(response::Dict, d::Dict)
end
# incentives = IncentivesNoProdBased(**d_mod)

setup_installed_cost_curve!(ghp, response)
setup_installed_cost_curve!(d, ghp, response)

setup_om_cost!(ghp)

Expand All @@ -168,10 +174,10 @@ function GHP(response::Dict, d::Dict)
end

"""
setup_installed_cost_curve!(response::Dict, ghp::GHP)
setup_installed_cost_curve!(d::Dict, response::Dict, ghp::GHP)

"""
function setup_installed_cost_curve!(ghp::GHP, response::Dict)
function setup_installed_cost_curve!(d::Dict, ghp::GHP, response::Dict)
big_number = 1.0e10
# GHX and GHP sizing metrics for cost calculations
total_ghx_ft = response["outputs"]["number_of_boreholes"] * response["outputs"]["length_boreholes_ft"]
Expand Down
96 changes: 92 additions & 4 deletions src/core/scenario.jl
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ function Scenario(d::Dict; flex_hvac_from_json=false)
space_heating_thermal_load_reduction_with_ghp_kw = zeros(8760 * settings.time_steps_per_hour)
cooling_thermal_load_reduction_with_ghp_kw = zeros(8760 * settings.time_steps_per_hour)
eval_ghp = false
get_ghpghx_from_input = false
get_ghpghx_from_input = false
if haskey(d, "GHP") && haskey(d["GHP"],"building_sqft")
eval_ghp = true
if haskey(d["GHP"], "ghpghx_responses") && !isempty(d["GHP"]["ghpghx_responses"])
Expand Down Expand Up @@ -620,13 +620,103 @@ function Scenario(d::Dict; flex_hvac_from_json=false)
end

ghpghx_results = Dict()

try
# Call GhpGhx.jl to size GHP and GHX
@info "Starting GhpGhx.jl"
# Call GhpGhx.jl to size GHP and GHX
# If user provides udersized GHP, calculate load to send to GhpGhx.jl, and load to send to REopt for backup
Comment thread
atpham88 marked this conversation as resolved.
Outdated
thermal_load_ton = ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"]*1000000/12000
Comment thread
atpham88 marked this conversation as resolved.
Outdated
if haskey(ghpghx_inputs,"cooling_thermal_load_ton")
cooling_load_ton = ghpghx_inputs["cooling_thermal_load_ton"]
thermal_load_ton .+= cooling_load_ton
end
peak_thermal_load_ton = maximum(thermal_load_ton)
if haskey(d["GHP"],"max_ton") && peak_thermal_load_ton > d["GHP"]["max_ton"]
@info "User entered undersized GHP. Calculating load that can be served by user specified undersized GHP"
# When user specifies undersized GHP, calculate the load to be served by GHP and send the rest to REopt
if !haskey(d["GHP"], "load_served_by_ghp")
d["GHP"]["load_served_by_ghp"] = "nonpeak"
end
# If user choose to scale down total load (load_served_by_ghp="scaled"), calculate the ratio of the udersized GHP size and peak load
if d["GHP"]["load_served_by_ghp"] == "scaled"
@info "GHP served scaled down of total thermal load"
peak_ratio = d["GHP"]["max_ton"]/peak_thermal_load_ton
Comment thread
atpham88 marked this conversation as resolved.
Outdated
# Scale the total load profile down by the peak_ratio and use this scaled down load to rerun GhpGhx.jl
heating_load_mmbtu = ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"]
heating_load_mmbtu = heating_load_mmbtu .* peak_ratio
ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"] = heating_load_mmbtu
if haskey(ghpghx_inputs,"cooling_thermal_load_ton")
ghpghx_inputs["cooling_thermal_load_ton"] = cooling_load_ton .* peak_ratio
end
elseif d["GHP"]["load_served_by_ghp"] == "nonpeak"
@info "GHP serves all thermal load below peak"
heating_load_mmbtu = ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"]
# if cooling load is included, cut down total thermal load and send as much heating load to GhpGhx.jl as possible
if haskey(ghpghx_inputs,"cooling_thermal_load_ton")
thermal_load_ton = heating_load_mmbtu.*1000000/12000 .+ cooling_load_ton
Comment thread
atpham88 marked this conversation as resolved.
Outdated
peak_thermal_load_ton = maximum(thermal_load_ton)
# If total thermal load (heating + cooling) is more than user-defined GHP size,
# first reduce heating load as much as possible while keeping cooling load the same
if peak_thermal_load_ton > d["GHP"]["max_ton"]
thermal_load_ton[thermal_load_ton .>=d["GHP"]["max_ton"]] .= d["GHP"]["max_ton"]
heating_load_ton = thermal_load_ton .- cooling_load_ton
# Make sure that the reduced heating load is not negative
heating_load_ton[heating_load_ton .<0] .= 0
# If the updated peak thermal load is still more than user-defined GHP size,
# reduce cooling load as well
updated_thermal_load_ton = heating_load_ton .+ cooling_load_ton
updated_peak_thermal_load_ton = maximum(updated_thermal_load_ton)
if updated_peak_thermal_load_ton > d["GHP"]["max_ton"]
updated_thermal_load_ton[updated_thermal_load_ton .>=d["GHP"]["max_ton"]] .= d["GHP"]["max_ton"]
cooling_load_ton = updated_thermal_load_ton .- heating_load_ton
ghpghx_inputs["cooling_thermal_load_ton"] = cooling_load_ton
end
heating_load_mmbtu = heating_load_ton.*12000/1000000
ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"] = heating_load_mmbtu
end
# if cooling load is not included, cut down heating load only and send to GhpGhx.jl
else
heating_load_mmbtu[heating_load_mmbtu .>=d["GHP"]["max_ton"]*12000/1000000] .= d["GHP"]["max_ton"]*12000/1000000
ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"] = heating_load_mmbtu
end
end
end
results, inputs_params = GhpGhx.ghp_model(ghpghx_inputs)
# If max_number_of_boreholes is specified, check if number of boreholes sized by GhpGhx.jl greater than user-specified max_number_of_boreholes,
# and if max_number_of_boreholes is less, reduce thermal load served by GHP until max_number_of_boreholes = number of boreholses sized by GhpGhx.jl
if haskey(d["GHP"],"max_number_of_boreholes")
optimal_number_of_boreholes = GhpGhx.get_results_for_reopt(results, inputs_params)["number_of_boreholes"]
if optimal_number_of_boreholes > d["GHP"]["max_number_of_boreholes"]
@info "Max number of boreholes specified is less than number of boreholes sized in GhpGhx.jl, reducing thermal load served by GHP further"
max_iter = 10
for iter = 1:max_iter
borehole_ratio = d["GHP"]["max_number_of_boreholes"]/optimal_number_of_boreholes
heating_load_mmbtu .*= borehole_ratio
if haskey(ghpghx_inputs,"cooling_thermal_load_ton")
cooling_load_ton .*= borehole_ratio
# if cooling load is not included, cut down heating load only and send to GhpGhx.jl
end
ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"] = heating_load_mmbtu
ghpghx_inputs["cooling_thermal_load_ton"] = cooling_load_ton

# Rerun GhpGhx.jl
results, inputs_params = GhpGhx.ghp_model(ghpghx_inputs)
optimal_number_of_boreholes = GhpGhx.get_results_for_reopt(results, inputs_params)["number_of_boreholes"]
# Solution is found if the new optimal number of boreholes sized by GhpGhx.jl = user-specified max number of boreholes,
# Otherwise, continue solving until reaching max iteration
if -0.5 < optimal_number_of_boreholes-d["GHP"]["max_number_of_boreholes"] < 0.5
break
else
iter += 1
end
end
end
end

# Create a dictionary of the results data needed for REopt
ghpghx_results = GhpGhx.get_results_for_reopt(results, inputs_params)
# Return results from GhpGhx.jl without load scaling if user does not provide GHP size or if user entered GHP size is greater than GHP size output
@info "GhpGhx.jl model solved" #with status $(results["status"])."
catch e
@info e
Expand All @@ -644,9 +734,7 @@ function Scenario(d::Dict; flex_hvac_from_json=false)
end
append!(ghp_option_list, [GHP(ghpghx_response, ghp_inputs_removed_ghpghx_params)])
# Print out ghpghx_response for loading into a future run without running GhpGhx.jl again
#open("scenarios/ghpghx_response.json","w") do f
# JSON.print(f, ghpghx_response)
#end
# open("scenarios/ghpghx_response.json","w") do f
end
# If ghpghx_responses is included in inputs, do NOT run GhpGhx.jl model and use already-run ghpghx result as input to REopt
elseif eval_ghp && get_ghpghx_from_input
Expand Down
2 changes: 1 addition & 1 deletion src/results/existing_boiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- `fuel_consumption_series_mmbtu_per_hour` # Fuel consumption series [MMBtu/hr]
- `annual_fuel_consumption_mmbtu` # Fuel consumed in a year [MMBtu]
- `thermal_production_series_mmbtu_per_hour` # Thermal energy production series [MMBtu/hr]
- `annual_thermal_production_mmbtu` # Thermal power production to TES (HotThermalStorage) series [MMBtu/hr]
- `annual_thermal_production_mmbtu` # Thermal power production in a year [MMBtu]
- `thermal_to_storage_series_mmbtu_per_hour` # Thermal power production to TES (HotThermalStorage) series [MMBtu/hr]
- `thermal_to_steamturbine_series_mmbtu_per_hour` # Thermal power production to SteamTurbine series [MMBtu/hr]
- `thermal_to_load_series_mmbtu_per_hour` # Thermal power production to serve the heating load series [MMBtu/hr]
Expand Down
23 changes: 21 additions & 2 deletions src/results/ghp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ GHP results:
- `thermal_to_space_heating_load_series_mmbtu_per_hour`
- `thermal_to_dhw_load_series_mmbtu_per_hour`
- `thermal_to_load_series_ton`
- `annual_thermal_production_mmbtu` # GHP's heating thermal power production in a year [MMBtu]
- `annual_thermal_production_tonhour` # GHP's cooling thermal power production in a year [ton]

"""

function add_ghp_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _n="")
Expand All @@ -25,6 +28,11 @@ function add_ghp_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _n="")
# r["size_heat_pump_ton"] = 0.0
# r["size_wwhp_heating_pump_ton"] = 0.0
# r["size_wwhp_cooling_pump_ton"] = 0.0

# Set sizing factor = 1 if user inputs their own GHP size
if haskey(d, "GHP") && haskey(d["GHP"],"max_ton")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bill-Becker this doesn't seem to do what I thought it did. If I remove setting post["GHP"]["heatpump_capacity_sizing_factor_on_peak_load] = 1.0 in my post, GHP is still sized at 10% higher than the user-specified one. Do you know where I should make this change instead of here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm I figured it out but decided to not restrict the sizing factor with pressed GHP instead.

p.s.ghp_option_list[ghp_option_chosen].heatpump_capacity_sizing_factor_on_peak_load = 1.0
end
if ghp_option_chosen >= 1
r["ghpghx_chosen_outputs"] = p.s.ghp_option_list[ghp_option_chosen].ghpghx_response["outputs"]

Expand All @@ -42,13 +50,22 @@ function add_ghp_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _n="")
r["space_heating_thermal_load_reduction_with_ghp_mmbtu_per_hour"] = round.(value.(HeatingThermalReductionWithGHP) ./ KWH_PER_MMBTU, digits=3)
@expression(m, CoolingThermalReductionWithGHP[ts in p.time_steps],
sum(p.cooling_thermal_load_reduction_with_ghp_kw[g,ts] * m[Symbol("binGHP"*_n)][g] for g in p.ghp_options))

@expression(m, HeatingThermalLoadServedWithGHP[ts in p.time_steps],
sum(p.ghp_heating_thermal_load_served_kw[g,ts] * m[Symbol("binGHP"*_n)][g] for g in p.ghp_options))
@expression(m, CoolingThermalLoadServedWithGHP[ts in p.time_steps],
sum(p.ghp_cooling_thermal_load_served_kw[g,ts] * m[Symbol("binGHP"*_n)][g] for g in p.ghp_options))

r["cooling_thermal_load_reduction_with_ghp_ton"] = round.(value.(CoolingThermalReductionWithGHP) ./ KWH_THERMAL_PER_TONHOUR, digits=3)
r["ghx_residual_value_present_value"] = value(m[:ResidualGHXCapCost])
r["avoided_capex_by_ghp_present_value"] = value(m[:AvoidedCapexByGHP])
r["thermal_to_space_heating_load_series_mmbtu_per_hour"] = d["HeatingLoad"]["space_heating_thermal_load_series_mmbtu_per_hour"] .- r["space_heating_thermal_load_reduction_with_ghp_mmbtu_per_hour"]
r["thermal_to_load_series_ton"] = d["CoolingLoad"]["load_series_ton"] .- r["cooling_thermal_load_reduction_with_ghp_ton"]
r["thermal_to_space_heating_load_series_mmbtu_per_hour"] = round.(value.(HeatingThermalLoadServedWithGHP) ./ KWH_PER_MMBTU, digits=3)
r["thermal_to_load_series_ton"] = round.(value.(CoolingThermalLoadServedWithGHP) ./ KWH_THERMAL_PER_TONHOUR, digits=3)
r["annual_thermal_production_mmbtu"] = sum(r["thermal_to_space_heating_load_series_mmbtu_per_hour"])
r["annual_thermal_production_tonhour"] = sum(r["thermal_to_load_series_ton"])
if p.s.ghp_option_list[ghp_option_chosen].can_serve_dhw
r["thermal_to_dhw_load_series_mmbtu_per_hour"] = d["HeatingLoad"]["dhw_thermal_load_series_mmbtu_per_hour"]
r["annual_thermal_production_mmbtu"] = r["annual_thermal_production_mmbtu"] + sum(r["thermal_to_dhw_load_series_mmbtu_per_hour"])
else
r["thermal_to_dhw_load_series_mmbtu_per_hour"] = zeros(length(p.time_steps))
end
Expand All @@ -60,6 +77,8 @@ function add_ghp_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _n="")
r["thermal_to_space_heating_load_series_mmbtu_per_hour"] = zeros(length(p.time_steps))
r["thermal_to_load_series_ton"] = zeros(length(p.time_steps))
r["thermal_to_dhw_load_series_mmbtu_per_hour"] = zeros(length(p.time_steps))
r["annual_thermal_production_mmbtu"] = 0.0
r["annual_thermal_production_tonhour"] = 0.0
end
d["GHP"] = r
nothing
Expand Down
35 changes: 34 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1971,6 +1971,8 @@ else # run HiGHS tests
6. Hybrid GHP capability functions as expected
7. Check GHP LCC calculation for URBANopt
8. Check GHX LCC calculation for URBANopt
9. Allow User-defined max GHP size
10. Allow User-defined max GHP size and max number of boreholes

"""
# Load base inputs
Expand Down Expand Up @@ -2084,8 +2086,39 @@ else # run HiGHS tests
@test ghx_lccc_initial - boreholes*boreholes_len*14 ≈ 0.0 atol = 0.01
# GHP size must be 0
@test ghp_size ≈ 0.0 atol = 0.01
# LCCC should be around be around 52% of initial capital cost due to incentive and bonus
# LCCC should be around 52% of initial capital cost due to incentive and bonus
@test ghx_lccc/ghx_lccc_initial ≈ 0.518 atol = 0.01

# User specified GHP size
#input_presizedGHP = deepcopy(input_data)
#input_presizedGHP["GHP"]["max_ton"] = 300
#input_presizedGHP["GHP"]["heatpump_capacity_sizing_factor_on_peak_load"] = 1.0
#delete!(input_presizedGHP["GHP"], "ghpghx_responses")
## Rerun REopts
#s_presizedGHP = Scenario(input_presizedGHP)
Comment thread
atpham88 marked this conversation as resolved.
Outdated
#inputs_presizedGHP = REoptInputs(s_presizedGHP)
#m1 = Model(optimizer_with_attributes(HiGHS.Optimizer, "output_flag" => false, "log_to_console" => false, "mip_rel_gap" => 0.01))
#m2 = Model(optimizer_with_attributes(HiGHS.Optimizer, "output_flag" => false, "log_to_console" => false, "mip_rel_gap" => 0.01))
#results = run_reopt([m1,m2], inputs_presizedGHP)
## GHP output size should equal user-defined GHP size
#output_GHP_size = sum(results["GHP"]["size_heat_pump_ton"])
#@test output_GHP_size ≈ 300.00 atol=0.1

# User specified max GHP and GHX sizes
#input_presizedGHPGHX = deepcopy(input_presizedGHP)
#input_presizedGHPGHX["GHP"]["max_number_of_boreholes"] = 400
# Rerun REopts
#s_presizedGHPGHX = Scenario(input_presizedGHPGHX)
#inputs_presizedGHPGHX = REoptInputs(s_presizedGHPGHX)
#m1 = Model(optimizer_with_attributes(HiGHS.Optimizer, "output_flag" => false, "log_to_console" => false, "mip_rel_gap" => 0.01))
#m2 = Model(optimizer_with_attributes(HiGHS.Optimizer, "output_flag" => false, "log_to_console" => false, "mip_rel_gap" => 0.01))
#results = run_reopt([m1,m2], inputs_presizedGHPGHX)
# GHP output size should equal user-defined GHP size
#output_GHP_size = results["GHP"]["size_heat_pump_ton"]
#output_GHX_size = results["GHP"]["ghpghx_chosen_outputs"]["number_of_boreholes"]
#@test output_GHX_size ≈ 400.00 atol=0.5
#@test output_GHP_size < 300.00

end

@testset "Hybrid GHX and GHP calculated costs validation" begin
Expand Down
Loading