How can I sum the quantity of two queue?

How can I sum the quantity of two queue?

eileen_maria_b
Not applicable
10 Views
2 Replies
Message 1 of 3

How can I sum the quantity of two queue?

eileen_maria_b
Not applicable

[ FlexSim 20.2.0 ]

I need to get the source to feed until the sum of two given queues equals a specific number

Model.find ("Queue1"). Subnodes.length == 50

With the above, I managed to make the source stop power when queue 1 = 50, but I need it to stop when queue1 + queue 8 = 100

Thank you

0 Likes
Accepted solutions (1)
11 Views
2 Replies
Replies (2)
Message 2 of 3

raja_sekaran
Not applicable
Accepted solution

@Eileen Maria B

I have built the sample model and attached it here. In this model, closed the output of the source object when both queues reach the sum of the required quantity (100) in the onCreation trigger of the source object. If you want to open the output port again, you can send a message to the source object to open the output port based on the consumption.

33412-queuelength.png

Let us know if this is what you are looking for.

QueueLengthSupport_v1.fsm

Edit: I have added a sample model (v2) to release the flow item from the queue and open the output of the source based on that. Check this out and let me know if this approach works for your need.

QueueLengthSupport_v2.fsm

Thanks

Message 3 of 3

eileen_maria_b
Not applicable

He logrado que la se alimente hasta la cola1 + cola8 = 100, pero ahora, ¿Cómo puedo lograr que una vez que la suma de estos dos disminuya a 50, la fuente reanude la energía?

33422-1602789331690.png

Gracias

@Raja Sekaran

0 Likes