question

Talia Z avatar image
0 Likes"
Talia Z asked Joerg Vogel commented

Can I make the separator pull from two different queues using conditions?

bottle-unloader-process.fsm

I am creating this simulation for a school project and have attached the FlexSim file. How can I make the separator pull from Yard_Bottles only when there is a supply of caps in the cap storage queue? Otherwise it should pull from the Yard_Caps. In other words, my aim is for the separator to pull primarily from Yard_Bottles, but ensure there is a constant supply of caps in the "Cap storage" queue by pulling from Yard_Caps when this queue is near empty. This will be simulating the need for bottle and cap storage on a bottle filling line. Please let me know if you have any questions, I really appreciate your help!

FlexSim 17.2.5
queueseparatorstrategy
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

Joshua S avatar image
1 Like"
Joshua S answered Joerg Vogel commented

One way of doing this is closing an opening the Separators ports based off the supply caps storage amount. You can do a check every time an item enters the cap storage or leaves using the objects triggers. The code to check how many items are in an object is just see how many subnodes are in that object. For instance to return how many items are in cap storage you can use

  1. model().find("Cap storage").subnodes.length
· 3
5 |100000

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