Module: BTAP::Resources::Schedules::StandardScheduleTypeLimits

Defined in:
lib/openstudio-standards/btap/schedules.rb

Overview

End Test Schedules

Class Method Summary collapse

Class Method Details

.get_activity(model) ⇒ Object



174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/openstudio-standards/btap/schedules.rb', line 174

def self.get_activity(model)
  name = "ACTIVITY"
  temperature_schedule_type_limits = model.getScheduleTypeLimitsByName(name)
  if temperature_schedule_type_limits.empty?
    #temperature
    temperature_schedule_type_limits = OpenStudio::Model::ScheduleTypeLimits.new(model)
    temperature_schedule_type_limits.setName(name)
    temperature_schedule_type_limits.setNumericType("Continuous")
    temperature_schedule_type_limits.setUnitType("W/person")
    temperature_schedule_type_limits.setLowerLimitValue(70.0)
    temperature_schedule_type_limits.setUpperLimitValue(1000.0)
    return temperature_schedule_type_limits
  else
    return temperature_schedule_type_limits.get
  end
end

.get_fraction(model) ⇒ Object



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/openstudio-standards/btap/schedules.rb', line 126

def self.get_fraction(model)
  name = "FRACTION"
  fraction_schedule_type_limits = model.getScheduleTypeLimitsByName(name)
  if fraction_schedule_type_limits.empty?
    #fraction
    fraction_schedule_type_limits = OpenStudio::Model::ScheduleTypeLimits.new(model)
    fraction_schedule_type_limits.setName(name)
    fraction_schedule_type_limits.setNumericType("CONTINUOUS")
    fraction_schedule_type_limits.setUnitType("Dimensionless")
    fraction_schedule_type_limits.setLowerLimitValue(0.0)
    fraction_schedule_type_limits.setUpperLimitValue(1.0)
    return fraction_schedule_type_limits
  else
    return fraction_schedule_type_limits.get
  end
end

.get_on_off(model) ⇒ Object



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/openstudio-standards/btap/schedules.rb', line 143

def self.get_on_off(model)
  name = "ON_OFF"
  onoff_schedule_type_limits = model.getScheduleTypeLimitsByName(name)
  if onoff_schedule_type_limits.empty?
    #onoff
    onoff_schedule_type_limits = OpenStudio::Model::ScheduleTypeLimits.new(model)
    onoff_schedule_type_limits.setName(name)
    onoff_schedule_type_limits.setNumericType("DISCRETE")
    onoff_schedule_type_limits.setUnitType("Dimensionless")
    onoff_schedule_type_limits.setLowerLimitValue(0)
    onoff_schedule_type_limits.setUpperLimitValue(1)
    return onoff_schedule_type_limits
  else
    return onoff_schedule_type_limits.get
  end
end

.get_temperature(model) ⇒ Object



160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/openstudio-standards/btap/schedules.rb', line 160

def self.get_temperature(model)
  name = "TEMPERATURE"

  #temperature
  temperature_schedule_type_limits = OpenStudio::Model::ScheduleTypeLimits.new(model)
  temperature_schedule_type_limits.setName(name)
  temperature_schedule_type_limits.setNumericType("Continuous")
  temperature_schedule_type_limits.setUnitType("Temperature")
  #temperature_schedule_type_limits.setLowerLimitValue(-200.0)
  #temperature_schedule_type_limits.setUpperLimitValue(200.0)
  return temperature_schedule_type_limits

end