ATTENTIONThis FlexSim Community Forum is readonly. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobilefriendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threadedconversationstyle forum like the one below, so be sure to read our Answers Best Practices. 
flexsim.com 

Downloads 
Q&A Using Flexsim and building models 
#1




How to get interval average,max,etc of a queue content ?
I want to get the interval average,max,etc of a queue content ?
An interval is 3600 seconds and I have 3 interval. I use Recorder and check the interval. But it only give one data(I don't know if it is one interval data), not three interval data. I hope someone here give a solution. I need it urgently. Thanks. Sorry for my english. 
#2




Qin Tian,
I built a small model called Sample_IntervalQueueResults_TD and can be found in the Downloads Section under User Concept Models. I hope that this model gives you some hints and help. Good success. tom the (A)tom
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." 
#3




Thanks, David. But I think the second interval' avg and max isn't correct in your model. They should be calculated using only data in that interval.
I think we should clear statistic data of queue at the begining of every user event, but I don't know how to do it. 
#4




Qin Tian,
There is a command called resetstats() which resets the statistics of the whole model. I am not sure if this will solve your problem, because all models statistics will be reset. I guess this is not the way to go, but could be a quick solution. So I guess what need to be done is to collect the statistics in the interval in an extra Global Table (IntervalResults) with an extra User Event (CollectIntervalData). One question is which event time and repeat time to use. A short time will collect a lot of data but will be more precise. Anyway, on the User Event CollectIntervalData it’s necessary to calculate the results from the Table IntervalResults. After collecting the results and write them in the GobalTable QueueResults reset the IntervalResults Table and set the pointer to the row to 1 again. So now it starts to collect the results for the next interval. I think that’s the way to go. Unfortunately I do not have time to modify my model in the moment and I am not sure when I will find time to do it. Maybe you can try to build this in by yourself and if you have questions you can ask again or post the state of you model and the Community can have a look into it. Good success. tom the (A)tom
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." 
#5




Qin Tian,
As said in another thread, I took the time to implement the above described stuff. So I uploaded the model “Sample_IntervalQueueResults_TD.fsm” again with these changes. The model can be found in the Download section under User Concept Models. I hope this model does what you expect. If you have any further questions or need some more hints, please let me know. Good success. tom the (A)tom P.S.: Because I use Flexsim v4.30 now, this model is a v4.30 model.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." 
#6




Tom, thanks for your help.
Now, I upload my solution. But it have many chinese character. That's another reason I didn't upload it before. But I still think the function should be implemented in the Recorder. Because if you have many data to calculate, do it like this need too many time. 
Thread  Thread Starter  Forum  Replies  Last Post 
a question on queue  KelvinHo  Q&A  15  11092011 07:16 AM 
Queue Sorting  Jeff Nordgren  Q&A  12  05222008 03:21 PM 
Does there exist a function that can calculate the time weighted average of a value in a Global tabl  qin tian  Q&A  4  01202008 07:01 PM 
Queue stacking  Paul Dowling  Q&A  2  11272007 11:57 PM 