The Date Time Source activity creates new tokens as specified in its Arrivals table. This table defines when and how many tokens should be created either through a date based interface, or a repeated table (daily or weekly schedules). The table also defines a name that will be assigned to the new tokens and label values, if desired. These settings can either have a fixed value or the values can be calculated dynamically. Also, you can either enter the data into this table manually or import a table from an Excel spreadsheet using the Excel Interface.
The following image shows an example of a possible arrival schedule on a Date Time Source activity:
This table has 20 tokens being created between the 8AM and 9AM hour, a random distribution of tokens being created between the 9AM and 10AM hour and 15 tokens being created between the 10AM and 11AM hour. Based upon the Arrival Spacing and Offset / Variability values you can define whether tokens are created at the start time, evenly spaced between the start and end time or randomly spaced between the start and end time.
You can also specify the Time Mode of the schedule. This defines whether the start and end times in the arrival table are based upon your model start time, for instance 08:00 AM in the morning, or based off of time 0. If based off time 0, the times become an offset from 0.
Each Date Time Source activity has an Arrivals table, which controls the schedule for creating new tokens. Each row in the table defines when tokens will be created. The values for the cells under each column can be changed to customize the arrival schedule:
The Date Time Source activity offers two Time Modes:
Arrival schedules can be set to not repeat, repeat daily, weekly, hourly or a custom repeat interval. If a repeat interval is selected then you can define the Cycle Count meaning the schedule will continue to repeat throughout the model run. Defining the number of cycles for the schedule will determine how many times the schedule will run. For example, a cycle count of 1 will cause the schedule to run once.
You can tie a dashboard Edit box to the Cycle Count box by creating a dashboard edit box and using the button next to the Link box in the quick properties to link to the cycle count.
With the exception of the start and end times and duration, the values in the arrival table may also be defined dynamically using picklists or code. This gives a greater amount of control on how an arrival schedule is defined. Each arrival table has a universal edit below the table that will change based upon the current table cell that is selected. Use the sampler or drop down button of the universal edit to define the value of the table cell.
There may be cases where you are dynamically creating instances of process flow objects during a model run. The Create Person activity creates a new person from the flowitem bin and allows you to define an Instanced Process Flow to attach to the created person. When this happens, any date time source activities in the process flow will begin their schedule based upon the Mode and the Time Mode. If the Mode is set to Date Based or the Time Mode is set to Use Model Start Date/Time, the schedule will begin based upon the current model time. This means that times are absolute, without regard to the creation time of the instance. For example, if a date time source activity has an arrival time of 10:00 for its first entry and a new instance of the object is created at time 09:00, then the first token will be created in 1 hour, at 10:00.
If the Time Mode is set to From Time 0, then the arrival times become relative to the creation time of the instance. For example, if a date time source activity has its first arrival at time 02:00 and a new instance of the object is created at time 01:00, then the first token will be created at time 03:00.
The Schedule Source can also be used to create tokens using relative times.
The Date Time Source activity only allows one connector out. See Adding and Connecting Activities for more information.
The following image shows properties for the Date Time Source activity:
Each of these properties will be explained in the following sections.
Used to change the name of the activity. See Name for more information about this property.
The Font button opens a window to edit the activity's background color and font properties. See Font for more information about this property.
The Statistics button opens the activity's statistics window. See Statistics for more information about this property.
Opens the date time source Arrivals Window.
Allows you to add labels to the created tokens. Each label entry is evaluated for every token that is created. For more information on assigning labels, see the Assign Labels activity.
The arrivals window is where the date time source's arrival schedule is defined. This window's properties will be explained in the following sections.
The generate table allows you to quickly generate a daily or weekly repeated table. Click the Generate Table button to display the following popup:
The date time source offers two arrival modes:
Click the to add the currently visible table to the Excel Interface.
Displays the number of rows in the arrival schedule. Add or remove rows at the end of the schedule by entering a new number in the box or using the up and down arrows.
Labels can be added to the created tokens by clicking the or typing a number directly into the box. Use the button to remove the last label.
The arrival schedule can be viewed using two different methods:
If the table is set to be a weekly schedule, the table will display the week's arrivals, where the table cells are the arrival quantities.
Regardless of which table you view, the data is the same, meaning, if you edit the times, token name or label values in one table, that value will also be displayed in the other table.
By default there are four columns in the arrival table. Any number of labels can also be added to the schedule.
You may define static values through the table or dynamic values using the picklist field directly below the table. See Dynamic Arrival Values for more information.
This field will change based upon which cell is currently selected in the Arrivals table. You can use this box and the pull-down arrow next to it to enter dynamic values for the Name, Quantity or Label values in the table. You can select a picklist option from the pull-down menu or you can enter in custom code if you are comfortable with FlexScript.
The arrival spacing defines when tokens will be created for each arrival. There are three arrival spacing modes:
(duration / quantity).
The offset / variability will modify the creation time of each token. The value returned by this picklist can be negative or positive. This means you could have tokens created before the arrival's start time or after the arrival's end time. This can be especially helpful when dealing with scheduled appointments. This picklist will be fired once for each token in each arrival.
If the Mode is set to Date Based, the Arrivals Window will change to look like this:
Using the Graphical Table: