question

Anni Y avatar image
0 Likes"
Anni Y asked Anni Y commented

Re-arrange tockens

Hi,

In the process flow, I generate, e.g., 1000 tokens, and give each of them a label called "ID", which the value is its index number. Now, they are in the sequence: 1,2,3,...,1000. What could I do to re-arrange them and have them in this sequence: 1,101,201,301,...901, 2,102,202,...,902, ......, 99,199,299,...,999, 100, 200,...,1000?

Thanks!

FlexSim 22.2.2
processflowlabelstokenssequence
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
You know to prevent such a problem you can set your first element of a class to 0 or 1. [0..999] or [1..1000].
0 Likes 0 ·
Andrew O avatar image Andrew O commented ·

Hi @Anni Y, 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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Anni Y commented

You could split the ID value in two parts, the first number and the last two. Then use those to order the entry into a zone with a max content of 1.

1668584415045.png

1668584426183.png

Though you could also just use similar expressions to create the label values in the wanted order directly.

1668584484916.png

LabelOrder.fsm


1668584415045.png (15.0 KiB)
1668584426183.png (11.2 KiB)
1668584484916.png (5.5 KiB)
labelorder.fsm (118.4 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.

Anni Y avatar image Anni Y commented ·
Thank you so much for the solution!


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.