question

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

Restrict number of flowitem in a set of queue


1735809320062.pngHi in my simulation model setup I am trying to control the flow of flowitem into Queue5 and Queue8. A maximum of only 2 flowitems can be present in 1 (processor3) + 2 (Queue5) + 3 (Queue 8). Hence the moment a flowitem leaves processor 3, Queue5 or Queue8 is able to accept new flow item from Queue9. How could i set my simulation in such a way?

Line 2 17 Dec 2024_r0.fsm

FlexSim 23.1.4
flowitem routing
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

In essence, what you need to do is keep track of the current and incoming number of items and close the output of queue 9 (or input of queues 5 and 8) when it reaches the limit.

You can use a label on the processor for this purpose. The tricky part in this model is figuring out when to increment this label. Because the items are transported from Queue9 by operator and thus don't exit the queue immediately after being send to one of the other queues, more items might get send out if we were to use the exit trigger. Instead we put the necessary code into the "Use Operator" field. That code fires as soon as an item will move to another queue.

You then just need to decrement the counter label when an item exist the processor and open the output of Queue9 when the value falls below 2.

line-2-17-dec-2024-r0_1.fsm


5 |100000

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