Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

You can do this with the OpenStudio API. Make a schedule ruleset with a name (e.g. "My Schedule") and then run this script:

zones_to_change = ["Thermal Zone 1","Thermal Zone 2"]

#your new availability schedule
my_schedule = model.getScheduleByName("My Schedule").get 

#get thermal zones in the model
zones = model.getThermalZones 
zones.each do |zone|
  zone_name = zone.name.to_s
  if zones_to_change.include? zone_name
    #returns array of zone equipment
    zone_equipments = zone.equipment
    zone_equipments.each do |equip|
      #checks if the object is of this object type
      if !equip.to_AirTerminalSingleDuctVAVNoReheat.empty?
        air_terminal = equip.to_AirTerminalSingleDuctVAVNoReheat.get
        air_terminal.setAvailabilitySchedule(my_schedule)
      end
    end
  end
end