Control process using queue size

Control process using queue size

talia_z
Not applicable
1,368 Views
4 Replies
Message 1 of 5

Control process using queue size

talia_z
Not applicable

[ FlexSim 17.2.5 ]

I would appreciate help fixing my control logic. When the truck enters "Combiner 1" it will closeinput on the separator. When the "Bottles" queue > 90, I aim to send a message to "Queue2". On this message, "Queue2" will closeoutput. Then, OnExit of "Queue2" the separator will openinput. I believe I need to openoutput on my "Queue2", but am not sure how to do this without disturbing the other logic.

My aim is to control when the separator gets a new truck based on two parameters; both of these need to be satisfied for the separator to receive a new truck. (1) "Bottles" queue size < 90 and (2) "Combiner1" is empty

Is there a better way to do this using only a send message control on the "Bottles" queue? I am not sure how I would write the (2) parameter. Thank you very much for your help!

16724-bottle-queue-control.png

16725-combiner1.png

16730-queue-2.png

16727-queue2-2.png

bottle-unloader-process-v8.fsm

0 Likes
Accepted solutions (1)
1,369 Views
4 Replies
Replies (4)
Message 2 of 5

talia_z
Not applicable

@Joshua S -- I have tried a different method to solve the issue I posted about in the previous question

0 Likes
Message 3 of 5

tanner_p
Not applicable
Accepted solution

I would use the following code for the second parameter in your question. I'm not sure the timing of everything and if it's all going to work, but hopefully this helps get you started.

model().find("Combiner1").as(Object).subnodes.length == 0<br>
0 Likes
Message 4 of 5

talia_z
Not applicable

@Tanner Poulton Thank you, that's very helpful! If I send a message and use your code and the code below as parameters, will that ensure that the message is only sent when both parameters are met? Also, would you mind telling me if the code written below is correct?

model().find("Bottles").as(Object).subnodes.length<90
0 Likes
Message 5 of 5

jeff_nordgren
Not applicable
@Talia Z

The code you wrote appears to be syntactically correct. It seems like it would be part of an "if" statement or similar? The code would return the Object Bottles and check to see if Bottles has a content less than 90. The way you use the code in your model may or may not work, depending on how your code is used, specifically.

Thanks.

0 Likes