This example model demonstrates two methods for time shifting time series data in an Elapsed Time simulation without periodicity.
Method 1, Time Series Data has Same Units:
If you want to shift the start date of multiple time series elements to the same random time, then follow these steps:
 Create an array label set with an index equivalent to the number of data sets you wish to start on the same random day.
 Create a Vector type Time Series elements, and apply the array label set you create in step 1.
 Click "Edit". Populate the Time Series element with your data.
 Click the "More" button in the Time Series element.
 Click "Enable Time Shifting of Time Series Data".
 "Use random starting point" should be automatically selected. Set "Data periodicity" to "none". Click OK. Click OK.
 Run the simulation.
Limitation of Method 1:
Time Series elements must have the same units and duration length.
Method 2, Time Series Data has Different Units:
You will not be able to use the previously described method if you want to time shift multiple time series elements to the same random day if the time series units are different. This method describes how to time shift various time series elements with different data sets to the same random start point.
A random start date is created by first defining a stochastic element with uniform distribution. We define the distribution's range as the start and end duration of the time series data, e.g., 0 and (TS_Data_Duration = 365) for the attached example. We now want to shift the time series data starting at a random time without periodicity. We do this by creating an expression element called "Lookup_Day" with the following definition:
"mod(round(Random_Start) + EDay, TS_Data_Duration) day"
Where,

 round(Random_Start) rounds the random start value from the uniform distribution to the nearest day.
 Including Elapsed Run property EDay will increment the random start time as the simulation progresses since EDay is the integer number of days that have elapsed since the start of the simulation (hence, at the start of the simulation, it is zero).
 Including the "mod" math function on a basis (same as time series data duration) enables data wrapping from the last time series data entry to the first. Without this mod function, the last time series data point would repeat until the end of the simulation.
Finally, expression element "Shifted_Density_TS" links our random start date to our time series element.
Limitation of Method 2:
Method 2 will only work if TS_Data_Duration is equivalent or less than the shortest duration definition within the time series data sets. If TS_Data_Duration is longer than the shortest duration data set, then the last value in a shorter duration data set will repeat.
Comments
0 comments
Please sign in to leave a comment.