First time here? Check out the Help page!
1 | initial version |
I was able to solve this. The key was using the <loopzoneattribute occupancyschedule=""> as the sensor Object IDF name. This caused DesignBuilder to look up the occupancy schedule for each zone. My final working code is below, which randomizes both the occupancy and the internal equipment power level.
<foralloccupiedzones> EnergyManagementSystem:Sensor, Schedule_Value_Occ_<loopzonevariablename>, <loopzoneattribute occupancyschedule="">, Schedule Value; Output:Variable, <loopzoneattribute occupancyschedule="">, Schedule Value, Hourly; Output:Variable, <loopzoneattribute occupancyschedule="">, Schedule Value, Daily; <loopnextzone>
<foralloccupiedzones> EnergyManagementSystem:Sensor, Schedule_Value_Eq_<loopzonevariablename>, <loopzoneattribute equipmentschedule="">, Schedule Value; <loopnextzone>
<foralloccupiedzones> EnergyManagementSystem:Actuator, Number_of_People_<loopzonevariablename>, PEOPLE <loopzoneidfname>, People, Number of People; <loopnextzone>
<foralloccupiedzones> EnergyManagementSystem:Actuator, Power_Level_<loopzonevariablename>, <loopzoneidfname> EQUIPMENT GAIN 1, OtherEquipment, Power Level; <loopnextzone>
<foralloccupiedzones> EnergyManagementSystem:InternalVariable, People_Count_Design_Level_<loopzonevariablename>, PEOPLE <loopzoneidfname>, People Count Design Level; Output:Variable, PEOPLE <loopzoneidfname>, People Count Design Level, Hourly; <loopnextzone>
<foralloccupiedzones> EnergyManagementSystem:InternalVariable, Other_Equipment_Design_Level_<loopzonevariablename>, <loopzoneidfname> Equipment gain 1, Other Equipment Design Level; <loopnextzone>
<foralloccupiedzones> EnergyManagementSystem:Sensor, People_Occupant_Count_<loopzonevariablename>, PEOPLE <loopzoneidfname>, People Occupant Count; Output:Variable, PEOPLE <loopzoneidfname>, People Occupant Count, Hourly; <loopnextzone>
EnergyManagementSystem:ProgramCallingManager, Occupancy Factor, AfterPredictorBeforeHVACManagers, OccFactor;
EnergyManagementSystem:Program, OccFactor, <foralloccupiedzones> SET fac = @RandomNormal 1 0.2 0.5 1.5, ! Mean SD LowerLimit UpperLimit SET Number_of_People_<loopzonevariablename> = facSchedule_Value_Occ_<loopzonevariablename>People_Count_Design_Level_<loopzonevariablename>, SET fac2 = @RandomNormal 1 0.2 0.5 1.5, ! Mean SD LowerLimit UpperLimit SET Power_Level_<loopzonevariablename> = fac2Schedule_Value_Eq_<loopzonevariablename>Other_Equipment_Design_Level_<loopzonevariablename>,
<loopnextzone> ! add program code ;
2 | No.2 Revision |
I was able to solve this. The key was using the <loopzoneattribute occupancyschedule=""> as the sensor Object IDF name. This caused DesignBuilder to look up the occupancy schedule for each zone. My final working code is below, which randomizes both the occupancy and the internal equipment power level.
<foralloccupiedzones>
<ForAllOccupiedZones>
EnergyManagementSystem:Sensor,
<foralloccupiedzones>
<foralloccupiedzones>
<foralloccupiedzones>
<foralloccupiedzones>
<foralloccupiedzones>
<foralloccupiedzones>
<loopnextzone>
3 | No.3 Revision |
I was able to solve this. The key was using the <loopzoneattribute occupancyschedule=""> as the sensor Object IDF name. This caused DesignBuilder to look up the occupancy schedule for each zone. My final working code is below, which randomizes both the occupancy and the internal equipment power level.
<ForAllOccupiedZones>
EnergyManagementSystem:Sensor,
Schedule_Value_Occ_<LoopZoneVariableName>,
<LoopZoneAttribute OccupancySchedule>,
Schedule Value;
Output:Variable, <LoopZoneAttribute OccupancySchedule>, Schedule Value, Hourly;
Output:Variable, <LoopZoneAttribute OccupancySchedule>, Schedule Value, Daily;
<LoopNextZone>
<ForAllOccupiedZones>
EnergyManagementSystem:Sensor,
Schedule_Value_Eq_<LoopZoneVariableName>,
<LoopZoneAttribute EquipmentSchedule>,
Schedule Value;
<LoopNextZone>
<ForAllOccupiedZones>
EnergyManagementSystem:Actuator,
Number_of_People_<LoopZoneVariableName>,
PEOPLE <LoopZoneIDFName>,
People,
Number of People;
<LoopNextZone>
<ForAllOccupiedZones>
EnergyManagementSystem:Actuator,
Power_Level_<LoopZoneVariableName>,
<LoopZoneIDFName> EQUIPMENT GAIN 1,
OtherEquipment,
Power Level;
<LoopNextZone>
<ForAllOccupiedZones>
EnergyManagementSystem:InternalVariable,
People_Count_Design_Level_<LoopZoneVariableName>,
PEOPLE <LoopZoneIDFName>,
People Count Design Level;
Output:Variable, PEOPLE <LoopZoneIDFName>, People Count Design Level, Hourly;
<LoopNextZone>
<ForAllOccupiedZones>
EnergyManagementSystem:InternalVariable,
Other_Equipment_Design_Level_<LoopZoneVariableName>,
<LoopZoneIDFName> Equipment gain 1,
Other Equipment Design Level;
<LoopNextZone>
<ForAllOccupiedZones>
EnergyManagementSystem:Sensor,
People_Occupant_Count_<LoopZoneVariableName>,
PEOPLE <LoopZoneIDFName>,
People Occupant Count;
Output:Variable, PEOPLE <LoopZoneIDFName>, People Occupant Count, Hourly;
<LoopNextZone>
EnergyManagementSystem:ProgramCallingManager,
Occupancy Factor,
AfterPredictorBeforeHVACManagers,
OccFactor;
EnergyManagementSystem:Program,
OccFactor,
<ForAllOccupiedZones>
SET fac = @RandomNormal 1 0.2 0.5 1.5, ! Mean SD LowerLimit UpperLimit
SET Number_of_People_<LoopZoneVariableName> = fac*Schedule_Value_Occ_<LoopZoneVariableName>*People_Count_Design_Level_<LoopZoneVariableName>,
SET fac2 = @RandomNormal 1 0.2 0.5 1.5, ! Mean SD LowerLimit UpperLimit
SET Power_Level_<LoopZoneVariableName> = fac2*Schedule_Value_Eq_<LoopZoneVariableName>*Other_Equipment_Design_Level_<LoopZoneVariableName>,
<LoopNextZone>
! add program code
;