question

PVA avatar image
0 Likes"
PVA asked Julie Weller commented

How to group & sort tokens ?

How to group tokens by "type" and sort them in descending order based on another label say "proc_time"

FlexSim 23.1.2
group tokensort token
· 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.

Julie Weller avatar image Julie Weller commented ·

Hi @PVA, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Jason Lightfoot edited

One way would be to push all tokens onto list and then pull them in the desired order.

order-tokens-with-list-fm.fsm

Note that the option Allow Multiple Pushes Before Back Order Fulfillment should be active, so the pulling token waits until all tokens were pushed (in 0s) before starting to pull any.


· 2
5 |100000

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

PVA avatar image PVA commented ·
Thank you. In the same scenario what if I want to pull only max proc_time for each type and release back orders to another flow. Is it possible?
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ PVA commented ·

A backorder is an unsatisfied pull attempt - so you can timeout a pull to release that.

If you want to pull the remaining values by type then just use a crazy high value for the request number and 0 for the required number of the pull. Then release the values in the array to your alternative activity.

Also note that you can push an array of values at once.

0 Likes 0 ·

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.