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

Revision history [back]

Since the EMS Program is only setting the MyOpenFactor actuator to 0, 1, or a fraction depending upon the zone air relative humidity (RH), it is essentially overriding the normal approach of following VentingSched. In other words, VentingSched can be changed to always 1 or always 0, but it wouldn't matter because the EMS Program is only overriding opening factor based on RH. That was the point of the example file -- to show how to override something (window opening factor, in this case) based on a parameter that isn't a time-based schedule (zone air RH, in this case).

If you want to use this example file to control window openings according to a combination of zone air RH and schedule values, you would need to add a second EMS Sensor object to measure the Schedule Value of VentingSched, then expand the existing IF and ELSEIF lines in the EMS Program to examine the new schedule value EMS Sensor along with the existing zone air RH EMS Sensor. An example would be setting the opening factor to 0 if RH < 25 or if VentingSched was equal to 0:

EnergyManagementSystem:Sensor, 
  VentSchedSensor, !- Name 
  VentingSched, !- Output:Variable or Output:Meter Index Key Name
  Schedule Value; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Program, 
  RH_OpeningController, !- Name 
  IF (ZoneRH < 25) || (VentSchedSensor == 0), !- Program Line 1 
    SET MyOpenFactor = 0.0, !- Program Line 2
  ELSEIF ZoneRH > 60, !- 
    SET MyOpenFactor = 1.0, !- 
  ELSE, !- 
    SET MyOpenFactor = (ZoneRH - 25) / (60 - 25), !- 
  ENDIF; !-

If you want to have cases where zone air RH values indicate that the EMS Program should NOT override the window opening factor, and follow VentingSched as EnergyPlus normally would without EMS, then you would need to set the MyOpenFactor actuator to "NULL".