i need to do this: when queue is full send to a second port and continuum sending to the first one, when is enough stop the second one and repeat that action.
i need to do this: when queue is full send to a second port and continuum sending to the first one, when is enough stop the second one and repeat that action.
You doesn’t need a source code logic. It is a logic by design of connections. The object (A), that fills the queue has got a second connection that goes to the second object. If object A “Send to Port” function on Flow tab is set to the default option “first available”, the queue is filled first then the items are being sent to the second object, if queue is full.
I need the queue to be completely empty so that the second object stops receiving, it is not that it is sent to the second object only when it is full, but to send both until the queue is empty.
@Herodes M you have an Onreset trigger that will close the queues second port. then, have an on entry trigger that opens the port when it reaches a certain number. It will look something like this:
if(queue.subnodes == 100){
openoutput(current);
}
you will have to specify which output to open.
You can have a similar bit of code in the same trigger that will close that input again when quantity reaches 1 (because that is an on entry trigger).
You can do this in several different triggers, but those are the basics.
Hi,
Doy you know how to send an item to the queue when its content its ONLY 1 or 0 but with preference with content=1???
Hi @Ines L,
This is a Question and Answer forum, not a threaded conversation forum. As such, posting a brand new question as a comment on an old question that already has an accepted answer is not the best way to get attention and help.
Please create a brand new question. In your question body, you can link back to any previous Q&As you think might be of help to others to understand what you're trying to do.
Lean more about this and other best practices in our article about the same.
13 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved