question

CJY avatar image
0 Likes"
CJY asked Jeanette F commented

Queue sequence

To assign a sequential number to an object when enqueuing it, and decrement the sequential numbers of subsequent objects as the frontmost object is dequeued in a queue.

How should I set up this logic?

FlexSim 18.0.10
queuing
· 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 ·
Try it with array arithmetic.

new objects get a value of array length + 1,

leaving objects decrement each element by 1.

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @CJY, was Joerg Vogel'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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

Use rank property of treenode Flexscript class api.

5 |100000

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