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

How can I retrieve schedule value after set it in an ems program (9.0.1) ?

asked 2019-02-22 10:22:11 -0600

updated 2019-02-23 11:06:00 -0600

I want set a schedule to 0 in january and then retrieve the schedule value specified in the schedule compact object for the others months. My problem is once the schedule value is set to 0 I am unable to retrieve the intial value for the other month. It always set to 0 for the others months.

-EMS AND SCHEDULE DETAILS:

RunPeriod,
,                              ! - Name
1,                             ! - Begin Month
1,                             ! - Begin Day of Month
2013,                          ! - Begin Year
3,                             ! - End Month
1,                             ! - End Day of Month
2013,                          ! - End Year
tuesday,                       ! - Day of Week for Start Day
yes,                           ! - Use Weather File Holidays and Special Days
yes,                           ! - Use Weather File Daylight Saving Period
no,                            ! - Apply Weekend Holiday Rule
yes,                           ! - Use Weather File Rain Indicators
yes;                           ! - Use Weather File Snow Indicators

Output:EnergyManagementSystem,
verbose,
verbose,
verbose;

ScheduleTypeLimits,
continuous;

Schedule:Compact,
externallight-sch-january,
continuous,
through: 12/31,
for: alldays,
until: 24:00,
.5;

Exterior:Lights,
externallight-january,         ! - Name
externallight-sch-january,     ! - Schedule Name
5250,                          ! - Design Level {W}
schedulenameonly,              ! - Control Option
Grounds Lights;                ! - End-Use Subcategory

Schedule:Compact,
externallight-sch-othermonth,
continuous,
through: 12/31,
for: alldays,
until: 24:00,
1;

Exterior:Lights,
externallight-othermonth,      ! - Name
externallight-sch-othermonth,  ! - Schedule Name
5250,                          ! - Design Level {W}
schedulenameonly,              ! - Control Option
Grounds Lights;                ! - End-Use Subcategory

Output:Variable,
*,                             ! - Key Value
Exterior Lights Electric Power,! - Variable Name
hourly;                        ! - Reporting Frequency

Output:Variable,
*,                             ! - Key Value
Site Outdoor Air Drybulb Temperature,    ! - Variable Name
hourly;                        ! - Reporting Frequency

EnergyManagementSystem:Actuator,
externallightschjanuary,
externallight-sch-january,
schedule:compact,
schedule value;

EnergyManagementSystem:Actuator,
externallightschothermonth,
externallight-sch-othermonth,
schedule:compact,
schedule value;

EnergyManagementSystem:Program,
month_schedule_management_program,
if (month == 1),
set externallightschothermonth = 0,
else,
set externallightschjanuary = 0,
endif;

EnergyManagementSystem:ProgramCallingManager,
month_schedule_management_pcm,
begintimestepbeforepredictor,  ! - EnergyPlus Model Calling Point
month_schedule_management_program;    ! - Program Name 1
edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
2

answered 2019-02-25 02:38:53 -0600

updated 2019-03-26 03:53:58 -0600

I found a way to solve it. The problem was the use of EnergyManagementSystem:Actuator instead of Sensor. An actuator value cannot be setted. So, here is my solution:

  1. Declare used schedule without linking them to an object.
  2. Create an "shadow" schedule and link it to the object (here "Exterior:Lights")
  3. Create EMS program using: 3.a. Actuator for "shadow" schedule 3.b. Sensor for used schedule
edit flag offensive delete link more
1

answered 2019-02-22 19:17:33 -0600

Set up an EMS output variable for the schedule(s) in question. Then report both the original schedule value and the EMS adjsuted value to hep diagnose what is happening.

EnergyManagementSystem:OutputVariable,
  MyJanSchValue,           !- Name
  externallightschjanuary,             !- EMS Variable Name
  Averaged,                !- Type of Data in Variable
  ZoneTimeStep,            !- Update Frequency
  ,                        !- EMS Program or Subroutine Name
  ;                        !- Units

Output:Variable,*,MyJanSchValue,Hourly;
Output:Variable,externallight-sch-january,Schedule Value,Hourly;

I hope I have presented this correctly. See EMSCurveOverride_PackagedTerminalHeatPump.idf example file for more information on reporting of EMS variables.

edit flag offensive delete link more

Comments

Thanks for your help.

Lefort-Antoine's avatar Lefort-Antoine  ( 2019-02-25 02:39:12 -0600 )edit
0

answered 2019-03-27 10:15:11 -0600

mldichter's avatar

There is a special value for this call Null. Below is an excerpt from this page.

EMS Actuators

This section provides details about EMS actuators, the conduits by which Erl programs control EnergyPlus simulations. They actuate selected features inside EnergyPlus. Rather than add a new set of controls and component models that have EMS awareness, they generally override established features.

Internal to EnergyPlus are two separate lists of actuators: those that are available for use, and those that are being used in the EMS. While implementing the EMS, developers have added code to control points to make them available for use in EMS. The actuators available in a given model depend on the non-EMS-related content of the input file. Similar to how EnergyPlus reports the available output variables to the RDD file, a list of available actuators is written to the EDD file (depending on the settings in Output:EnergyManagementSystem). Note that the EDD file is ONLY produced if you have set up EMS / Erl programs. To use an actuator in EMS, you need to enter an EnergyManagementSystem:Actuator input object. The EDD file contains information needed for this input object; however, it is not available until after the output has been generated from a previous run. If you do not see a particular actuator in the EDD output file, it is not available in EMS for that particular model. There is no way to create a new actuator (except by modifying EnergyPlus source code); you can only customize the behavior of current actuators. If you need an actuator that you suspect could be provided by the program but is not available, you can use the regular system(s) for user support to request it be added to the program. New actuators are added to the program from time to time so the availability of actuators will grow with each new release.

Actuators override things inside EnergyPlus whenever the actuator’s Erl variable is set to a value other than “Null.” Null is a special built-in variable used to deactivate an actuator. Once an actuator starts overriding, it will continue to do so until the actuator’s Erl variable is set to Null. You should set the actuators to Null whenever you want the EMS to revert to normal operation.

The rest of this section provides details about specific actuators.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

2 followers

Stats

Asked: 2019-02-22 10:22:11 -0600

Seen: 508 times

Last updated: Mar 27 '19