From b098d3bf08aeb0751578b7805ff120e65592b94f Mon Sep 17 00:00:00 2001 From: An Pham Date: Wed, 22 Jan 2025 11:51:04 -0700 Subject: [PATCH] some clean up --- src/core/ghp.jl | 5 ----- src/core/scenario.jl | 7 ++----- src/results/ghp.jl | 5 +++++ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/core/ghp.jl b/src/core/ghp.jl index 8afab3aec..ea3e13899 100644 --- a/src/core/ghp.jl +++ b/src/core/ghp.jl @@ -217,11 +217,6 @@ function setup_installed_cost_curve!(d::Dict, ghp::GHP, response::Dict) # the initial slope is based on the heat pump size (e.g. $/ton) of the cost curve for # building a rebate-based cost curve if there are less-than big_number maximum incentives ghp.tech_sizes_for_cost_curve = [0.0, big_number] - - # Set sizing factor = 1 if user inputs their own GHP size - if haskey(d, "GHP") && haskey(d["GHP"],"max_ton") - ghp.heatpump_capacity_sizing_factor_on_peak_load = 1.0 - end if ghp.heat_pump_configuration == "WSHP" # Use this with the cost curve to determine absolute cost diff --git a/src/core/scenario.jl b/src/core/scenario.jl index b0dc5de74..eaebe8222 100644 --- a/src/core/scenario.jl +++ b/src/core/scenario.jl @@ -640,13 +640,10 @@ function Scenario(d::Dict; flex_hvac_from_json=false) end elseif d["GHP"]["load_served_by_ghp"] == "nonpeak" @info "GHP serves all thermal load below thermal peak load" - heating_load_mmbtu = ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"] + heating_load_mmbtu = ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"] #ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"][ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"] .>= d["GHP"]["max_ton"]*12000/1000000] .= d["GHP"]["max_ton"]*12000/1000000 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 - open("/Users/apham/Documents/Projects/REopt_Projects/FY25/GHP Development/Test_Model_Presized_GHP/data/nonpeak_thermal_load.json","w") do f - JSON.print(f, ghpghx_inputs) - end + ghpghx_inputs["heating_thermal_load_mmbtu_per_hr"] = heating_load_mmbtu end end results, inputs_params = GhpGhx.ghp_model(ghpghx_inputs) diff --git a/src/results/ghp.jl b/src/results/ghp.jl index a9a8a01a7..5e89b95dd 100644 --- a/src/results/ghp.jl +++ b/src/results/ghp.jl @@ -24,6 +24,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") + 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"]