Create Task Sequence

Overview and Key Concepts

The Create Task Sequence activity will create an empty task sequence and dispatch it to a task executer. A task sequence is a series of actions (known as tasks) that can be assigned to a task executer (such as an Operator or Transporter).

Be aware that you don't have to use the Create Task Sequence activity at the beginning of every task sequence. Using any of the task sequence activities in a process flow will automatically create a task sequence any time that task sequence is used in a simulation run, which means the Create Task Sequence isn't technically necessary.

With that in mind, there are a few reasons why you might decide to use a Create Task Sequence activity:

  • To give some task sequences higher priorities than other. By default, task executers will complete task sequences and activities in the order they were received (first in, first out). However, you might want a task executer to complete more important tasks first. You can use the Priority property on the Create Task Sequence activity to cause the task executer to work on higher priority task sequences before lower priority task sequences. You can also use the Preemption menu to determine if requests for higher priority tasks should force a task executer to stop its current task sequence and perform the preempting task sequence.
  • To prevent a task executer from stopping the current task sequence to work on another task. When using the task sequence activities on their own, a new task sequence is created and dispatched for each task on their own, which leaves room for another task sequence to interrupt the task sequence in between your activity tasks. When you use a Create Task Sequence activity, the task executer will need to finish the entire task sequence before working on a different task sequence.
  • To create a task sequence and dispatch it later in the simulation run. You may want to create an entire task sequence but instead of dispatching it immediately, push it to a Global List and have a task executer pull it from the list. Using the Create Task Sequence activity with no assigned Task Executer / Dispatcher specified allows you to build the task sequence without dispatching it.

When you use a Create Task Sequence activity, you are essentially grouping a set of tasks together into a single unit, so the task executer will not do anything else until that entire group of tasks is finished. Once the task executer has completed all of the tasks in a task sequence, the task sequence will be deleted.

Connectors

The Create Task Sequence activity only allows one connector out. See Adding and Connecting Activities for more information.

Properties

The following image shows properties for the Create Task Sequence activity:

Each of these properties will be explained in the following sections.

Name

Used to change the name of the activity. See Name for more information about this property.

Font

The Font button opens a window to edit the activity's background color and font properties. See Font for more information about this property.

Statistics

The Statistics button opens the activity's statistics window. See Statistics for more information about this property.

Task Executer / Dispatcher

Use the Task Executer / Dispatcher box to select the task executer or dispatcher that you want to assign the task sequence to. If you want to create a task sequence but not dispatch it, click the button so that this box now reads None. If you want to dispatch the task sequence at a later time, you should click the remove button and use Dispatch TS (Task Sequence) activity to assign the task sequence to a task executer later in your process flow. See Dispatch Task Sequence for more information about this activity.

Priority

The Priority box sets the priority level of the task sequence. By default, task executers will complete task sequences and activities in the order they were received (first in, first out). However, you might want a task executer to complete more important tasks first. You can use the Priority box to cause the task executer to work on higher priority tasks sequences before lower priority task sequences.

By default, all task sequences are assigned a priority of 0, but you can enter in any number in the Priority box. By default, Task executers will prioritize task sequences to perform higher priority task sequences first through their Queue Strategy property. For example, imagine you create a task sequence with a priority number of 1 and another with a priority number of 2. If both task sequences are waiting in a task executer's queue to be performed next, the task executer will work on the task sequence with the priority number 2 first.

Preemption

The Preemption menu sets the preemption value of the task sequence. Preemption is when a task executer stops its current task sequence to work on the preempting task sequence. You can use the Preemption menu to determine if and how preemption occurs.

For example, Operator A's most important responsibility is to repair machines. When there are no machines to repair, however, it should also transport material throughout the model. If a machine breaks down while Operator A is in the middle of transporting a flow item somewhere, then the Operator should stop whatever it is doing and repair the machine, instead of finishing the transport operation. To simulate this behavior in your model, you'll have to make sure that the Operator's machine repair task sequence is set to preempt the task sequence for transporting flow items.

The Preemption menu has the following options:

  • no preempt - The current task sequence will not preempt any other task sequences.
  • preempt - The current task sequence will preempt any active task sequences. The active task sequence (the one that is being preempted) will go back into the task executer's queue to be finished later.
  • preempt, aborting active - The current task sequence will preempt any active task sequences. The active task sequence (the one that is being preempted) will be deleted and will not be finished later.
  • preempt, aborting all - The current task sequence will preempt any active task sequences. The active task sequence and all other task sequences in the task executer's queue will be deleted and will not be finished later.

Assign To

Assigns a reference on the specified label/node to the created task sequence. See the Assign To section of Common Properties for more information.