question

gust-flex avatar image
0 Likes"
gust-flex asked Jeanette F commented

take a certain quantity out of box until it is empty

Hello, in the following model, I am trying to simulate an operator taking items from a box and when the box is empty, putting the box away. However, I run into the problem that the box no longer has the number of items I want to pick up (token.qty). I want to simulate that the moment there are too few items in the box he takes the remaining items and then retrieves items from the next box.

Say there are 20 items in box 1 and the operator needs to take 30 items ==> take 20 items from box 1 -> place box 1 away -> take 10 items from box 2.

(This is happening in "picking item from box")

picking_from_multiple_boxes.fsm

FlexSim 23.1.2
conditional decide
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Gust_Flex , was one of Felix Möhlmann's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. 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 comment back to reopen your question.

0 Likes 0 ·

1 Answer

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

The main thing you need to change is to allow the token to pull less than the requested quantity by lowering the "Require Number". The actual pulled content is written to token because the option "Assign SELECT Values to Puller Labels" is active.

1712842777053.png

1712842766628.png

So what you can do is to subtract this value from the "qty" label. If the label is not 0 yet, the token loops back to the Pull from List activity to search for more.

While in your model there currently is only ever one box available per type, to make the model more robust, all logic after the pull should be put into a subflow. If multiple boxes were available, the token could also pull from multiple boxes if one is not enough to supply the needed quantity, which would result in array labels for both the "Box" and the "Content" label (telling you how much was pulled from each box).

picking-from-multiple-boxes-fm.fsm


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.