Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revit 226552 #191

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion measures/gbxml_import_hvac/resources/radiant_panel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
4 changes: 2 additions & 2 deletions test/gbxml_hvac_import/minitest_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
Binary file not shown.
15 changes: 11 additions & 4 deletions test/gbxml_hvac_import/test_radiant_panel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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'
Expand Down