Move objects when the queue is empty

Move objects when the queue is empty

daniele_s
Not applicable
327 Views
1 Reply
Message 1 of 2

Move objects when the queue is empty

daniele_s
Not applicable

[ FlexSim 17.2.4 ]

Hello,

I'm a Flexsim beginner user.

I'm trying to figure out how to take a decision (using the Process Flow tool), based on the content of a Queue named "InitialCerclageStock". I need to move objects contained into a queue "Queue_NextFO" (which value changes) to that queue ("InitialCerclageStock").

Now, I have an initial queue ("MasterStock") where there are several objects, each one represents a fabrication order (which contains several objects inside). The purpose is to unpack one fabrication order at time inside the queue "Queue_NextFO" by using the Separator tool.

Once the fabrication order is unpacked, I have several identical objects into the queue "Queue_NextFO" which must be moved inside the line. So, all components of that fabrication order must be moved (all at the same time) into the new queue called "InitialCerclageStock". This procedure must be performed only when that queue is empty. To check its status I have use the decision tool with the code "model.find("InitialCerclageStock").subnodes.length == 0"

The problem is that it doesn't work or when it works, it moves only one component (instead of all the components of the FO).

Thanks.

simulation-process-multipleobjects5-10m01.fsm

0 Likes
Accepted solutions (1)
328 Views
1 Reply
Reply (1)
Message 2 of 2

kari_payton
Not applicable
Accepted solution

Hi @Daniele S Some tips:

1. Be sure to have consistent labels and spelling.

- In the subflow you created a label called "rack" instead of "rank".

- Also in the source, make sure those labels match throughout the model. You have label "Param A" on the token but on the create object you set a label value to "token.DistributionparamA". Possibly it should say token.labels["Param A"]. Or on the source you need to create a label "DistributionparamA".

2. In order to use move object, you need to have the object as a label on the token. What you can do is have the items enter on a list. Create a global list and in the flow options you can send to port - list. Then in your process flow pull the items from the list. This will give give the token a label for the item. Then you can move it. See the file attachment for an example.

listpullexample.fsm

0 Likes