Class: BuildingSync::LightingSystemType
- Inherits:
-
Object
- Object
- BuildingSync::LightingSystemType
- Defined in:
- lib/buildingsync/model_articulation/lighting_system.rb
Overview
LightingSystemType class
Instance Method Summary collapse
-
#add_daylighting_controls(model, standard, template, main_output_dir) ⇒ Object
add daylighting controls.
-
#add_exterior_lights(model, standard, onsite_parking_fraction, exterior_lighting_zone, remove_objects) ⇒ Object
add exterior lights.
-
#initialize(base_xml, ns) ⇒ LightingSystemType
constructor
initialize.
-
#read_xml ⇒ Object
read.
Methods included from XmlGetSet
#get_prefix, #xget_attribute_for_element, #xget_element, #xget_id, #xget_idrefs, #xget_linked_premises, #xget_name, #xget_or_create, #xget_plurals_text_value, #xget_text, #xget_text_as_bool, #xget_text_as_date, #xget_text_as_dt, #xget_text_as_float, #xget_text_as_integer, #xset_or_create, #xset_text
Methods included from Helper
#help_calculate_hours, #help_convert, #help_count_number_of_days, #help_element_class_type_check, #help_get_attribute_value, #help_get_default_schedule_set, #help_get_duration, #help_get_end_time, #help_get_end_time_sat, #help_get_end_time_sun, #help_get_end_time_weekday, #help_get_or_create, #help_get_schedule_rule_set_from_schedule, #help_get_start_time, #help_get_start_time_sat, #help_get_start_time_sun, #help_get_start_time_weekday, #help_get_text_value, #help_get_text_value_as_bool, #help_get_text_value_as_date, #help_get_text_value_as_datetime, #help_get_text_value_as_float, #help_get_text_value_as_integer, #help_get_zone_name_list, #help_load_doc, #help_print_all_schedules, #help_print_schedule, #help_write_profile
Constructor Details
#initialize(base_xml, ns) ⇒ LightingSystemType
initialize
50 51 52 53 54 55 56 57 |
# File 'lib/buildingsync/model_articulation/lighting_system.rb', line 50 def initialize(base_xml, ns) @base_xml = base_xml @ns = ns help_element_class_type_check(@base_xml, 'LightingSystem') read_xml end |
Instance Method Details
#add_daylighting_controls(model, standard, template, main_output_dir) ⇒ Object
add daylighting controls
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/buildingsync/model_articulation/lighting_system.rb', line 91 def add_daylighting_controls(model, standard, template, main_output_dir) # add daylight controls, need to perform a sizing run for 2010 if template == '90.1-2010' if standard.model_run_sizing_run(model, "#{main_output_dir}/SRvt") == false return false end end standard.model_add_daylighting_controls(model) return true end |
#add_exterior_lights(model, standard, onsite_parking_fraction, exterior_lighting_zone, remove_objects) ⇒ Object
add exterior lights
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/buildingsync/model_articulation/lighting_system.rb', line 69 def add_exterior_lights(model, standard, onsite_parking_fraction, exterior_lighting_zone, remove_objects) if remove_objects model.getExteriorLightss.each do |ext_light| next if ext_light.name.to_s.include?('Fuel equipment') # some prototype building types model exterior elevators by this name ext_light.remove end end exterior_lights = standard.model_add_typical_exterior_lights(model, exterior_lighting_zone.chars[0].to_i, onsite_parking_fraction) exterior_lights.each do |k, v| OpenStudio.logFree(OpenStudio::Info, 'BuildingSync.LightingSystem.add_exterior_lights', "Adding Exterior Lights named #{v.exteriorLightsDefinition.name} with design level of #{v.exteriorLightsDefinition.designLevel} * #{OpenStudio.toNeatString(v.multiplier, 0, true)}.") end return true end |
#read_xml ⇒ Object
read
60 |
# File 'lib/buildingsync/model_articulation/lighting_system.rb', line 60 def read_xml; end |