Class: Honeybee::SetpointThermostat
- Inherits:
-
ModelObject
- Object
- ModelObject
- Honeybee::SetpointThermostat
- Defined in:
- lib/honeybee/load/setpoint_thermostat.rb,
lib/to_openstudio/load/setpoint_thermostat.rb
Instance Attribute Summary
Attributes inherited from ModelObject
#errors, #openstudio_object, #warnings
Instance Method Summary collapse
Methods inherited from ModelObject
clean_identifier, clean_name, #find_existing_openstudio_object, #initialize, #method_missing, read_from_disk, truncate
Constructor Details
This class inherits a constructor from Honeybee::ModelObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Honeybee::ModelObject
Instance Method Details
#allowable_types ⇒ Object
37 38 39 |
# File 'lib/honeybee/load/setpoint_thermostat.rb', line 37 def allowable_types ['SetpointAbridged'] end |
#defaults ⇒ Object
41 42 43 |
# File 'lib/honeybee/load/setpoint_thermostat.rb', line 41 def defaults @@schema[:components][:schemas][:SetpointAbridged][:properties] end |
#to_openstudio(openstudio_model) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/to_openstudio/load/setpoint_thermostat.rb', line 39 def to_openstudio(openstudio_model) # create thermostat openstudio object os_thermostat = OpenStudio::Model::ThermostatSetpointDualSetpoint.new(openstudio_model) os_thermostat.setName(@hash[:identifier]) unless @hash[:display_name].nil? os_thermostat.setDisplayName(@hash[:display_name]) end # assign heating setpoint temperature schedule heat_sch = openstudio_model.getScheduleByName(@hash[:heating_schedule]) unless heat_sch.empty? heat_sch_object = heat_sch.get os_thermostat.setHeatingSetpointTemperatureSchedule(heat_sch_object) end # assign cooling setpoint schedule cool_sch = openstudio_model.getScheduleByName(@hash[:cooling_schedule]) unless cool_sch.empty? cool_sch_object = cool_sch.get os_thermostat.setCoolingSetpointTemperatureSchedule(cool_sch_object) end # assign the setpoint_cutout_difference unless @hash[:setpoint_cutout_difference].nil? os_thermostat.setTemperatureDifferenceBetweenCutoutAndSetpoint(@hash[:setpoint_cutout_difference]) end os_thermostat end |