In the previous tutorial task, you used the copy and paste method to create one clone of your sticker system. While the copy and paste method is intuitive, it doesn't scale well for large models. Not only is it tedious to update all the properties of every clone, it also greatly increases the chance that you might forget to update a specific property. Failing to update one or more properties could cause your model to break and increase the amount of time needed to troubleshoot the model.
In this task, you'll learn a more efficient method for creating clones using process flow instances. The following subsections will explain some of the key concepts related to these two tools.
As you know, process flows control the logic of your simulation system. In the first tutorial task, you created a general process flow. General process flows are useful for creating the global logic that will affect multiple objects in your 3D model.
However, if you may have noticed, the process flow logic you created in the previous tutorial tasks primarily controls the sticker machine, which is a fixed resource object. For that reason, it might be better to use a fixed resource process flow. Fixed resource process flows allow you to attach a fixed resource object to a specific process flow and run its own instance of that process flow. In other words, you could attach each sticker machine to a fixed resource process flow and each individual machine will run its own copy of the process flow logic. Think of the fixed resource process flow as the template for all the different copies of the logic that will be running on each processor. See Types of Process Flows and Process Flow Instances for more information.
In this tutorial task, you'll copy the logic from your general process flow into a fixed resource process flow and then attach a clone of your sticker machines to it. After you test the new process flow to ensure it's working, you'll then create additional clones (instances) of this process flow by attaching additional sticker machine clones to it. By the time you're finished with the next two tutorial tasks, you should have a fairly good understanding of the practical applications for process flow instances.
In this task, you'll create an additional clone of the sticker system. When you're finished, your new sticker system should look like the following image:
To create this copy:
Check to make sure your 3D model looks similar to the image at the beginning of this step.
In this step, you'll create the new fixed resource process flow. Then, you'll copy all the activities from the general process flow over to the new process flow. Lastly, you'll attach Sticker Machine 3 to this process flow:
Consider saving your simulation model.
In this step, you'll update the properties in your process flow so that it can easily be applied to multiple process flow instances at one time. You'll update the List: Sticker Rolls in Use so that it is a local list rather than a global list.
In this step, you'll use the current keyword for the first time. The current keyword references a token's instance object. In this case, you'll use the keyword current to set the Roll Operator's destination when it is ready to load a new sticker roll onto the sticker machine. Using current will tell the Roll Operator to travel to the object that is attached to this specific instance of the process flow. Using this keyword will ensure that the destination changes based on which sticker machine is attached to a specific instance.
To create this functionality:
current
.Consider saving your simulation model.
Now it's time to test the model again to make sure that it's running correctly. Before you run the model, open the list entries for the first and third sticker systems.
Now reset and run your model and watch it in action.
The sticker machine systems should operate nearly identically.
In this step, you'll create five more clones of the sticker system (for a total of 8). Since you won't need to update very many properties, you'll hopefully see how much easier it is to create these clones using process flow instances compared to the copy and paste method. You'll also move the RollStorage queue and RollOperator so that they are centered in between the eight sticker systems. When you are finished, your model should look similar to the following image:
To create these clones:
Consider saving your simulation model.
Now it's time to test the model one more time to make sure that it's running correctly. Again, you'll likely want to open the list entries to view them. However, now that you're using process flow instances, the process for opening the list entries for sticker systems 3-8 is slightly different, as described in the following tip box:
Now reset and run your model to watch it in action.
The eight sticker machine systems should operate nearly identically.
By default, you'll only see the main fixed resource process flow during a simulation run. To view individual instances of the process flow (such as for Sticker Machine 4 or 5, etc.):
The following image shows a few different process flows while this simulation runs. In the top left corner, you can see the Sticker Roll Logic process flow, which is the main process flow that controls all other instances of the process flow. You can also see the specific instances of the process flows for Sticker Machines 5, 6, and 7.
Notice that the main process flow shows the tokens for all the instances at one time. Sticker Machine 6 runs out of stickers first and initiates the task sequence. Then Sticker Machine 7 is next, then some other sticker machines go until finally Sticker Machine 5 goes. Notice they correlate with tokens in the main process flow:
Hopefully you can already see why it's easier to clone models using process flow instances as opposed to the cut and paste method. When you use the cut and paste method, you have to update several different settings at a time, which increases the possibility that you could make a mistake. It could also possibly slow down your model unnecessarily.
But when you use process flow instances and process flow variables, everything is much easier. After you've set up the initial model and process flow, all you have to do is create clones and update a few of the minor settings. The chances of making an error are much smaller.
In the next tutorial task, you'll also see how much easier it is to modify the original process flow and update all instances at the same time. Continue on to Tutorial Task 4.4 - Change Instances Simultaneously.