question

Oscar C13 avatar image
0 Likes"
Oscar C13 asked Nathan B14 commented

Load all items from queue

Hello
I´ve many different items in a queue. I want to take them all and move them to another position. I want to catch them all at once, but I don´t want to put a load for each item, but I want to make a sub flow.
I attach an example where you want to transport the items from queue1 to queue2.

I don´t know what I have to put in the item tab of the Load activity, and how to manage the sub flow of the unload.
Lavar.fsm

FlexSim 21.2.1
process flowqueueloadsubnodes
lavar.fsm (37.3 KiB)
· 1
5 |100000

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

Nathan B14 avatar image Nathan B14 commented ·

Hi @Oscar C13, was Felix's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

Easiest would be to activate the "Run Tokens One at a Time" in the "Run Sub Flow" activity and simply load the first item in the queue each time. Since you run the sub flow once per item in the queue there will always be a "first" item. The "Run Tokens One at a Time" option will make sure there are no timing conflicts between the tokens, where two or more tokens might want to pick the first item at the same time.

To unload them again, you similarly run the subflow once per item in the operator and have him unload the last item each time (so the items are unloaded in LIFO order).

lavar_1.fsm


lavar-1.fsm (36.9 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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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