How to get the last value of an auxiliary variable ?
Posted: Mon Aug 28, 2017 3:44 pm
Hi,
I found similar topics on the forum but couldn't apply the solutions provided to my own issue...
My model aims to calculate the energy performance of a building and compare this energy performance before/after the building refurbishment (TIME STEP = 1 month).
With a lookup, I "scored" the yearly building energy performance from 4 to 0 (worst to best) depending on the amount of yearly energy consumptions (as a sum of consumptions over the past 12 months of the year). So this variable only gets a value every 12 time steps.
I wish to compare the "current energy class" scored at MODULO(Time,12)=0 with the "last known energy class" computed at [Time-12] in order to obtain the distance between previous and current scores.
I tried to use the DELAY FIXED equation, but couldn't get what I need, as :
1) the first value for the variable "current energy class" appears at [Time=12], so I would expect the variable "last known energy class" to be calculated at [Time=24] for the first time... yet "last known energy class" appears earlier than expected at [Time=13] ;
2) I would expect the variable "last known energy class" to appear at the same yearly time as "current energy class" (meaning at Times 24, 36, 48, ...) in order to measure the distance between previous and current values... but instead the "last known energy class" is calculated with a shift in time, and I get the values at Times 13, 25, 37, 49, ... .
Can you please help me find a way to put it right ? What am I missing here ?
Thank you a lot !
Best regards,
Laura
I found similar topics on the forum but couldn't apply the solutions provided to my own issue...
My model aims to calculate the energy performance of a building and compare this energy performance before/after the building refurbishment (TIME STEP = 1 month).
With a lookup, I "scored" the yearly building energy performance from 4 to 0 (worst to best) depending on the amount of yearly energy consumptions (as a sum of consumptions over the past 12 months of the year). So this variable only gets a value every 12 time steps.
I wish to compare the "current energy class" scored at MODULO(Time,12)=0 with the "last known energy class" computed at [Time-12] in order to obtain the distance between previous and current scores.
I tried to use the DELAY FIXED equation, but couldn't get what I need, as :
1) the first value for the variable "current energy class" appears at [Time=12], so I would expect the variable "last known energy class" to be calculated at [Time=24] for the first time... yet "last known energy class" appears earlier than expected at [Time=13] ;
2) I would expect the variable "last known energy class" to appear at the same yearly time as "current energy class" (meaning at Times 24, 36, 48, ...) in order to measure the distance between previous and current values... but instead the "last known energy class" is calculated with a shift in time, and I get the values at Times 13, 25, 37, 49, ... .
Can you please help me find a way to put it right ? What am I missing here ?
Thank you a lot !
Best regards,
Laura