From 5609a8cf19f7db52dd12f6732fdaf454f86a3e69 Mon Sep 17 00:00:00 2001 From: Eric Ringold Date: Tue, 24 Sep 2024 07:56:21 -0600 Subject: [PATCH 1/5] specify loop type in loop id lookup --- measures/gbxml_import_hvac/resources/radiant_panel.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/measures/gbxml_import_hvac/resources/radiant_panel.rb b/measures/gbxml_import_hvac/resources/radiant_panel.rb index 246da95..3e78077 100644 --- a/measures/gbxml_import_hvac/resources/radiant_panel.rb +++ b/measures/gbxml_import_hvac/resources/radiant_panel.rb @@ -23,7 +23,7 @@ def self.create_from_xml(model_manager, xml) equipment.heating_coil_type = xml.attributes['heatingCoilType'] if equipment.heating_coil_type == 'HotWater' - hydronic_loop_id = xml.elements['HydronicLoopId'] + hydronic_loop_id = xml.elements['HydronicLoopId[@hydronicLoopType="HotWater"]'] unless hydronic_loop_id.nil? hydronic_loop_id_ref = hydronic_loop_id.attributes['hydronicLoopIdRef'] unless hydronic_loop_id_ref.nil? From 5132d700c10ec670674c794c1d498b3fd81b902a Mon Sep 17 00:00:00 2001 From: Eric Ringold Date: Tue, 24 Sep 2024 09:40:57 -0600 Subject: [PATCH 2/5] update test xml to 7.03 add radiant system with different ordered loops --- .../test_gbxmls/RadiantPanelAllVariations.xml | Bin 200410 -> 207218 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/test/gbxml_hvac_import/resources/test_gbxmls/RadiantPanelAllVariations.xml b/test/gbxml_hvac_import/resources/test_gbxmls/RadiantPanelAllVariations.xml index 9ba6d0d6adb0669b35a596388a3f93f98fcd700c..74ec71caae4aebb72977b6e5d2779890de85f1b4 100644 GIT binary patch delta 4979 zcmeI0O-NKx6oBu&?>RG0Pg861FGqVw6y!8Iq$TAz1VW2SLkz5BEG;ExG)JjGLfW+I z_kyQ|%4{nLYoZ5Ikrw^YM#qh_l3EItB@&`jXI?4l{OBS=@$oo|H|N}Y&w1zEZ_d4e z9_jnA)K^LMM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J1)Pyx`P+%D2;>hjVZopH!;GNBFw9iY~An$9zy0;gOtHX8T z%cyrtUNPx2?Ag1kqdS-%c0}w{C4g;%Q=-Bm6#K3szg%rIa(k|t(f$^9ZxiC5n-ym_#gA8dZ9I}6SB;o#rig} zbF;&btP)DA#LOfW-!n_*Ke7b6^7$HzH1)*->{gB?l`k)|B&A zW;R{MXLdk$TRmM From 62cddf35444e44338ed73b434cd12a7540b61941 Mon Sep 17 00:00:00 2001 From: Eric Ringold Date: Tue, 24 Sep 2024 09:41:45 -0600 Subject: [PATCH 3/5] update test --- test/gbxml_hvac_import/test_radiant_panel.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/gbxml_hvac_import/test_radiant_panel.rb b/test/gbxml_hvac_import/test_radiant_panel.rb index afb7830..96c04a2 100644 --- a/test/gbxml_hvac_import/test_radiant_panel.rb +++ b/test/gbxml_hvac_import/test_radiant_panel.rb @@ -12,6 +12,7 @@ def before_setup end def test_xml_creation + puts "\n######\nTEST:#{__method__}\n######\n" equipment = self.model_manager.zone_hvac_equipments.values[0] xml_element = self.model_manager.gbxml_parser.zone_hvac_equipments[0] name = xml_element.elements['Name'].text @@ -24,19 +25,24 @@ def test_xml_creation end def test_build + puts "\n######\nTEST:#{__method__}\n######\n" + self.model_manager.resolve_references + self.model_manager.resolve_read_relationships self.model_manager.build - radiant_panel_elec = self.model_manager.zone_hvac_equipments.values[0].radiant_panel - radiant_panel_hw = self.model_manager.zone_hvac_equipments.values[1].radiant_panel + radiant_panel_hw = self.model_manager.zone_hvac_equipments.values[0].radiant_panel + radiant_panel_hw2 = self.model_manager.zone_hvac_equipments.values[1].radiant_panel + radiant_panel_elec = self.model_manager.zone_hvac_equipments.values[2].radiant_panel assert(radiant_panel_hw.heatingCoil.to_CoilHeatingWater.is_initialized) + assert(radiant_panel_hw2.heatingCoil.to_CoilHeatingWater.is_initialized) assert(radiant_panel_elec.heatingCoil.to_CoilHeatingElectric.is_initialized) assert(radiant_panel_elec.coolingCoil.to_CoilCoolingWater.is_initialized) assert(radiant_panel_elec.supplyAirFan.to_FanOnOff.is_initialized) assert(radiant_panel_elec.is_a?(OpenStudio::Model::ZoneHVACFourPipeFanCoil)) # only need to test one object for this mapping - assert(radiant_panel_elec.name.get == 'Radiant Panel Elec') - assert(radiant_panel_elec.additionalProperties.getFeatureAsString('id').get == 'aim0826') + assert(radiant_panel_elec.name.get == 'Radiant Panel Elec-1') + assert(radiant_panel_elec.additionalProperties.getFeatureAsString('id').get == 'aim0943') assert(radiant_panel_elec.additionalProperties.getFeatureAsString('CADObjectId').get == '280066-1') end @@ -48,6 +54,7 @@ def create_osw end def test_simulation + puts "\n######\nTEST:#{__method__}\n######\n" create_osw # set osw_path to find location of osw to run osw_in_path = Config::TEST_OUTPUT_PATH + '/radiant_panel/in.osw' From 23659f7400e04a7a5759e56f7f28826d28a72d5a Mon Sep 17 00:00:00 2001 From: Eric Ringold Date: Tue, 24 Sep 2024 09:42:03 -0600 Subject: [PATCH 4/5] correct measure names in test helper --- test/gbxml_hvac_import/minitest_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/gbxml_hvac_import/minitest_helper.rb b/test/gbxml_hvac_import/minitest_helper.rb index ed8634a..1c0e5d7 100644 --- a/test/gbxml_hvac_import/minitest_helper.rb +++ b/test/gbxml_hvac_import/minitest_helper.rb @@ -3,7 +3,7 @@ require 'json' require 'open3' -require_relative '../../measures/gbxml_hvac_import/gbxml_hvac_import' +require_relative '../../measures/gbxml_import_hvac/gbxml_import_hvac' require_relative 'config' # require_relative '../measures/loads_output_report/resources/repository' # require_relative '../measures/loads_output_report/resources/coil_sizing_detail' @@ -45,7 +45,7 @@ def create_test_annual_osw def adjust_gbxml_paths(osw, gbxml_path) osw.getMeasureSteps(OpenStudio::MeasureType.new("ModelMeasure")).each do |measure_step| - if ["import_gbxml", "advanced_import_gbxml", "gbxml_hvac_import"].include? measure_step.measureDirName + if ["gbxml_import", "gbxml_import_advanced", "gbxml_import_hvac"].include? measure_step.measureDirName measure_step.setArgument("gbxml_file_name", gbxml_path) end end From 14e2413a7fce589e5471b482f0f9aba40e4d2d2e Mon Sep 17 00:00:00 2001 From: Eric Ringold Date: Tue, 24 Sep 2024 10:02:53 -0600 Subject: [PATCH 5/5] fix duplicate zone cadobjectid --- .../test_gbxmls/RadiantPanelAllVariations.xml | Bin 207218 -> 207218 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/test/gbxml_hvac_import/resources/test_gbxmls/RadiantPanelAllVariations.xml b/test/gbxml_hvac_import/resources/test_gbxmls/RadiantPanelAllVariations.xml index 74ec71caae4aebb72977b6e5d2779890de85f1b4..8097019cf1f8f52150af6ad9bf687deb050c6143 100644 GIT binary patch delta 23 fcmex#iRaTLo`x327N#xC3q%=Bw=WcBz9