Please enable JavaScript to view this site.

Vensim Help

Since data might contain measurements of both stocks and flows, it is sometimes desirable to shift data earlier or later in time to ensure that the proper correspondence between model and data is maintained.  Infrequently, you might also want the model to look a short time ahead when using exogenous data.  You can shift time points by shifting the data in time.  This shifting must be done within a model.  For example:

TROUBLE coming := TIME SHIFT(TROUBLE,TROUBLE HORIZON) ~~|

TROUBLE HORIZON = 2 ~~|

would create the data variable TROUBLE coming that is to take on the same value as TROuble two months before TROuble does.  A time-shifted data variable can only depend on one other data variable.  Time shifts can only use numbers and constants as the second argument to the function (the amount of the shift).  The use of a time shift actually results in a new data series on a new set of time points.  This data series is stored along with the run results and can be viewed using any of the analysis tools.