question

Nathan S7 avatar image
0 Likes"
Nathan S7 asked Nathan S7 commented

Pull several items off of a list simultaneously and stored as array

For example, if I have a list with a field called "Type" that ranges from (1,3), and I need to pull one of each type off of the list simultaneously, could this be achieved by storing the pulled items as an array onto a singular token?


If this is not possible, is there an easy way to synchronize the individual pulls by Type such that it is effectively a singular pull?


Ideally, I would like to perform a series of steps on the batch of items pulled from a list, and then push the different Type parts back on the list upon completion.


FlexSim 20.0.7
listarrayflexsim 20.0.7push and pull list
· 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Nathan S7, was Jordan Johnson's answer helpful? If so, please click the red "Accept" button on 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

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Nathan S7 commented

Here is an example model:

BatchingWithLists.fsm

In order to pull items with 3 different types simultaneously, the easiest way is to use a run subflow. In this model, I make an array of types, and I create one child token per value in that array. Each child token pulls one item with that type, and then adds that item to an array on the parent token. This basically creates a way that a single token can pull many items all at once.


· 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 S7 avatar image Nathan S7 commented ·

Awesome, thank you!

0 Likes 0 ·

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.