question

Adam C avatar image
0 Likes"
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?

tokenpriority.fsm

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