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 -0500

Lefort-Antoine gravatar image

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

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

2 Answers

Sort by ยป oldest newest most voted
1

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

Lefort-Antoine gravatar image

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

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 -0500

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 gravatar imageLefort-Antoine ( 2019-02-25 02:39:12 -0500 )edit

Your Answer

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

Add Answer

 

Question Tools

1 follower

Stats

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

Seen: 43 times

Last updated: 6 hours ago