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

Revision history [back]

I would suggest updating the model calling point in your EMS Program Calling Manager. From the EMS Application Guide:

"Another thing that happens during the setup phase described above is that individual HVAC component models access their input data and do various setup calculations in preparation for the rest of the simulation. An EMS calling point (added for Version 7) called “AfterComponentInputReadIn” is available for selected HVAC components that allows triggering Erl programs at a point just after the component’s input data have been read in but before the component’s sizing routines have executed. This calling point is intended to be used with various actuators that are setup to override the autosize values that result from sizing."

Since you want to set the plant load profile load each hour during the design day, it sounds like you should instead use one of the calling points that occur each timestep. AfterPredictorAfterHVACManagers and InsideHVACSystemIterationLoop sound like your best options.

You can also make your EMS program more computationally efficient by using nested IF statements and <> logic operators checking CurrentTime values, like so.

EnergyManagementSystem:Program,
  EMS_Program_Pool_Load_Schedule_Override,  !- Name
  IF CurrentEnvironment == 1,                           !- Winter Design Day
    IF CurrentTime < 6,                                      !- midnight until 5 AM
      SET Swimming_Pool_Load_Schedule_Override = 0,  !- no plant load
    ELSEIF CurrentTime == 6,                             !- 5-6 AM
      SET Swimming_Pool_Load_Schedule_Override = 376992.2,  !- plant load = 376992.2 W
  ...
  ELSE,               !- Could replace with ELSEIF CurrentEnvironment == 2 for summer design day
    SET Swimming_Pool_Load_Schedule_Override = NULL,  ! reset actuator to use Schedule:File
  END;

I would suggest updating the model calling point in your EMS Program Calling Manager. From the EMS Application Guide:

"Another thing that happens during the setup phase described above is that individual HVAC component models access their input data and do various setup calculations in preparation for the rest of the simulation. An EMS calling point (added for Version 7) called “AfterComponentInputReadIn” is available for selected HVAC components that allows triggering Erl programs at a point just after the component’s input data have been read in but before the component’s sizing routines have executed. This calling point is intended to be used with various actuators that are setup to override the autosize values that result from sizing."

Since you want to set the plant load profile load each hour during the design day, it sounds like you should instead use one of the calling points that occur each timestep. AfterPredictorAfterHVACManagers and InsideHVACSystemIterationLoop sound like your best options.

You can also make your EMS program more computationally efficient by using nested IF statements and <> logic operators checking CurrentTime values, like so.

EnergyManagementSystem:Program,
  EMS_Program_Pool_Load_Schedule_Override,  !- Name
  IF CurrentEnvironment == 1,                           !- Winter Design Day
    IF CurrentTime < 6,                                      !- midnight until 5 AM
      SET Swimming_Pool_Load_Schedule_Override = 0,  !- no plant load
    ELSEIF CurrentTime == 6,                             !- 5-6 AM
      SET Swimming_Pool_Load_Schedule_Override = 376992.2,  !- plant load = 376992.2 W
  ...
  ELSE,               !- Could replace with ELSEIF CurrentEnvironment == 2 for summer design day
    SET Swimming_Pool_Load_Schedule_Override = NULL,  ! reset actuator to use Schedule:File
  END;

UPDATE

After running your IDF with two design days (one for heating, one for cooling) to look into the design day results, I also see duplicate ESO results for design days (see below).

image description

The first two days are the heating design day (21 Jan) repeated, and the last two days are the cooling design day (21 July) repeated. So, you actually have 4 days of design days + 365 days of run period.

Here is your SimulationControl object:

SimulationControl,
  Yes,                     !- Do Zone Sizing Calculation
  Yes,                     !- Do System Sizing Calculation
  Yes,                     !- Do Plant Sizing Calculation
  No,                      !- Run Simulation for Sizing Periods
  Yes,                     !- Run Simulation for Weather File Run Periods
  Yes,                     !- Do HVAC Sizing Simulation for Sizing Periods
  1;                       !- Maximum Number of HVAC Sizing Simulation Passes

I believe that the Do HVAC Sizing Simulation for Sizing Periods input field (second to last) set to "Yes" is causing the design days to be part of the CSV file. After changing this to "No", the design days no longer appear in the CSV file. However, even if you set this to "No", then swap the Yes/No settings for the Run Simulation for Sizing Periods and Run Simulation for Weather File Run Periods input fields in order to only run design days and skip the run period, there are still duplicate rows (4 total days of data).

This may be a bug to report to EnergyPlus developers.