Hi all!
I am writing to you to understand why the EMS routine I have implemented in the model doesn’t give output values.
I've created all the sensors, then the actuators.
In the program section I've added the routine and in the global variable I've put variables coming from the routine.
In Output:variable I've created a variable with the schedule of the routine, but after that analysis ends in the excel file in the column of the schedule result are 0.
The EMS code is the following:
!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:SENSOR ===========
EnergyManagementSystem:Sensor,
Tout, !- Name
Environment, !- Output:Variable or Output:Meter Index Key Name
Site Outdoor Air Drybulb Temperature; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
RHout, !- Name
Environment, !- Output:Variable or Output:Meter Index Key Name
Site Outdoor Air Relative Humidity; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
WS, !- Name
Environment, !- Output:Variable or Output:Meter Index Key Name
Site Wind Speed; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
Rain, !- Name
Environment, !- Output:Variable or Output:Meter Index Key Name
Site Rain Status; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
Tin_KXS1, !- Name
PianoSecondo:KXS1, !- Output:Variable or Output:Meter Index Key Name
Zone Mean Air Temperature; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
RHin_KXS1, !- Name
PianoSecondo:KXS1, !- Output:Variable or Output:Meter Index Key Name
Zone Air Relative Humidity; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
OCC_KXS1, !- Name
PianoSecondo:KXS1, !- Output:Variable or Output:Meter Index Key Name
Zone People Occupant Count; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
Tin_LM1, !- Name
PianoSecondo:LM1, !- Output:Variable or Output:Meter Index Key Name
Zone Mean Air Temperature; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
RHin_LM1, !- Name
PianoSecondo:LM1, !- Output:Variable or Output:Meter Index Key Name
Zone Air Relative Humidity; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
OCC_LM1, !- Name
PianoSecondo:LM1, !- Output:Variable or Output:Meter Index Key Name
Zone People Occupant Count; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
Tin_LS1, !- Name
PianoSecondo:LS1, !- Output:Variable or Output:Meter Index Key Name
Zone Mean Air Temperature; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
RH_LS1, !- Name
PianoSecondo:LS1, !- Output:Variable or Output:Meter Index Key Name
Zone Air Relative Humidity; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
OCC_LS1, !- Name
PianoSecondo:LS1, !- Output:Variable or Output:Meter Index Key Name
Zone People Occupant Count; !- Output:Variable or Output:Meter Name
!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:ACTUATOR ===========
EnergyManagementSystem:Actuator,
Window1_S1_act, !- Name
BLDG_KXS1_WINDOW1_Jones_2017_SCH, !- Actuated Component Unique Name
Schedule:Compact, !- Actuated Component Type
Schedule Value; !- Actuated Component Control Type
EnergyManagementSystem:Actuator,
Window2_S1_act, !- Name
BLDG_KXS1_WINDOW2_Jones_2017_SCH, !- Actuated Component Unique Name
Schedule:Compact, !- Actuated Component Type
Schedule Value; !- Actuated Component Control Type
EnergyManagementSystem:Actuator,
Window_LM1_act, !- Name
BLDG_LM1_WINDOW_Jones_2017_SCH, !- Actuated Component Unique Name
Schedule:Compact, !- Actuated Component Type
Schedule Value; !- Actuated Component Control Type
EnergyManagementSystem:Actuator,
Window_LS1_act, !- Name
BLDG_LS1_WINDOW_Jones_2017_SCH, !- Actuated Component Unique Name
Schedule:Compact, !- Actuated Component Type
Schedule Value; !- Actuated Component Control Type
!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAM ===========
EnergyManagementSystem:Program,
Variable, !- Name
set A1=-9.275, !- Program Line 1
set A2=-2.984, !- Program Line 2
set B1=0.233, !- A4
set B2=0.038, !- A5
set B3=-0.105, !- A6
set B4=-0.042, !- A7
set B5=0-057, !- A8
set B6=0.034, !- A9
set B7=-0.178, !- A10
set B8=-0.017, !- A11
set B9=0.062, !- A12
set B10=0.063, !- A13
set B11=0.032; !- A14
EnergyManagementSystem:Program,
Window_Jones_2017, !- Name
set Wind_Cur_State=Window1_S1_act, !- Program Line 1
if Wind_Cur_State == 0, !- Program Line 2
if OCC_KXS1>0, !- A4
set handle=A1+B1*Tin_KXS1+B2*RHin_KXS1-B3*Tout-B4*RHout+B5*WS+B6*Rain, !- A5
set handle=@Exp handle, !- A6
set handle=handle/(handle+1), !- A7
set R=@RandomUniform 0 1,!- A8
if handle>R, !- A9
set Window1_KXS1_act=1, !- A10
endif, !- A11
else, !- A12
set Window1_KXS1_act=0, !- A13
endif, !- A14
endif, !- A15
if Wind_Cur_State == 1, !- A16
if OCC_KXS1>0, !- A17
set handle=A2+B7*Tin_KXS1+B8*RHin_KXS1+B9*Tout+B10*WS+B11*Rain, !- A18
set handle=@Exp handle, !- A19
set handle=handle/(handle+1), !- A20
set R=@RandomUniform 0 1,!- A21
if handle>R, !- A22
set Window1_KXS1_act=0, !- A23
endif, !- A24
else, !- A25
set Window1_KXS1_act=0, !- A26
endif, !- A27
endif; !- A28
!- =========== ALL OBJECTS IN CLASS: OUTPUT:VARIABLE ===========
Output:Variable,
SecondFloor:KXS1, !- Key Value
Zone Mean Air Temperature, !- Variable Name
Hourly; !- Reporting Frequency
Output:Variable,
BLDG_KXS1_WINDOW1_Jones_2017_SCH, !- Key Value
Schedule Value, !- Variable Name
Hourly; !- Reporting Frequency
Output:Variable,
SecondFloor:KXS1, !- Key Value
Zone Air Relative Humidity, !- Variable Name
Hourly; !- Reporting Frequency
Output:Variable,
SecondFloor:KXS1, !- Key Value
Zone People Occupant Count, !- Variable Name
Hourly; !- Reporting Frequency
Output:Variable,
Environment, !- Key Value
Site Outdoor Air Drybulb Temperature, !- Variable Name
Hourly; !- Reporting Frequency
Output:Variable,
Environment, !- Key Value
Site Outdoor Air Relative Humidity, !- Variable Name
Hourly; !- Reporting Frequency
Output:Variable,
Environment, !- Key Value
Site Wind Speed, !- Variable Name
Hourly; !- Reporting Frequency
Output:Variable,
Environment, !- Key Value
Site Rain Status, !- Variable Name
Hourly; !- Reporting Frequency
Output:Variable,
Occupancy KXS1_People, !- Key Value
Schedule Value, !- Variable Name
Hourly; !- Reporting Frequency
Output:Variable,
PianoSecondo:KXS1, !- Key Value
Zone Operative Temperature, !- Variable Name
Hourly; !- Reporting Frequency