ATTENTIONThis FlexSim Community Forum is read-only. 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, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
Recorder Histogram Problem
When using the recorder to generate a histogram, the value on the Y-axis (number or "hits" recorded for the tallest bar in the histogram) was way too large. Discussing this with Alex Christensen, he confirmed that there's a problem - there's a histogram entry every time there's an event in the model!
Alex supplied a work-around (which I haven't had time to implement yet). Last edited by Alex Christensen; 07-17-2008 at 11:31 AM. Reason: got rid of "Contact him directly for more information." |
#2
|
|||
|
|||
My solution was to use a global table to keep track of the histogram data, then when I want to add a hit to the histogram, I just increment the proper row with something like this (from the OnExit trigger in the sink):
Code:
/**Custom Code*/ treenode item = parnode(1); treenode current = ownerobject(c); int port = parval(2); double throughtime=time()-getcreationtime(item); double bucketsize=15;//this is manually adjusted to fit the data int row=2+throughtime/bucketsize;//2 because 0 should go in the first bucket, which is row 2 because row 1 is underflow inc(gettablecell("myhistogram",min(row,12),1),1);//12 because there are 10 buckets plus underflow and overflow |
#3
|
||||
|
||||
Bennet,
Can you post the model you were having problems with? It may be something more simple than a bug. Brandon
__________________
thats not normal. |
Thread | Thread Starter | Forum | Replies | Last Post |
problem of recorder | qin tian | Q&A | 5 | 09-27-2008 10:42 PM |
Accessing Data of a Recorder and Referencing Nodes in the Tree | Jan Brandau | Q&A | 5 | 04-22-2008 07:05 AM |
Recorder automatic export | Stephanie Giovannini | Q&A | 3 | 03-19-2008 04:52 PM |
I want Recorder to collect interval statistics | qin tian | Gripes and Goodies | 13 | 03-03-2008 06:43 PM |
Display Labels with the Recorder | tsconcept | Q&A | 9 | 09-26-2007 08:16 AM |