Adam C avatar image
Adam C asked tannerp converted comment to answer

How to sort tokens by priority label?

My model has 3 product types that require transport to a dedicated processor, one per product. Each product has a different priority (10, 20, 30). If there is more than one type of product ready for transport, the highest priority product should be moved.

I create event-triggered (transport reference) tokens to initiate the transport, which accumulate at the Pull Forklift activity if the transporter is busy. They process in FIFO order. How can the tokens be sorted by priority so that when the transporter becomes available, the highest priority token is released?

It seems like a Max Wait Timer may be necessary to reroute the tokens for sorting, and Wait for Event (Transporter List Content Increase) could trigger releasing a token. But how can the accumulated tokens be sorted prior to release?


FlexSim 19.0.1
process flowpull from listtokensprioritysorting
tokenpriority.fsm (31.2 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

tannerp avatar image
tannerp answered

Hi @Adam C,

This is a tricky question. I'm not sure that you could make this work directly by parsing through the tokens to find the priority labels. The only way I could think of would be to re-route the tokens to a second list and pull from that list based on priority, at which point you might as well just go a different route entirely.

My suggestion would be to push the items themselves to a list (from the queues), pull those items off the list using Process Flow, then use an Acquire or Pull activity for your Transporter1.

· 4
5 |100000

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

Adam C avatar image Adam C commented ·

Thank you for the response. I was able to make it work in this way using a Split and Zone activity. The Split creates a token to go on the list and another to initiate a transport. The Zone make sure only one transport is pulled at a time since there is only one transporter.

Please check my process flow and let me know if you are aware of a better method.


0 Likes 0 ·
tokenpriority.fsm (35.4 KiB)
tannerp avatar image tannerp Adam C commented ·
@Adam C

I think your method looks great if it works for your application. It really comes down to the constraints on your model whether or not it's accurate. I'd assume your model is more complex than the sample, in which case I wouldn't rearrange it too much.

The only alternative I can think of off the bat would be to use a Resource for your transport instead of a List, but there's nothing wrong with using the list.

Glad you were able to figure something out that would work!

0 Likes 0 ·
Adam C avatar image Adam C tannerp commented ·

Thanks, this is indeed a simplified concept model.I have uses Resources over Lists in the past, but was steered toward Lists to overcome some limitation related to complex process flow operations.

I cannot seem to find the "Accept Answer" button. Has it been moved or removed?

0 Likes 0 ·
Show more comments

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.