question

ernesto daniel AG avatar image
0 Likes"
ernesto daniel AG asked ernesto daniel AG commented

how to set a pack based on conditional quantity sequence?

hi all. i have a problem with a pack sequence.

i need that the combiner takes first 18 boxes from queue2, and then 18 boxes from queue3, in that specific sequence.

i made a process flow.

i push items to a list, with the decide I check if the condition is fulfilled, if it is not so it is returned, if it is fulfilled it pulls the items from queue1 to queue3

I attach an image and the model

thanks!

model-boxes.fsm

FlexSim 18.1.2
process flowcombinersequence
model-boxes.fsm (26.3 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.

1 Answer

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered ernesto daniel AG commented

A simple move object activity cannot separate the items in an array. You must move each single item of the array token.pulled to its destination separately. You can use a Run Sub Flow activity to separate the items and move them then in the sub process.

The Quantity is the number of elements in the array. The Run Sub Flow activity creates the same number of tokens in the sub process. Each token needs a reference of one item of the array. You can get this reference by the methods shift() or pop(). These methods return the reference and they both delete the reference from the array, so the next token in sub process gets the next reference to an item item of the array.

I use for each destination of the items a different sub process. But you can add the destination as a label to the created token in sub process, too, then you need only one sub process at all. The double check decide activity isn't necessary, because if you require 18 items in your pull activity, the token won't leave this activity until the condition is fulfilled.

I use a single item list with partitions, which stores the items from different queues in different partitions. You can set the partition number by an attribute like an item.Type or any other label value at the item. I set a static number in the push to list option in the Send To function.

The order, in which you pull the items in the process, defines the order they are assembled.

set-combine-order-by-pf-jv.fsm FlexSim 17.0 should work as well with 18.


· 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.

ernesto daniel AG avatar image ernesto daniel AG commented ·

Thanks, that´s exactly what i was looking for.

0 Likes 0 ·