Topics
- What is a Task Sequence?
- How Task Sequences Work
- Labels on Task Sequences
- Travel Task
- Load and Unload Tasks
- Break Task
- Operator Task Sequences
- More Task Types
What is a Task Sequence?
A task sequence is a series of tasks to be executed in sequential order by a TaskExecuter, as shown in the figure below. The term TaskExecuter implies any object that inherits from the TaskExecuter class. This includes Operators, Transporters, Cranes, ASRSvehicles, Robots, Elevators, and other mobile resource objects. An object is a TaskExecuter if the TaskExecuter tab page options are in its Properties window.
In addition to being a series of tasks, each task sequence has a priority value, which defines the importance of executing that task sequence with respect to other task sequences. Each task sequence also has a preempt value, which defines whether that task sequence should cause other task sequences' execution to be halted in order to execute this task sequence.
Automatically Created Task Sequences
FixedResources have a default mechanism for creating task sequences to move flow items to the next station. You can use this default functionality by checking the "Use Transport" box in the Flow tab page of the FixedResource's Properties. Processors also have a default mechanism for creating task sequences to call operators for setup times, process times and repair operations. This is done by modifying the Processor or ProcessTimes tab page on a Processor, Combiner, or Separator. Each of these default mechanisms triggers a task sequence to be automatically created.
How Task Sequences Work
When you check the "Use Transport" field on a Flow tab page, the following task sequence is created.
- Travel to the object currently holding the item
- Load the item from that object
- Break
- Travel to the destination object
- Unload the item to the destination object
When a TaskExecuter executes this task sequence, it will execute each task in order. Each task mentioned above corresponds to a specific task type. Notice in the above example that there are two "Travel" task types in the task sequence, one "Load" task type, one "Unload" task type, and one "Break" task type.
Labels on Task Sequences
There are times when it's useful to store information on a task sequence. This can be done by using labels. Just as TaskExecuters and FixedResource objects have the ability to store labels, so does a task sequence. Use the setlabel() and getlabel() commands on a task sequence node to set and get labels. This only works on the task sequence node and node on the individual tasks of a task sequence.
Travel Task
The "Travel" task type tells the TaskExecuter to travel to some object in the model. This may be done in several different ways, depending on the model's setup. If the TaskExecuter is connected to a network, then the travel task will cause it to travel along the network, arriving at a network node that is connected to the desired destination object. If the TaskExecuter is a Crane object, then it will lift up to a modeler-defined height, then travel to the X/Y location of the destination object. Hence, a travel task can imply several things, depending on the setup of the model, as well as the type of object that is being used. The one thing, however, that all travel type tasks have in common is that they all have some destination object in the model that they are trying to get to.
Load and Unload Tasks
The "Load" and "Unload" task types tell the TaskExecuter to load or unload a flow item into or out of a station. This usually involves traveling an offset distance in order to pick or place the item at the right spot, as well as going through a modeler-defined load or unload time before transferring the item. While the load/unload time is handled in the same way for all TaskExecuters, the offset travel may differ depending on the type of TaskExecuter. A Transporter, for example, will travel to the pick/place location while lifting its fork up to the pick/place height. A robot, on the other hand, will rotate to the spot where the item should be picked/placed. For more detail, see offset travel.
Break Task
The "Break" task type tells the task executer to check if there are any other task sequences that it can "break" to. For example, if a transporter has two items that are waiting to be picked up from the same location, and it has the ability to load two or more items, then the transporter would have two task sequences to do. Both of them would be like the above mentioned task sequence. One is the active task sequence to pick up the first item, and the other task sequence is placed in his task sequence queue to be executed once he finishes the active task. The break task allows the transporter to stop the first task sequence after he has loaded the first item, and begin the second task sequence, which is to travel to the second item's station and load the second item. If the task sequence did not contain the break task, the TaskExecuter would have to finish the first task sequence completely, unloading the first item before being able to load the second item.
Operator Task Sequences
Here's another example of an automatically created task sequence. The Processor object creates this task sequence to request an operator to work at the processing station. The task sequence is described as follows:
- Travel to the processing station
- Be utilized until freed from the processing station.
As in the previous example, the first task tells the TaskExecuter to travel to the station. The second task is a new task type not mentioned in the previous example. This is a "Utilize" task type. It tells the TaskExecuter to go into a given state, like "Utilized" or "Processing", and then wait until it is freed from that state. The operator is freed when the freeoperators() command is called. Since the Processor automatically creates this task sequence, it automatically handles freeing the operator as well.
Note: An operator task sequence is not created exactly as described above. In reality there are more tasks added. For simplification purposes, though, we present the above example. For more information on the operator task sequence, refer to the documentation on the requestoperators command in the command summary.
At any given time in a simulation, a TaskExecuter can have one active task sequence as well as a queue of waiting task sequences. A Dispatcher object, on the other hand, can have a queue of waiting task sequences, but cannot actively execute any of those task sequences. Rather, it dispatches its queue of task sequences to TaskExecuters connected to its output ports. This is what distinguishes the Dispatcher object from the TaskExecuter and its sub-classes.
Active Task Sequence
Queue of Waiting Task Sequences
If no task sequences are preempting, then a TaskExecuter will execute its active task sequence until that task sequence is finished. Then it will make the first task sequence in its queue the active task sequence and start executing that one. This repeats until all task sequences in the queue have been executed.
More Task Types
At this point you have been introduced to 5 task types, namely travel, load, unload, break, and utilize. There are several more task types that can be used when creating task sequences. For a more detailed explanation of each task type and its usage, see Task Types. The next section will address how to create and customize your own task sequences.