Module: BTAP::Resources::Schedules::StandardSchedules::Fraction

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

Class Method Summary collapse

Class Method Details

.always_off(model) ⇒ Object



200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/openstudio-standards/btap/schedules.rb', line 200

def self.always_off(model)
  fraction_always_off_name = "FRACTION_ALWAYS_OFF"
  schedule = model.getScheduleRulesetByName(fraction_always_off_name)
  if schedule.empty?
    #create Schedule
    return BTAP::Resources::Schedules::create_annual_constant_ruleset_schedule(
      fraction_always_off_name,
      "FRACTION",
      0.0)
  else
    return schedule.get
  end
end

.always_on(model) ⇒ Object



213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/openstudio-standards/btap/schedules.rb', line 213

def self.always_on(model)
  fraction_always_on_name  = "FRACTION_ALWAYS_ON"
  schedule = model.getScheduleRulesetByName(fraction_always_on_name)
  if schedule.empty?
    #create Schedule
    return BTAP::Resources::Schedules::create_annual_constant_ruleset_schedule(
      model,
      fraction_always_on_name,
      "FRACTION",
      1.0)
  else
    return schedule.get
  end
end