@@ -665,30 +665,31 @@ def set_unique_hpxml_ids(hpxml_doc, last_building_only = false)
665
665
# @param building_id [String] If provided, only search the single HPXML Building with the given ID
666
666
# @return [Hash] Map of HPXML::FuelTypeXXX => boolean
667
667
def has_fuels(building_id = nil)
668
- has_fuels = {}
668
+ has_fuel = {}
669
+ has_fuel[HPXML::FuelTypeElectricity] = true
669
670
670
671
HPXML::fossil_fuels.each do |fuel|
671
- has_fuels [fuel] = false
672
+ has_fuel [fuel] = false
672
673
673
674
buildings.each do |hpxml_bldg|
674
- next if (not building_id.nil? && hpxml_bldg.building_id != building_id)
675
+ next if (not building_id.nil?) && ( hpxml_bldg.building_id != building_id)
675
676
676
677
# Check HVAC systems
677
678
hpxml_bldg.hvac_systems.each do |hvac_system|
678
679
if hvac_system.respond_to?(:heating_system_fuel) && hvac_system.heating_system_fuel == fuel
679
- has_fuels [fuel] = true
680
+ has_fuel [fuel] = true
680
681
end
681
682
if hvac_system.respond_to?(:cooling_system_fuel) && hvac_system.cooling_system_fuel == fuel
682
- has_fuels [fuel] = true
683
+ has_fuel [fuel] = true
683
684
end
684
685
if hvac_system.respond_to?(:heat_pump_fuel) && hvac_system.heat_pump_fuel == fuel
685
- has_fuels [fuel] = true
686
+ has_fuel [fuel] = true
686
687
end
687
688
if hvac_system.respond_to?(:backup_heating_fuel) && hvac_system.backup_heating_fuel == fuel
688
- has_fuels [fuel] = true
689
+ has_fuel [fuel] = true
689
690
end
690
691
if hvac_system.respond_to?(:integrated_heating_system_fuel) && hvac_system.integrated_heating_system_fuel == fuel
691
- has_fuels [fuel] = true
692
+ has_fuel [fuel] = true
692
693
end
693
694
end
694
695
@@ -699,24 +700,24 @@ def has_fuels(building_id = nil)
699
700
hpxml_bldg.cooking_ranges +
700
701
hpxml_bldg.fuel_loads).each do |appliance|
701
702
if appliance.fuel_type == fuel
702
- has_fuels [fuel] = true
703
+ has_fuel [fuel] = true
703
704
end
704
705
end
705
706
706
707
# Check pool/spa heaters
707
708
if fuel == HPXML::FuelTypeNaturalGas
708
709
(hpxml_bldg.pools + hpxml_bldg.permanent_spas).each do |pool_or_spa|
709
710
if pool_or_spa.heater_type == HPXML::HeaterTypeGas
710
- has_fuels [fuel] = true
711
+ has_fuel [fuel] = true
711
712
end
712
713
end
713
714
end
714
715
715
- break if has_fuels [fuel]
716
+ break if has_fuel [fuel]
716
717
end
717
718
end
718
719
719
- return has_fuels
720
+ return has_fuel
720
721
end
721
722
722
723
# Delete any shared HVAC systems that are actually modeled as systems serving multiple dwelling units.
@@ -1767,7 +1768,6 @@ def has_fuel_access
1767
1768
#
1768
1769
# @return [Hash] Map of HPXML::FuelTypeXXX => boolean
1769
1770
def has_fuels()
1770
- # Returns a hash with whether each fuel exists in the HPXML Building
1771
1771
return @parent_object.has_fuels(@building_id)
1772
1772
end
1773
1773
0 commit comments