question

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

The processor's input and output are connected to the same queue

test0904.fsmHello everyone, I am currently facing an issue where I pull an item from the queue to the processor for processing. After processing, the item needs to be returned to the same queue. Initially, the item's label "f" is set to 0, and after processing, the label "f" is set to 1. However, the processed item is not able to return to the queue. I would appreciate any help. Thank you!

FlexSim 24.2.0
queueprocessor
test0904.fsm (26.9 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

- The label gets reset every time the item enters the queue. It would be better to initialize the label in the On Creation trigger of the source.

- You create a deadlock. If both the queue and the processor contain their maximum content they can't release items to each other and the system becomes stuck.

What is supposed to happen to the processed items? There must be an outlet?

To prevent the deadlock, you should always leave one spot open in the queue that is reserved for items from the processor. You can do this closing the output of the source when the penultimate spot in the queue is oocupied (On Entry trigger of the queue).

test0904_1.fsm


test0904-1.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.