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.

Ruben Mariduena avatar image Ruben Mariduena commented ·

Matthew thank you for the response, yes the Synchronize would also be very difficult to use because in my case the number of tokens going to the boat would vary by trip ( I didn't include that in the model I sent you guys) so I don't have a set number of connectors for all trips. The list works great, it does exactly what I was looking for on the process flow. But in the 3D model the task executor is not traveling to the other Queue like it should when the token is going through the Travel activity, is only traveling because of the Unload activity. Is there a reason for this? I need both the process flow and the 3D model to be synced on the activities they are going through.

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Ruben Mariduena commented ·

Double click on the Task Executer and in its properties set the Navigator to be the DefaultNavigator.

0 Likes 0 ·
Ruben Mariduena avatar image Ruben Mariduena Matthew Gillespie ♦♦ commented ·

Thank you Adrian and Matthew, it works!

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

Ruben Mariduena avatar image Ruben Mariduena commented ·

Adrian thank you for your prompt response, in my situation I think a different approach is needed. the reason I say this is because I have variable times in the delays. I have created a simplified model of what I'm trying to achieve for you to look at. As an overview of my case, I'm trying to recreate a shipping process from one ship yard to another. A boat arrives at the yard and loads items individually (labels are considered here), once the boat has reached it's scheduled cargo (I did not include this in the model, I just left it as reached maximum capacity), the boat travels to the second yard going trough the activities that you see. Then the items are unloaded individually (labels are considered again). I'm using a "use transport" "Use task sequence sub flow" in the Queue1 to achieve all this shipping-process-flow.fsm

0 Likes 0 ·