question

Eileen Maria B avatar image
0 Likes"
Eileen Maria B asked Eileen Maria B edited

How can I sum the quantity of two queue?

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

FlexSim 20.2.0
flexsim 20.2.0content queuequeue length
5 |100000

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

Raja Sekaran avatar image
1 Like"
Raja Sekaran answered Raja Sekaran edited

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

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


5 |100000

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

Eileen Maria B avatar image
0 Likes"
Eileen Maria B answered Eileen Maria B edited

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?

Gracias

@Raja Sekaran


1602789331690.png (195.1 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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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