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.

Joerg Vogel avatar image Joerg Vogel commented ·
Send to port gets evaluated right after an on entry event. A result is stored at the tested item. What you want is to delay releasing events in the event list. Yes, this is possible for very advanced programmers in FlexSim.Instead I suggest to build a Process Flow logic to hold all items, store them on a list, pull them from this list, call a releaseitem command on a pull result.
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Egbert, 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

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.