question

Tobias T2 avatar image
0 Likes"
Tobias T2 asked Braydn T commented

Content limit in a Queue for different products

queue.fsmI would like to use one Queue for two different products. Besides, I would like to limit the content for both products. The Queue can contain 720 products (type 1) or 340 products (type 2). I failed to use one Queue and restrict the maximum content for the different products. I have two Queues in my model. Each product type has its own Queue. The problem is that the Processor fills the two Queues, although I would like to limit the content, because there’s not enough storage for both products. Is there a possibility to limit the storage for the different products?

FlexSim 19.2.1
queuemax content
queue.fsm (27.8 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

Cliff King avatar image
0 Likes"
Cliff King answered Braydn T commented

One way would be to use the Pull Strategy and Pull Requirement fields of the Queue to control entry to the Queue based on the current number of each product type already in the Queue and the product type of the item trying to enter the Queue.

Another way would be to continue using two separate Queues for each product type, but then control flow into the two Queues using stopinput() and resumeinput() commands based on the total content of both Queues.

· 6
5 |100000

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

Tobias T2 avatar image Tobias T2 commented ·

Hi,

thank you a lot for your help! I don’t find “stopinput“ and “resumeinput“ in the pull settings oft he queue. Do I have to edit the code directly?

0 Likes 0 ·
tannerp avatar image tannerp Tobias T2 commented ·

The stopinput() and resumeinput() commands can be placed in Triggers or Custom Code activities (Process Flow). I've added an example of this in your model.

queue-update.fsm

0 Likes 0 ·
queue-update.fsm (32.1 KiB)
Cliff King avatar image Cliff King Tobias T2 commented ·

Tobias, take note of the edits I made to my original reply because I made some corrections! Cliff

0 Likes 0 ·
Tobias T2 avatar image Tobias T2 commented ·

Thank you very much for your example! Do I understand it right that your example was for one queue and I have to repeat the steps for the 3 other queues?

0 Likes 0 ·
tannerp avatar image tannerp Tobias T2 commented ·

@Tobias T2,

Sorry for the delayed response. You are correct. Because the Event-Triggered Source is listening to one queue ("Queue Product 2~2", as shown below), the token label "Queue" is only going to reference the queue that is listened to. You will need to set up flows to listen to and control the correct queues in addition to the one I made as an example.

0 Likes 0 ·
token-queue.png (13.9 KiB)
Braydn T avatar image Braydn T tannerp commented ·

Did this answer help you? If so, could you please accept it? If not, could you let us know what else we can do to help you? Thanks!

0 Likes 0 ·