Hello, I would like to know how to make my source send only my queue is empty. I have a stock of 10,000 tags but I want them to appear in the queue only in increments of 500. How do I do this? Thanks
Hello, I would like to know how to make my source send only my queue is empty. I have a stock of 10,000 tags but I want them to appear in the queue only in increments of 500. How do I do this? Thanks
Close the input of the queue when you reach an input increment of 500. If your queue gets empty you open the input again. The last item leaving a queue is still counted as inventory stock when you check the content of a queue. This mean you check, if current.subnodes.length is one and not zero to identify an empty queue. [current is a reference to the queue, if you add a code snippet into a this queue trigger]
Thank you for your reply,
I think I understand a little bit, but I'm still a beginner so I'm not totally following your instructions. Could you be more precise about the "add a code snippet into a this queue trigger"?
Here are the parameters of the queue, what should I do at this level in the input?
Thank you very much for your help.
Hi @Levi P,
Once you have opened the properties for the queue, you can select the trigger tab at the bottom of the options. The little green plus sign allows you to specify what trigger will cause your specified action to occur.
Once you have selected what trigger to use, you can then select what will occur when the trigger is activated.
In this case you will want to use the code snipped option to write the code that will check the current content of the queue. @Joerg Vogel, explained what code will work best for what you are doing. You may need to set a trigger for on entry as well as on exit so that you check the current queue content even when nothing is entering the queue.
Thank you very much for your help! Really !
So, I know my programming basics are far away, it will come back to me slowly. I'm in the code snippet of the queue and I have to tell it "you close Input when current.subnodes.length is at its max content and you open once current.subnodes.length ==1 "
Is that right? I just don't know how to rewrite this in code anymore.
Thanks again for your help! I really need it for my jury in a month, I have to present my project. I'm glad you are so active.
There is actually a pre-defined option for closing/opening the ports of objects. You then only have to fill in the condition.
If you want, you can then inspect the code that gets pasted into the trigger by selecting the option to see how it works.
The grey parts are just markup used by the GUI. The rest would work the same if you were to put it into a code snippet.
14 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