question

Yifei Wang avatar image
0 Likes"
Yifei Wang asked Sam Stubbs commented

Machines are down when queues reach maximum flowitems allowed.

Hi,

I would like to set up the maxcontent of Connection_Queue and let Processors1, 2,3,4 and 5 go on downtime when Connection_Queue has reached its maximum flowitems allowed. Then. as Processor_1 continues to process items, items in Connection_Queue will be under maxcontent. At that moment, Processor 1,2,3,4 and 5 should be up again. Could you please let me know how I can achieve this? question1.fsm

FlexSim 16.1.0
down time
question1.fsm (17.5 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.

Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered Sam Stubbs commented

The max content for a queue is set in the property window of the Queue, under the first tab (the "Queue" tab) There is a field where you can set the max content there. By default the processors won't push items into the queue while it is full with max content, until the items flow. So it should work as you are wanting it to by default, unless I'm misreading your question.

· 2
5 |100000

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

Sam Stubbs avatar image Sam Stubbs ♦ commented ·

Of course there are ways you could have the processors stop for a period of time based on the items within the queue. So on the OnEntry Trigger of the Connection_Queue write out a code something like this:

if (content(node("Connection_Queue", model())) >= 1000) {
stopobject(node("Processor1", model()));
stopobject(node("Processor2", model()));
stopobject(node("Processor3", model()));
stopobject(node("Processor4", model()));
stopobject(node("Processor5", model()));
}
Where 1000 represents the number you'd like to set as it's max content. Then on the OnExit Trigger write a similar code to have processors resume:
if (content(node("Connection_Queue", model())) <= 800) {
resumeobject(node("Processor1", model()));
resumeobject(node("Processor2", model()));
resumeobject(node("Processor3", model()));
resumeobject(node("Processor4", model()));
resumeobject(node("Processor5", model()));
}
Where the 800 represents the amount of items the Queue should get to before the processors resume their processing.
1 Like 1 ·
jing.c avatar image jing.c commented ·

Haha, After reading your answer, perhaps I'm making too much of this question.

0 Likes 0 ·
jing.c avatar image
3 Likes"
jing.c answered

Hi Yifei

You can use a "for" loop to stopobject() all the inobjects of Connection_Queue when it get the maximum, and resumeobject() them after any item leave this queue(which make "Connection_Queue will be under maxcontent")

I attach a model in which I set the maxcontent of Connection_Queue to 10.

Hope it helps

question1bychj.fsm


question1bychj.fsm (16.6 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.