Skip to content

Commit 7c1759b

Browse files
committed
Bugfix, cleanup.
1 parent 1f884e2 commit 7c1759b

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

HPXMLtoOpenStudio/measure.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>hpxm_lto_openstudio</name>
55
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
6-
<version_id>05d1c691-8e2f-4b24-ac72-37ed91ce927f</version_id>
7-
<version_modified>2024-11-26T18:31:43Z</version_modified>
6+
<version_id>292ac47f-8279-4f3c-bf8c-1381bebc8724</version_id>
7+
<version_modified>2024-11-26T18:46:54Z</version_modified>
88
<xml_checksum>D8922A73</xml_checksum>
99
<class_name>HPXMLtoOpenStudio</class_name>
1010
<display_name>HPXML to OpenStudio Translator</display_name>
@@ -357,7 +357,7 @@
357357
<filename>hpxml.rb</filename>
358358
<filetype>rb</filetype>
359359
<usage_type>resource</usage_type>
360-
<checksum>68D7F8FA</checksum>
360+
<checksum>490E065F</checksum>
361361
</file>
362362
<file>
363363
<filename>hpxml_schema/HPXML.xsd</filename>

HPXMLtoOpenStudio/resources/hpxml.rb

+13-13
Original file line numberDiff line numberDiff line change
@@ -665,30 +665,31 @@ def set_unique_hpxml_ids(hpxml_doc, last_building_only = false)
665665
# @param building_id [String] If provided, only search the single HPXML Building with the given ID
666666
# @return [Hash] Map of HPXML::FuelTypeXXX => boolean
667667
def has_fuels(building_id = nil)
668-
has_fuels = {}
668+
has_fuel = {}
669+
has_fuel[HPXML::FuelTypeElectricity] = true
669670

670671
HPXML::fossil_fuels.each do |fuel|
671-
has_fuels[fuel] = false
672+
has_fuel[fuel] = false
672673

673674
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)
675676

676677
# Check HVAC systems
677678
hpxml_bldg.hvac_systems.each do |hvac_system|
678679
if hvac_system.respond_to?(:heating_system_fuel) && hvac_system.heating_system_fuel == fuel
679-
has_fuels[fuel] = true
680+
has_fuel[fuel] = true
680681
end
681682
if hvac_system.respond_to?(:cooling_system_fuel) && hvac_system.cooling_system_fuel == fuel
682-
has_fuels[fuel] = true
683+
has_fuel[fuel] = true
683684
end
684685
if hvac_system.respond_to?(:heat_pump_fuel) && hvac_system.heat_pump_fuel == fuel
685-
has_fuels[fuel] = true
686+
has_fuel[fuel] = true
686687
end
687688
if hvac_system.respond_to?(:backup_heating_fuel) && hvac_system.backup_heating_fuel == fuel
688-
has_fuels[fuel] = true
689+
has_fuel[fuel] = true
689690
end
690691
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
692693
end
693694
end
694695

@@ -699,24 +700,24 @@ def has_fuels(building_id = nil)
699700
hpxml_bldg.cooking_ranges +
700701
hpxml_bldg.fuel_loads).each do |appliance|
701702
if appliance.fuel_type == fuel
702-
has_fuels[fuel] = true
703+
has_fuel[fuel] = true
703704
end
704705
end
705706

706707
# Check pool/spa heaters
707708
if fuel == HPXML::FuelTypeNaturalGas
708709
(hpxml_bldg.pools + hpxml_bldg.permanent_spas).each do |pool_or_spa|
709710
if pool_or_spa.heater_type == HPXML::HeaterTypeGas
710-
has_fuels[fuel] = true
711+
has_fuel[fuel] = true
711712
end
712713
end
713714
end
714715

715-
break if has_fuels[fuel]
716+
break if has_fuel[fuel]
716717
end
717718
end
718719

719-
return has_fuels
720+
return has_fuel
720721
end
721722

722723
# Delete any shared HVAC systems that are actually modeled as systems serving multiple dwelling units.
@@ -1767,7 +1768,6 @@ def has_fuel_access
17671768
#
17681769
# @return [Hash] Map of HPXML::FuelTypeXXX => boolean
17691770
def has_fuels()
1770-
# Returns a hash with whether each fuel exists in the HPXML Building
17711771
return @parent_object.has_fuels(@building_id)
17721772
end
17731773

ReportUtilityBills/measure.rb

-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ def energyPlusOutputRequests(runner, user_arguments)
200200

201201
# Check for presence of fuels once
202202
has_fuel = hpxml.has_fuels()
203-
has_fuel[HPXML::FuelTypeElectricity] = true
204203

205204
# Has production
206205
has_pv = @hpxml_buildings.count { |hpxml_bldg| !hpxml_bldg.pv_systems.empty? } > 0

ReportUtilityBills/measure.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>report_utility_bills</name>
55
<uid>ca88a425-e59a-4bc4-af51-c7e7d1e960fe</uid>
6-
<version_id>cb110d70-a630-47c6-85be-56fd13ce3603</version_id>
7-
<version_modified>2024-11-26T18:31:47Z</version_modified>
6+
<version_id>b93dbb48-5955-47f6-a379-b56ac2c3b1d2</version_id>
7+
<version_modified>2024-11-26T18:46:57Z</version_modified>
88
<xml_checksum>15BF4E57</xml_checksum>
99
<class_name>ReportUtilityBills</class_name>
1010
<display_name>Utility Bills Report</display_name>
@@ -180,7 +180,7 @@
180180
<filename>measure.rb</filename>
181181
<filetype>rb</filetype>
182182
<usage_type>script</usage_type>
183-
<checksum>4D969F72</checksum>
183+
<checksum>209AE1AD</checksum>
184184
</file>
185185
<file>
186186
<filename>detailed_rates/README.md</filename>

0 commit comments

Comments
 (0)