question

Egbert avatar image
0 Likes"
Egbert asked Jeanette F commented

The items with smaller label values should be output first.

Hello,

I would like to move items from Q1 to Q2 based on the size of the "edd" label. I’m wondering if it’s possible to write the code directly in the Q1 output **sendToPort** section. I hope to achieve this without using **Process Flow or List.

I would really appreciate your advice. Thank you!


1740195983830.png

test.fsm

FlexSim 22.2.0
labelsoutputlabel value
1740195983830.png (53.7 KiB)
test.fsm (27.3 KiB)
· 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.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

Your request only really makes sense if the first queue builds up a backlog of items or if it's known beforehand which items will be created so the queue could hold items and wait for future ones.

For the first case, you can use the "Sort By Expression" option for the OnEntry trigger (under "Control"). Or use a list as Jörg suggests.

test(8).fsm


test8.fsm (27.7 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.