lib/openstudio-standards/standards/necb/ECMS/ecms.rb in openstudio-standards-0.2.15 vs lib/openstudio-standards/standards/necb/ECMS/ecms.rb in openstudio-standards-0.2.16.rc1
- old
+ new
@@ -37,45 +37,35 @@
super()
@standards_data = load_standards_database_new
@standards_data['curves'] = standards_data['tables']['curves']['table']
end
- def apply_system_ecm(model:, ecm_system_name: nil, template_standard:, runner: nil, primary_heating_fuel: nil)
+ def apply_system_ecm(model:, ecm_system_name: nil, template_standard:, runner: nil, primary_heating_fuel: nil, ecm_system_zones_map_option: 'NECB_Default')
# Do nothing if nil or other usual suspects.. covering all bases for now.
return if ecm_system_name.nil? || ecm_system_name == 'none' || ecm_system_name == 'NECB_Default'
+ ecm_system_zones_map_option = 'NECB_Default' if ecm_system_zones_map_option.nil? || ecm_system_zones_map_option == 'none'
ecm_std = Standard.build('ECMS')
systems = model.getAirLoopHVACs
map_system_to_zones, system_doas_flags = ecm_std.get_map_systems_to_zones(systems)
- zone_clg_eqpt_type = ecm_std.get_zone_clg_eqpt_type(model)
- # when the ecm is associated with adding a new HVAC system, then remove existing system components and loops
ecm_add_method_name = "add_ecm_#{ecm_system_name.downcase}"
raise("the method #{ecm_add_method_name} does not exist in the ECM class. Please verify that this should be called.") unless ecm_std.respond_to? ecm_add_method_name
+ # when the ecm is associated with adding a new HVAC system, then remove existing system components and loops
ecm_std.remove_all_zone_eqpt(systems)
ecm_std.remove_air_loops(model)
ecm_std.remove_hw_loops(model)
ecm_std.remove_chw_loops(model)
ecm_std.remove_cw_loops(model)
- # Rather than go through every add_ecm class to add 'the primary_heating_fuel' argument I added this statement to
- # only include it when it is used (for now in the add_ecm_remove_airloops_add_zone_baseboards method).
- if ecm_add_method_name == 'add_ecm_remove_airloops_add_zone_baseboards'
- ecm_std.send(ecm_add_method_name,
- model: model,
- system_zones_map: map_system_to_zones,
- system_doas_flags: system_doas_flags,
- zone_clg_eqpt_type: zone_clg_eqpt_type,
- standard: template_standard,
- primary_heating_fuel: primary_heating_fuel)
- else
- ecm_std.send(ecm_add_method_name,
- model: model,
- system_zones_map: map_system_to_zones,
- system_doas_flags: system_doas_flags)
- end
- # ecm_std.add_ecm_hs09_ccashpsys(model:model,system_zones_map:,system_doas_flags:,zone_clg_eqpt_type: nil,standard:,baseboard_flag: true)
+ ecm_std.send(ecm_add_method_name,
+ model: model,
+ system_zones_map: map_system_to_zones,
+ system_doas_flags: system_doas_flags,
+ ecm_system_zones_map_option: ecm_system_zones_map_option,
+ standard: template_standard,
+ heating_fuel: primary_heating_fuel)
end
def apply_system_efficiencies_ecm(model:, ecm_system_name: nil)
# Do nothing if nil.
return if ecm_system_name.nil? || ecm_system_name == 'none' || ecm_system_name == 'NECB_Default' || ecm_system_name.to_s.downcase == 'remove_airloops_add_zone_baseboards'