Time Series

Overview and Key concepts

The time series object is used to associate a certain value with a repeating time series. The time series has a single event, On Value Changed that fires at the beginning of each new time period and includes the new value as a parameter.

Examples are: a day / night closure that varies per hour of the day, a maximum storage capacity that varies per day of the week, or a seasonal impact factor which varies per month of the year.

Use Case Example: seasonality in production

Suppose that the production of a facility varies by month of the year due to environmental factors, such as the temperature of cooling water from a river or average wind speed throughout the year. You would create a Time Series tool and enter an impact factor for each month of the year.

By listening to the On Value Changed trigger in Process Flow, you can then apply this impact factor to the Flow Source in your model to modify the base production rate for that month accordingly. The screenshot below assumes that there is a model parameter called "Base Production" with the base rate and multiplies this with a value from the table as announced by the On Value Changed event of the Time Series.

The Time Series Tab

On the Time Series tab, the time series can be configured.

Mode

The time series mode determines the interval at which the value will change. The following options are available:

  • Hourly data (repeat daily)
    A data point will be entered for each hour of the day (0:00 through 23:00). During the model run, the On Value Changed event will fire at the start of each hour (and at the beginning of the simulation) with the correct value for the upcoming hour.
  • Daily data (repeat weekly)
    A data point will be entered for each day of the week (Monday through Sunday). During the model run, the On Value Changed event will fire at the start of each day (and at the beginning of the simulation) with the correct value for the upcoming day.
  • Monthly data (repeat yearly)
    A data point will be entered for each month of the year (January through December). During the model run, the On Value Changed event will fire at the start of each month (and at the beginning of the simulation) with the correct value for the upcoming month.

Note that the simulation time is used to determine the correct value. For example, when you use the Monthly data (repeat yearly) option and set the model start time to 26 July, the On Value Changed trigger will fire at the start of the simulation and pass in the value for July (the seventh row in the table), it will fire on 01 Aug (at t = 6 days) with the value of August (the 8th row) and then at each first day of the month, after 28, 29, 30 or 31 days as appropriate.

Offset

The offset can be used shift the whole Data table by a certain amount. For example, if you are using the Hourly Data mode, the new value will normally be announced at the start of each hour. By setting the offset to 15 minutes, the value will be passed 15 minutes after the hour.

Note that the time before the offset is considered to be in the previous hour. For example, if you set your model start time to 8:00 am, and set the Time Series offset to 15 minutes, the On Value Changed trigger will fire at the start of the simulation with the value labelled 7:00 am (the 8th row in the table). At 8:15 am (at t = 15 minutes) it will fire again with the value labelled 8:00 am.

The offset can be larger than the time period. For example, in Hourly Data mode, the offset can be 120 minutes. The On Value Changed trigger will then fire with values 'lagging' by two rows (e.g. at 1pm you will get the value for 11am).

On Value Changed

At the beginning of each period (hour, day or month, depending on the mode), the On Value Changed event will be triggered. You can add a picklist option or custom code through the Time Series properties window, or listen to this event using a ProcessFlow Event-Triggered Source or Wait For Event activity.

The event has the following parameters:

Event Parameter Explanation
rowIndex The row index in the data table from which the current value is taken. For example, when in Monthly Data mode, the value for January will have this parameter set to 1, and in Weekly Mode this parameter will equal 5 when the event is raised on Friday (assuming zero Offset).
repeatIndex This parameter indicates how often the current value has already been used. It will start at zero and increase by one each time the complete datatable has been cycled.
value The value for the upcoming time period, as entered in the data table.