question

Claudia S6 avatar image
0 Likes"
Claudia S6 asked Jeanette F commented

how to release a queue by inventory level

Hello, I want to release the queue Buffer randomly when it has between 40-60 items (max capacity=80). I have tried with perform batches (target batch size=40) and don't flush contents between batches.

The problem is that when there are 40 items in Buffer, transporter Gruero02 starts moving items to the raks, but transporter Gruero01, who fill the Buffer, suddenly stop working, and it generates a bottle neck in the source PT Fabrica.

Please, can someone help me creating a random release of Buffer when it is between 40-60 items, but allowing Gruero01 moving items to Buffer anyway, in order to eliminate or decrease the botle neck.

Recepción Fábrica sinPCh3.fsm

FlexSim 19.1.2
queueflexsim 19.1.2
· 1
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Claudia S6, was Felix Möhlmann's answer helpful? If so, please click the red "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

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

As far as I know (and of I unterstood your question correctly) there is no predefined function for this behaviour. I build a sample model to demonstrate how something like this could be done.

Queue2 is set to not release items by itself. Instead, the release is handled by a process flow. Every time an item enters Queue2 (and in a semi-random interval) a token is created. This token then is assigned a chance (between 0 - 1) that an item should be released based on the number of items in Queue2.

In the example I use the following formula which scales exponentially from 0 to 1 for contents from 40 to 60.

0.15652*(Math.exp(0.1*(token.Queue_Content-40))-1)

This number is then compared to a random number (uniform(0,1,0)). If it is larger, an item is released from the queue via the "releaseitem()" command. You can of course play around with different functions to determine the probability until it fits your model.

Instead of only releasing a single item, you could also release every item that is in the queue at that time. A process flow block to do this is also part of the model (reroute the connection going into the "Release One" block to that one if you want to test it).

ReleaseRandomly.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.