@@ -223,6 +223,25 @@ def read_and_create_initial_systems
223223 end
224224 end
225225 end
226+ # check that the system types from below were found, if not initialize?
227+ # TODO: double check that this makes sense and isn't hiding a data error (some systems could be present but not others?)
228+ if !@systems_map . key? ( 'HVACSystem' )
229+ hvac_xml = @g . add_hvac_system_to_facility ( @base_xml )
230+ @hvac_system = HVACSystem . new ( hvac_xml , @ns )
231+ @systems_map [ 'HVACSystem' ] = [ ]
232+ @systems_map [ 'HVACSystem' ] << BuildingSync ::HVACSystem . new ( hvac_xml , @ns )
233+ end
234+ if !@systems_map . key? ( 'LoadsSystem' )
235+ @load_system = LoadsSystem . new
236+ @systems_map [ 'LoadsSystem' ] = [ ]
237+ @systems_map [ 'LoadsSystem' ] << LoadsSystem . new
238+ end
239+ if !@systems_map . key? ( 'LightingSystem' )
240+ lighting_xml = @g . add_lighting_system_to_facility ( @base_xml )
241+ @lighting_system = LightingSystemType . new ( lighting_xml , @ns )
242+ @systems_map [ 'LightingSystem' ] = [ ]
243+ @systems_map [ 'LightingSystem' ] << LightingSystemType . new ( lighting_xml , @ns )
244+ end
226245 else
227246 hvac_xml = @g . add_hvac_system_to_facility ( @base_xml )
228247 lighting_xml = @g . add_lighting_system_to_facility ( @base_xml )
@@ -305,6 +324,7 @@ def create_building_systems(main_output_dir:, zone_hash: nil, hvac_delivery_type
305324 # Make the open_studio_system_standard applier
306325 open_studio_system_standard = determine_open_studio_system_standard
307326 OpenStudio . logFree ( OpenStudio ::Info , 'BuildingSync.Facility.create_building_system' , "Building Standard with template: #{ template } ." )
327+ puts "BuildingSync.Facility.create_building_system - Standard Template set to: #{ open_studio_system_standard } "
308328
309329 # add internal loads to space types
310330 if add_space_type_loads
0 commit comments