ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Gripes and Goodies
FAQ Downloads Calendar Search Mark Forums Read

Gripes and Goodies Software problems and suggestions

Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2008
Bennett Foster Bennett Foster is offline
Flexsim User
 
Join Date: Aug 2007
Location: Landenberg, PA (near Wilmington, DE)
Posts: 6
Downloads: 0
Uploads: 0
Thanks: 4
Thanked 1 Time in 1 Post
Rep Power: 0
Bennett Foster is on a distinguished road
Default 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."
Reply With Quote
  #2  
Old 07-17-2008
Alex Christensen Alex Christensen is offline
Flexsim Technical Support
 
Join Date: Nov 2007
Location: Provo, UT
Posts: 96
Downloads: 41
Uploads: 8
Thanks: 29
Thanked 141 Times in 56 Posts
Rep Power: 294
Alex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to behold
Default

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
. Then, I used a modified VisualTool from this post (http://www.flexsim.com/community/for...read.php?t=509) to display the table if there are nonzero values in it. I clear the global table onReset (Checkbox in global table editor).
Attached Files
File Type: zip histogram.zip (44.4 KB, 311 views)
Reply With Quote
  #3  
Old 07-18-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 486
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Bennet,

Can you post the model you were having problems with? It may be something more simple than a bug.

Brandon
__________________
thats not normal.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -6. The time now is 11:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.