This topic will explain how to edit the properties on fixed resources in the 3D model to create different types of flow logic. Before reading this topic, make sure you are familiar with the concepts explained in these topics:
You will primarily use the properties under the Input and Output sections of the Properties window to control the flow between fixed resources. You can access these by clicking on a fixed resource to open its properties in the Properties window on the right.
If your simulation model has a fixed resource that is connected to multiple downstream objects, you might want to create logic on your ports that determine which downstream port will receive the outgoing flow item. FlexSim provides a variety of pre-programmed types of flows such as:
See Common Types of Flows for more detailed explanations and demonstrations of these flows.
You will primarily use the Send to Port property under the Output section of the Properties window to control how a fixed resource decides which downstream port should receive a flow item. To choose one of the common types of flows:
If you'll recall from the Key Concepts About Ports topic, each port is assigned a ranking. Every time you create a port connection between two objects, FlexSim automatically assigns a rank to that connection. The first port connection you make will have a rank of 1, the second will have a rank of 2, etc.
When a fixed resource is ready to release an item, it will evaluate the Send to Port property and return a port number. Whichever port number it returns will determine which port will receive the flow item.
For example, imagine your simulation model has a processor with five output ports to five different queues and you want the processor to send them to a random queue using a statistical distribution. In that scenario, you would set the Send to Port option to random. When the processor finishes processing a flow item, it will call the Send to Port function to determine which port it should send the flow item to. Because the Send to Port property was set to random, the Send to Port function will use a random statistical distribution to return a number between 1 and 5. If it returns the number 3, it will send the flow item to port 3. If it returns a 5, it will send the flow item to port 5, and so forth. See Fixed Resource Concepts for more information.
If needed, you can use a task executer to transport flow items from one fixed resource to another. (See Using Transports for a more detailed explanation and demonstration.)
To create flow logic where a fixed resource will use a transport:
The Use Transport property tells FlexSim which task executer should transport the flow
item. By default, when you check this box, it displays a FlexScript expression that says
current.centerObjects[1]
. What does this expression mean?
current
refers to the current object you are defining the
property on. So, if you're defining this property on a processor, it refers to that
processor.centerObjects
is a piece of FlexScript code that tells the
object to use the task executer that is connected to its center port.[1]
in brackets tells it to use the object connected to the
center port with a ranking of 1. If you were to change that number to a 2, it would use
the task executer connected to the second port instead.You can change the Use Transport property so that it uses different logic to determine which task executer should be used. If you click the arrow next to the Use Transport box, you'll see a menu that lists several different options for selecting a task executer. Try experimenting with a few of the options to get comfortable with this property.
You might have noticed that the Use Transport property has two additional properties: Priority and Preemption. These properties control whether the task executer should complete the transportation tasks before or after it works on other tasks.
When you create a transport task for a task executer, you're really creating a task sequence that has three tasks:
It's possible that a task executer might be assigned more than one task sequence at a time. For example, if an operator is transporting flow items for two different processors, it could receive transport task sequences from both processors at the same time.
If needed, you can use the Priority property to tell the task executer which task sequence has a higher priority, meaning that the task executer should work on that task sequence before other tasks. In a similar vein, you can use the Preemption property to preempt a task executer, meaning that they will stop the current task they are working on and go work on the more important task sequence.
Because the Priority and Preemption properties are important to task sequence logic, these properties will be discussed in the topic about Task Sequences.
If needed, you can make a downstream object pull flow items from an upstream object. For example, you can make a processor pull a flow item based on certain conditions. (See Pushing and Pulling for more information.)
To make an object pull from an upstream object:
The Pull Strategy property controls where the flow item will be pulled. In other words, it determines which input port the fixed resource will pull flow items from.
The Pull Requirement property controls what type of flow items can be pulled from the upstream fixed resource. For example, you could require the fixed resource to only pull flow items with a particular item type or a matching label.
When the fixed resource is ready to pull an item, FlexSim will evaluate the Pull Strategy to determine which port it should pull from. Then it will evaluate whether there is a flow item that matches its criteria or restrictions. It will attempt to pull from this port until a flow item matches its criteria.
To change an object's port rankings: