Module: BTAP::Resources::Schedules::StandardSchedules::ON_OFF

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

Class Method Summary collapse

Class Method Details

.always_off(model) ⇒ Object



231
232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/openstudio-standards/btap/schedules.rb', line 231

def self.always_off(model)
  on_off_always_off   = "ON_OFF_ALWAYS_OFF"
  schedule = model.getScheduleRulesetByName(on_off_always_off)
  if schedule.empty?
    #create Schedule
    return BTAP::Resources::Schedules::create_annual_constant_ruleset_schedule(
      model,
      on_off_always_off,
      "ON_OFF",
      0)
  else
    return schedule.get
  end
end

.always_on(model) ⇒ Object



245
246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/openstudio-standards/btap/schedules.rb', line 245

def self.always_on(model)
  on_off_always_on   = "ON_OFF_ALWAYS_ON"
  schedule = model.getScheduleRulesetByName(on_off_always_on)
  if schedule.empty?
    #create Schedule
    return BTAP::Resources::Schedules::create_annual_constant_ruleset_schedule(
      model,
      on_off_always_on,
      "ON_OFF",
      1)
  else
    return schedule.get
  end
end