From 58220773e804ad668001095473aabbefdc8d993a Mon Sep 17 00:00:00 2001 From: Bill Becker Date: Tue, 3 Oct 2023 22:09:29 -0600 Subject: [PATCH] Handle Central GHP WWHP in update_ghp_metrics with different sizes --- src/results/proforma.jl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/results/proforma.jl b/src/results/proforma.jl index 532408957..0f93f345f 100644 --- a/src/results/proforma.jl +++ b/src/results/proforma.jl @@ -365,10 +365,16 @@ function update_metrics(m::Metrics, p::REoptInputs, tech::AbstractTech, tech_nam end function update_ghp_metrics(m::REopt.Metrics, p::REoptInputs, tech::REopt.AbstractTech, tech_name::String, results::Dict, third_party::Bool) - total_kw = results[tech_name]["size_heat_pump_ton"] - existing_kw = :existing_kw in fieldnames(typeof(tech)) ? tech.existing_kw : 0 - new_kw = total_kw - existing_kw - capital_cost = new_kw * tech.installed_cost_per_kw[2] + if tech.heat_pump_configuration == "WWHP" + total_heating_kw = results[tech_name]["size_wwhp_heating_pump_ton"] + total_cooling_kw = results[tech_name]["size_wwhp_cooling_pump_ton"] + new_kw = (total_heating_kw + total_cooling_kw) / 2.0 # WIP workaround, not ideal + capital_cost = total_heating_kw * tech.wwhp_heating_pump_installed_cost_curve[2] + + total_cooling_kw * tech.wwhp_cooling_pump_installed_cost_curve[2] + else + new_kw = results[tech_name]["size_heat_pump_ton"] + capital_cost = new_kw * tech.installed_cost_per_kw[2] + end # building specific OM costs annual_om = -1 * tech.building_sqft*tech.om_cost_per_sqft_year