I have a queue which receives two type of items. I'd like to get access to the quantity of a specific type of items that's been recieved by the queue. Any help ?
I have a queue which receives two type of items. I'd like to get access to the quantity of a specific type of items that's been recieved by the queue. Any help ?
You can use the Statistics Collector to make the table you need. From there, you can access the values with the Table API, or make a dashboard chart:
Table("StatisticsCollector1")[1][2] // would give back 58 in this case
Here are the steps I used to make the stats collector:
Those are pretty brief steps, but hopefully, you can follow along using the attached model. I made the model in 19.0, because Statistics Collectors can sort values in 19.0. I have attached the equivalent model in 18.0 as well.
Thanks a lot ! I think I couldn't explain well what I'm looking for. I have a queue connected to a processor as in your example I want to close the input of the processor once a quantity of a specific type of items has been processed. I want to get access to this quantity so I can put it as a conditipn to close the port of the processor as we do when we write current.subnodes.length to get the current content of an object.
Are you writing code in one of the Queue's triggers?
Yah on OnEntry trigger but couldn't find a way to get the current content of one type item in order to use it as a condition to close the input
The way I would do it is to add labels to the Queue to keep track of those numbers (see below).
Of course the easiest way would be to just look at the Statistics in the Quick Properties window for the Queue information that you are wanting.
Attached is the model file so that you can see what was done. If you have any questions or problems, please let us know.
Thanks.
Thank you so much but the file aint open I got a message saying that tree file is not compatible with the version I have (I'm working with flexsim 2018)
@Adam J could you please verify the complete answer for the problem in screenshots as the file cannot be opened
Well, I'm looking for an expression ( like current.subnodes.length ...) that allows me to get access not to the current content of items in object but to the current content of a specific type of items already been defined ( setlabel/value..)
@Adam J, There isn’t any method, that does what you want to achieve, like count or add up a label in the content of an object.
Jeff shows the classic approach:
Jordan has presented a similar approach in the statistic collector looping through all values of the collectors table.
You can replace the for-loop in his answer by a query.
Alternatives are:
11 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