Route containers based on quantity of items inside

Route containers based on quantity of items inside

talia_z
Not applicable
196 Views
4 Replies
Message 1 of 5

Route containers based on quantity of items inside

talia_z
Not applicable

[ FlexSim 20.0.9 ]

Hello! In my model I have a tote that is placed on a pallet; within the tote there are a number of spheres ranging from 0 to 5. I am hoping to route the pallet object containing the tote and spheres to one of the two queues based on the quantity of spheres inside the two containers. If there are 0 spheres inside, the object should be routed to Queue1 and if there are 1 or more spheres inside, the object should be routed to Queue2. I am unsure how to access this property using decision point logic and would appreciate any insights you may share!

I have created a test model to work through this issue - it is attached below.
Route_containers_based_on_quantity.fsm

0 Likes
Accepted solutions (1)
197 Views
4 Replies
Replies (4)
Message 2 of 5

jason_lightfoot_adsk
Autodesk
Autodesk
Accepted solution

The expression to test on the decision point will be:

item.first.subnodes.length>0

route-containers-based-on-quantity_jl.fsm

0 Likes
Message 3 of 5

talia_z
Not applicable

Hi @jason.lightfoot! Thank you for this accurate response! I have one quick follow-up question. I have two different object containers that are moving through the system - pallets with totes and pallets with another pallet attached. Is there a way for me to identify which object this expression affects, as it should only be applied to the pallets with totes that are moving through the conveyor system? The other object will always be routed to 'Queue1'. I have attached the model including the additional object container type.

route-containers-based-on-quantity-jl2.fsm

0 Likes
Message 4 of 5

jason_lightfoot_adsk
Autodesk
Autodesk

You could test for the name of the thing on the pallet:

item.first.name.startsWith("Tote")

or, as I have done in the attached model, put a label called something like containerType on the flowitems and test that

item.first.containerType=="Tote"

route-containers-based-on-quantity-jl3.fsm

Message 5 of 5

talia_z
Not applicable

Both options work very well in my model, thank you @jason.lightfoot!

0 Likes