Skip to content

Commit

Permalink
format revision
Browse files Browse the repository at this point in the history
  • Loading branch information
Yingli committed Nov 5, 2024
1 parent 41f250d commit 868e9de
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions measures/ResStockArguments/resources/electrical_panel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@ def has_cooling(hvac_cooling_type)

def is_ducted_heat_pump_heating(heat_pump_type)
if [HPXML::HVACTypeHeatPumpAirToAir, HPXML::HVACTypeHeatPumpGroundToAir].include?(heat_pump_type)
return 'true'
return true
else
return 'false'
return false
end
end

def convert_fuel_and_presence(equipment_present, fuel_type)
if equipment_present == 'false'
if equipment_present == false
return 'none'
else
return simplify_fuel_type(fuel_type)
Expand Down Expand Up @@ -284,10 +284,11 @@ def get_major_elec_load_count(args)
load_count = load_vars.sum

load_count = load_count_hvac_adjustment(load_count, args)
return load_count
end

def electric_fuel_and_presence(equipment_present, fuel_type)
if equipment_present == 'false'
if equipment_present == false
return 0
else
return is_electric_fuel(fuel_type)
Expand All @@ -303,10 +304,10 @@ def is_electric_fuel(fuel_type)
end

def has_pv(pv_system_present)
if pv_system_present == 'false'
return 0
else
if pv_system_present
return 1
else
return 0
end
end

Expand All @@ -317,10 +318,10 @@ def load_count_hvac_adjustment(load_count, args)
hvac_cooling_type = convert_cooling_type(args[:cooling_system_type], args[:heat_pump_type])

#Count ducted heat pump only once if it provides heating and cooling
if hvac_cooling_type == "heat pump" and is_ducted_heat_pump_heating == 'true'
if hvac_cooling_type == "heat pump" and is_ducted_heat_pump_heating == true
load_count = load_count - 1 #Assuming a single ducted heat pump provides heating and cooling
#Don't count plug-in Room ACs as major loads
elsif HPXML::HVACTypeRoomAirConditioner == "room air conditioner"
elsif hvac_cooling_type == HPXML::HVACTypeRoomAirConditioner
load_count = load_count - 1
end
return load_count
Expand Down

0 comments on commit 868e9de

Please sign in to comment.