question

RicardoMtz avatar image
0 Likes"
RicardoMtz asked Julie Weller commented

How to configure the output and input ports of a processor to a queue?

Hello, I don't quite understand how opening and closing ports works. In this case, I have my 5 processors and my 5 queues. What I want to do is if the processor already generates 10 boxes in a Queue, the output port of the processor is closed until that the Queue is completely emptied, reopen and continue generating the boxes, could you please help me1692262844554.png

FlexSim 23.1.3
queueprocessornumber of objectsoutput and input ports
1692262844554.png (231.2 KiB)
· 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.

Julie Weller avatar image Julie Weller commented ·

Hi @RicardoMtz, was Carter Walch's answer helpful? If so, please click the "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 comment back to reopen your question.

0 Likes 0 ·

1 Answer

Carter Walch avatar image
0 Likes"
Carter Walch answered

Hi @RicardoMtz ,

portsDemo.fsm

Here is a demo model of using triggers in the Queue to close and open ports on a separator. You can apply this logic to any trigger to get the logic you want. In this example, When the content (current.subnodes.length) of the queue increases to 10, the input port of the separator is closed. You can tell a port is closed when there is a red line on the port:

1692278540730.png

Notice the red line next to the green port. This means closed

1692278824859.png

When the content of the queue decreases back to 0, the input port is opened and a new flow item enters the separator. This logic will repeat throughout the model run

ports.gif

Hope this helps!


1692278540730.png (305.0 KiB)
ports.gif (4.9 MiB)
1692278824859.png (21.0 KiB)
portsdemo.fsm (46.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.