EMS - load existing schedule value each timestep

asked 2019-11-08 08:17:10 -0600

I'm trying to write an EMS program that will apply a Gaussian multiplier to the occupancy value of each space at each timestep (using the EMS editor in DesignBuilder). To do this, I need the Schedule:Value for the occupancy schedule of each zone. However, in the idf, the Schedule Name is associated with the zone, and the schedule values are associated with the schedule name, so the schedule values are not a direct property of the zone. Therefore, the Sensor object will not return a schedule value when I loop over zones.

How do loop over all zones and access the occupancy Schedule Value for each zone? The code below does not run, but I thought it was the best illustration of what I was trying to accomplish. Thanks for your help.

<foralloccupiedzones> EnergyManagementSystem:Sensor, Schedule_Value, Number of People SCHEDULE Name <loopzoneidfname>, Schedule Value; <loopnextzone>

<foralloccupiedzones> EnergyManagementSystem:Actuator, Number_of_People_<loopzonevariablename>, PEOPLE <loopzoneidfname>, People, Number of People; <loopnextzone>

<foralloccupiedzones> EnergyManagementSystem:InternalVariable, People_Count_Design_Level_<loopzonevariablename>, PEOPLE <loopzoneidfname>, People Count Design Level; <loopnextzone>

EnergyManagementSystem:ProgramCallingManager, Occupancy Factor, BeginTimestepBeforePredictor, OccFactor;

EnergyManagementSystem:Program, OccFactor, <foralloccupiedzones> Set Number_of_People_<loopzonevariablename> = Schedule_ValuePeople_Count_Design_Level_<loopzonevariablename>, Set fac = @RandomNormal 1 0.2 0.5 1.5, Set Number_of_People_<loopzonevariablename> = facNumber_of_People_<loopzonevariablename>, <loopnextzone> ! add program code ;

edit retag flag offensive close merge delete