In general, there are two basic tools for creating tasks and assigning them to task executers:
Each method has its own advantages and disadvantages, which will be discussed in more depth in this topic. You should also consider completing the Task Logic Tutorial 1 - Task Logic Tools if you would like an in-depth, hands-on guide to using the different tools and methods for building tasks.
Using standard logic means using port connections and the properties on 3D objects to create and assign tasks to task executers:
For example, the most basic task is to assign a task executer to transport flow items from one fixed resource to another. To create this logic:
current.centerObjects[1]
.The expression current.centerObjects[1]
has three parts. The first part
current
means you will use something connected to the current 3D object (the
object for which you are currently editing the properties). The second part
centerObjects
means you will use something that is connected through a center
port. The last part [1]
tells it to use the task executer that is connected
through the first center port.
If you want to use more than one task executer in your simulation model, you usually have to connect them to a Dispatcher, which will handle allocating tasks to task executers based on their availability and/or other factors.
One method for creating tasks is to use resources, a kind of shared asset in a process flow:
In this kind of system, the tokens moving through the process flow usually represent tasks that need to be completed. The token then acquires a resource, which is linked to a task executer or group of task executers in the 3D model. The acquired task executer then completes the tasks and gets released after the tasks are complete.
Another method for creating tasks is to use lists, another kind of shared asset in a process flow:
In this kind of system, one set of tokens will move through the process flow and push tasks that need to be completed to a list. Then, you'll also have another set of tokens representing each task executer in the model. The tokens associated with the task executers will pull tasks off the list and then complete those tasks. After completing those tasks, the tokens representing the task executers can loop through the process flow and pull more tasks from the list.
When you're in the planning stages of your simulation model and you're beginning to design the task logic, consider asking the following questions:
The method that you use to create and assign tasks in a simulation model will largely depend on the unique needs of your simulation project and your answer to some of these questions. If you plan on creating more complex task logic, you should probably consider using the Process Flow tool rather than standard 3D logic.
With that in mind, the following table provides an overview of the advantages and disadvantages of the different tools and methods for building tasks:
Method | Advantages | Disadvantages |
---|---|---|
Standard 3D Logic |
|
|
Resources in a Process Flow |
|
|
Lists in a Process Flow |
|
|
Just remember that it's never too late to switch to a different tool or method if you're finding one way isn't working for your simulation project. Once again, completing the Task Logic Tutorial 1 - Task Logic Tools could help you get a more in-depth feel for the different tools and methods for building tasks. Don't be afraid to experiment until you find the approach that works best for your simulation project.