EMS built-in variable Year is not constant
Hi everyone,
I'm working on a script and I found that the built-in variable Year
is not working properly. The variables YearDiff, YearBaseline, AvgElecVPSC, AvgElecVPSCBase, VPSCIncRate and HVACEnergyCost
are declared global variables, and HVACConsump
is the sensor of the output meter Facility Total HVAC Electric Demand Power. The values of YearBaseline, AvgElecVPSCBase, VPSCIncRate
are defined in the SetInputData program.
EnergyManagementSystem:Program,
SetInputData,
set AvgElecVPSCBase = 0.1226, !(Euros/kWh)
set VPSCIncRate = 1.91, !%
set YearBaseline = 2015;
EnergyManagementSystem:Sensor,
HVACConsump,
Whole Building ,
Facility Total HVAC Electric Demand Power;
EnergyManagementSystem:ProgramCallingManager,
ApplyATCCI,
InsideHVACSystemIterationLoop,
ApplyATCCI;
EnergyManagementSystem:Program,
ApplyATCCI,
set YearDiff = Year - YearBaseline,
set AvgElecVPSC = AvgElecVPSCBase*((1+(VPSCIncRate/100))^YearDiff),
set HVACEnergyCost = (HVACConsump/1000) * AvgElecVPSC;
In this case, the EPW year is 2025 and YearBaseline is 2015, so that YearDiff should be 2025-2015=10 always. However, when I run the simulation, the results show the following values: when there is a peak in HVAC consumption, for some reason, there is a peak in the built-in variable Year and in the global variable YearBaseline, and therefore the substraction is wrong. Please see screenshot below.
Does anyone know why is this happening?
You can download the IDF from the following link:
https://drive.google.com/file/d/10hFQ...
And the EPW file from the following link:
https://drive.google.com/open?id=1eMe...
Thank you so much in advance.
Can you provide a link to the IDF? You can use Google Drive or Dropbox.
Hi shorowit,
You can download it from the following link:
https://drive.google.com/file/d/10hFQ...
Thanks in advance.
This is probably unrelated since the Year variable is supposed to come from the EPW, but in any case: based upon the png, E+ is doing 2002. You should consider modifying your RunPeriod so E+ is doing 2025.
Hi Jason, Please, could you clarify how to achieve that? I set the year to 2025 by modifying the header of an EPW file from EnergyPlus with the software Elements. Thanks in advance.
In the RunPeriod object, set the start year as 2025 and make sure the start day of the week is blank. E+ will figure that out for you. Unfortunately, there's no EMS variable connected to the internal variable that tracks the calendar year of the simulation. If that's something you need please put in a feature request on the E+ GitHub repo.