question

Daniele S avatar image
0 Likes"
Daniele S asked Kari Payton answered

Move objects when the queue is empty

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

FlexSim 17.2.4
queuemoveobjectdecisiondecision content queue
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Kari Payton avatar image
0 Likes"
Kari Payton answered

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


listpullexample.fsm (18.2 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.