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

Revision history [back]

EMS-Failure to overwrite schedule

Dear Community,

I am trying to simulate a non conventional adaptive facade that controlled by Air temperature. Since the shape is quite complex, I used the transparency schedule of the shadings. I used EMS to create sensor to get the temperature, and actuator to overwrite the schedule that control the shading. I also set the EMS-computed schedule to track the result. For this stage, I used 0 as the value for the initial schedule, and 1 as the value for the overwrite schedule to easily see the difference if I run the simulation with or without the EMS.

Based on the EDD file and SQL file, the sensor and actuator was executed and the result was as expected. But, strangely, the resulted Annual Load was similar with simulation or without EMS. If I change the transparency value in the initial schedule, the result changes. But if I change the transparency value for the overwrite schedule, it did not change the annual load result, even through the actuator variables did change.

Is there any suggestion why the EMS generated schedule did not able to overwrite the shading schedule? Is it due to the naming or the number for variables that I use?

here I attach some part of my Shading, Output, and EMS script.

Schedule

Schedule:Constant,
SSPAS_19410e72,          !- Name
On/Off,                  !- Schedule Type Limits Name
0;                       !- Hourly Value

Schedule:Constant,
SSPAS_1f9b3ab7,          !- Name
On/Off,                  !- Schedule Type Limits Name
0;                       !- Hourly Value

Schedule:Constant,
SSPAS_2606966f,          !- Name
On/Off,                  !- Schedule Type Limits Name
0;                       !- Hourly Value

Repeat up to 32 schedule

Sensor

EnergyManagementSystem:Sensor,
S1,                      !- Name
Room_2_f7e61e7c,         !- Output:Variable or Output:Meter Index Key Name
Zone Mean Air Temperature ;  !- Output:Variable or Output:Meter Name

Actuator

EnergyManagementSystem:Actuator,
myA15,                   !- Name
SSPAS_19410e72,          !- Actuated Component Unique Name
Schedule:Constant,       !- Actuated Component Type
Schedule Value;          !- Actuated Component Control Type

EnergyManagementSystem:Actuator,
myA20,                   !- Name
SSPAS_1f9b3ab7,          !- Actuated Component Unique Name
Schedule:Constant,       !- Actuated Component Type
Schedule Value;          !- Actuated Component Control Type

EnergyManagementSystem:Actuator,
myA5,                    !- Name
SSPAS_2606966f,          !- Actuated Component Unique Name
Schedule:Constant,       !- Actuated Component Type
Schedule Value;          !- Actuated Component Control Type

continue until 32 actuator

EnergyManagementSystem:ProgramCallingManager,
MyComputedTransProg,     !- Name
BeginTimestepBeforePredictor,  !- EnergyPlus Model Calling Point
MyComputedTransSch;      !- Program Name 1

EnergyManagementSystem:Program,
MyComputedTransSch,      !- Name
Set ZoneAirTemp = S1,    !- Program Line 1
IF ZoneAirTemp < 23.5,   !- Program Line 2
SET myA0 = 1,            !- A4
SET myA1 = 1,            !- A5
SET myA2 = 1,            !- A6
SET myA3 = 1,            !- A7
SET myA4 = 1,            !- A8
SET myA5 = 1,            !- A9
SET myA6 = 1,            !- A10
SET myA7 = 1,            !- A11
SET myA8 = 1,            !- A12
SET myA9 = 1,            !- A13
SET myA10 = 1,           !- A14
SET myA11 = 1,           !- A15
SET myA12 = 1,           !- A16
SET myA13 = 1,           !- A17
SET myA14 = 1,           !- A18
SET myA15 = 1,           !- A19
SET myA16 = 1,           !- A20
SET myA17 = 1,           !- A21
SET myA18 = 1,           !- A22
SET myA19 = 1,           !- A23
SET myA20 = 1,           !- A24
SET myA21 = 1,           !- A25
SET myA22 = 1,           !- A26
SET myA23 = 1,           !- A27
SET myA24 = 1,           !- A28
SET myA25 = 1,           !- A29
SET myA26 = 1,           !- A30
SET myA27 = 1,           !- A31
SET myA28 = 1,           !- A32
SET myA29 = 1,           !- A33
SET myA30 = 1,           !- A34
SET myA31 = 1,           !- A35
SET ShadingDomain = 0,   !- A36
ELSE,                    !- A37
SET myA0 = 1,            !- A38
SET myA1 = 1,            !- A39
SET myA2 = 1,            !- A40
SET myA3 = 1,            !- A41
SET myA4 = 1,            !- A42
SET myA5 = 1,            !- A43
SET myA6 = 1,            !- A44
SET myA7 = 1,            !- A45
SET myA8 = 1,            !- A46
SET myA9 = 1,            !- A47
SET myA10 = 1,           !- A48
SET myA11 = 1,           !- A49
SET myA12 = 1,           !- A50
SET myA13 = 1,           !- A51
SET myA14 = 1,           !- A52
SET myA15 = 1,           !- A53
SET myA16 = 1,           !- A54
SET myA17 = 1,           !- A55
SET myA18 = 1,           !- A56
SET myA19 = 1,           !- A57
SET myA20 = 1,           !- A58
SET myA21 = 1,           !- A59
SET myA22 = 1,           !- A60
SET myA23 = 1,           !- A61
SET myA24 = 1,           !- A62
SET myA25 = 1,           !- A63
SET myA26 = 1,           !- A64
SET myA27 = 1,           !- A65
SET myA28 = 1,           !- A66
SET myA29 = 1,           !- A67
SET myA30 = 1,           !- A68
SET myA31 = 1,           !- A69
SET ShadingDomain = -1,  !- A70
ENDIF;                   !- A71

EnergyManagementSystem:GlobalVariable,
ShadingDomain;           !- Erl Variable 1 Name

EMS output variables

EnergyManagementSystem:OutputVariable,
Weighted Shading Domain, !- Name
ShadingDomain,           !- EMS Variable Name
Averaged,                !- Type of Data in Variable
SystemTimestep;          !- Update Frequency

EnergyManagementSystem:OutputVariable,
Fin0,                    !- Name
myA0,                    !- EMS Variable Name
Averaged,                !- Type of Data in Variable
SystemTimestep;          !- Update Frequency

EnergyManagementSystem:OutputVariable,
Fin1,                    !- Name
myA1,                    !- EMS Variable Name
Averaged,                !- Type of Data in Variable
SystemTimestep;          !- Update Frequency

Continue until all of 32 variables.