question

Rahul R avatar image
0 Likes"
Rahul R asked Rahul R commented

Zone Queue strategy

What takes priority (1) Order by statement in Queue strategy or (2) Enforce Queue Order

What I am trying to do is allow urgent tokens, then pick tokens belonging to a random order group from remaining tokens.


1665463483226.pngZone_test.fsm


FlexSim 22.2.0
zonequeue strategyzone advanced
1665463483226.png (15.2 KiB)
zone-test.fsm (36.0 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.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Rahul R commented

As far as I'm aware "Enforce Queue Order" only serves a purpose when the zone is partitioned or has subsets with limited quantities. In that case, only the token that is first in the queue can enter the zone, even though others could enter earlier because their partition would have space while the one of the first token doesn't.

If the zone is not partitioned, the queue order is always adhered to anyway.

If I understand you correctly, you are trying to let token with the "urgentFlag" enter in the order they arrive at the activity. If there are no such tokens, a random one is chosen from the non-urgent tokens.

To do that you can use a extra label that orders the urgent tokens, but is equal for all non-urgent tokens. If you then order by urgentFlag first, the extra label second and random third, this should result in the behaviour described above.

1665472730304.png

If urgentFlag is set, the "prioFIFO" label is set according to the activities input statistic (so later tokens will have a higher value). If not, the label is set to 0.

1665472824555.png

urgentOrder.fsm


1665472730304.png (26.7 KiB)
1665472824555.png (8.3 KiB)
urgentorder.fsm (153.6 KiB)
· 3
5 |100000

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