question

Patrick Crowley avatar image
0 Likes"
Patrick Crowley asked Joshua S answered

Pushing and Pulling Multiple Tokens

Hello,

As part of a model I am building, I need to pull a variable number of tokens from one partition of a list (storing them as an array in the token.pulled label of the puller token) then eventually push those tokens back onto several different partitions in the list I pulled them from.

Is there a way to:

a) Push multiple tokens onto a list that are referenced in the token.pulled array label

and

b) Have these pushed tokens go to different partitions.

My first thought was to use the function provided in flexsim as follows:

if(token.pulled.length > 1) {
for(int i = 1; i <= token.pulled.length; i++) {
string MH = Table("HP_Routes_Handlers")[token.pulled[i].sku_row][token.pulled.index + 1];
List("HP_Picking").push(token.pulled[i], MH);
}
}

MH is the string I am pulling from a table to use as the partition, that is a function of data I am pulling off the token.
Any help would be appreciated, thanks!
FlexSim 18.1.2
listlist pulltokenlist push
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

Here's an example using the push and pull activities. You can reference the same list, I jsut had the final tokens pushed to another list to demonstrate how they are gonig to different partitions again.

tokenexample.fsm


tokenexample.fsm (42.6 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.