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

Revision history [back]

EMS with built-in Year variable 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,
            endif;

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.

image description

Does anyone know why is this happening?

Thank you so much in advance.

EMS with built-in Year variable 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,
            endif;

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.

image description

Does anyone know why is this happening?

Thank you so much in advance.

EMS with built-in Year variable 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,
            endif;

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.

image description

Does anyone know why is this happening?

Thank you so much in advance.

EMS built-in Year variable 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,
            endif;

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.

image description

Does anyone know why is this happening?

Thank you so much in advance.

EMS built-in variable Year variable 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,
            endif;

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.

image description

Does anyone know why is this happening?

You can download the IDF file from the following link:

https://drive.google.com/file/d/10hFQbRSTAHTOuvlW4Lao2iIeLvzmUoXv/view?usp=sharing

Thank you so much in advance.

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,
            endif;

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.

image description

Does anyone know why is this happening?

You can download the IDF file from the following link:

https://drive.google.com/file/d/10hFQbRSTAHTOuvlW4Lao2iIeLvzmUoXv/view?usp=sharing

Thank you so much in advance.

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,
            endif;
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.

image description

Does anyone know why is this happening?

You can download the IDF from the following link:

https://drive.google.com/file/d/10hFQbRSTAHTOuvlW4Lao2iIeLvzmUoXv/view?usp=sharing

Thank you so much in advance.

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.

image description

Does anyone know why is this happening?

You can download the IDF from the following link:

https://drive.google.com/file/d/10hFQbRSTAHTOuvlW4Lao2iIeLvzmUoXv/view?usp=sharing

And the EPW file from the following link:

https://drive.google.com/open?id=1eMeRGnII1LYA_sFfyaQKDB2du8S_IAjJ

Thank you so much in advance.