I am trying to simulate the following system.
Source -> Queue1 -> Queue2 -> Processor -> Queue3, there is also an operator in this system.
The source creates a flowitem every 5 seconds which is released to Queue1. The operator is supposed to transfer a batch 20 flowitems from Queue1 to Queue2. After the batch is unloaded at Queue2, the operator is supposed to process 1 item at a time on the Processor. The process time is 5 seconds avg. with a std. dev. of 0.5 seconds. Once the operator finishes working on the 20th flowitem, he is supposed to check if Queue1 has 20 items. If yes, the process continues, if no, he waits untill there are 20 items in Queue1.
What is the best way to accomplish this? I have tried a few things but I dont seem to get the priorities right.
Thanks in advance.