question

Ruben Mariduena avatar image
0 Likes"
Ruben Mariduena asked Ruben Mariduena commented

Can I batch tokens together in a process flow, make them go through several activities and then release them later on in another batch activity without them losing their individual information that was stored in their labels?

At first, tokens entering the process flow need to go through activities separately (each one is carrying information on their labels that affect the activities), but then they need to be batched (depending again on their labels), go through activities as a group (so the time taken in an activity is as a group not individuals) and then release them from the batch while each one still carrying their corresponding information stored in their original token labels so they can go through their separate downstream processes

FlexSim 16.2.0
process flowlabelsbatching
5 |100000

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

Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered Ruben Mariduena commented

You could use a list to synchronize several tokens. I updated your model so that all but one token, after all the tokens go through the activities where they act as individuals, push themselves onto a list. The last token goes through the middle set of activities and acts as the boat. Once it finishes those activities it pulls the waiting activities from the list and all the tokens go through the last set of activities individually.

As Adrian mentioned, you could use a Synchronize activity to do this as well, but you'd need to have a separate connector for each token which gets unwieldy as you increase the number of tokens.


listsync.fsm (27.2 KiB)
· 3
5 |100000

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

Adrian Haws avatar image
1 Like"
Adrian Haws answered Ruben Mariduena commented

Ruben,

The method for your model really depends on what you're trying to accomplish and the types of processes you will be implementing. I have made an example of one way that this might be approached, which may or may not apply in your situation.

With the most recent update of FlexSim there are Coordination activities in Process Flow called "Split", "Join", and "Synchronize". However, "Join" destroys the labels on tokens other than the first one to be joined, similar to how the "Batch" activity destroys that information when the number of tokens released is less than the number batched.

The use of "Split" and "Synchronize" may be a solution to your question. "Split" will separate one token into as many tokens as you have connectors from the activity. In the example model, I create a label called "groupLabel" on one token, then split that token into three separate tokens, setting distinct "tokenLabel" label values on each of them. I then begin the concurrent token processes by "synchronizing" the tokens. How this works is that there are the same number of incoming connectors for the "Synchronize" activity as outgoing, and that certain information (such as a label) will be used to determine what to synchronize. As soon as there is one token from each connector that matches that label, they will all be released together. Different processes can then be performed on each token, based on individual label values. Following this, the tokens in the same group are then synchronized again.

This is more easily understood by stepping through the model. I also have the User Manual section about coordination open in the model for you to take a look at. The model is attached.

Please let me know if any of this is unclear, or if a different approach will be more helpful for your situation. If this is the case, it would be beneficial for us to see an example of how your model works.


split-and-join.fsm (20.0 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.