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
|
||||
|
||||
Show tracked variable as average value
Hi,
I´m looking for a way to show a tracked variable as value (table) in dashboard. Until now Options only give a possibility to show as Time Plot or Histogramm. Does anybody have a solution for me? To explain what I´m trying to do: My model shows some TE´s and I want to display their average traveldistance per Item.
__________________
Hemmi |
#2
|
||||
|
||||
Hello Sebastian,
probably you have to write your own code. The Trackedvariable is of the datatype bundle. This array-type is created as the datatypes of classic C++. The first entry is number 0, the second number one... (I have made the classic fault to begin my querry of the bundle with 1) After building the average and setting a label you show the labelvalue as Dynamic Text in the dashboard. This Method is under Model Input. Jörg |
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post: | ||
Tom David (01-13-2014) |
#3
|
||||
|
||||
Phil also posted a useful solution here.
|
The Following 2 Users Say Thank You to Anthony Johnson For This Useful Post: | ||
Sebastian Hemmann (01-14-2014) |
#4
|
||||
|
||||
Hello Sebastian,
if you know how to write html-source-code, you can design your Model Documentation at the node model/Tools/Statistics>Model Dokumentation #/Variables/userhtml directly. In the following code you see the code of 2x2 table and the standard documentation code. The cell (1,1) contains a dynamic flexscript. It is written inside the <?flexscript [your code] ?> -Tag Code:
<h3>Model Documentation</h3> <p> Document the model... </p><p> <table> <tbody><tr> <td><p><?flexscript /*Add Flexscript. Use pt(), pd(), pf() etc. to add html)*/ int alph = 1234; pd(alph); pr();pd(time()); ?> row 1 col 1<br> </p> </td> <td><p>row 1 col 2</p> </td> </tr> <tr> <td><p>row 2 col 1</p> </td> <td><p>row 2 col 2</p> </td> </tr> </tbody></table></p><p><br></p><p><br></p> The HTML-Code is interpreted correctly. If you edit the documentation window in the editor further, press the Apply-Button otherwise flexsim doesn't update the userhtml-node. My approach is not working as I described it. When the View is changed some html-code is overwritten with a previous version from some other node in the view or model tree. There has to be an easier method to insert own html-code. Jörg Last edited by Jörg Vogel; 01-14-2014 at 08:03 AM. Reason: discover special behaviour - Method works not as described everytime |
The Following 4 Users Say Thank You to Jörg Vogel For This Useful Post: | ||
Tom David (01-14-2014) |
#5
|
||||
|
||||
You don't need to edit it in the tree.
Just double-click the Model Documentation dashboad widget to open its Properties window. Then click the Edit Code button in the bottom left corner to edit the HTML directly instead of through the WYSIWYG editor. |
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post: | ||
Tom David (01-16-2014) |
Thread | Thread Starter | Forum | Replies | Last Post |
where to see average wip? | zhang xin | Q&A | 0 | 03-17-2013 08:30 PM |
Show i/o ports, not show center ports | Bennett Foster | Gripes and Goodies | 1 | 11-05-2012 03:51 AM |
Tracked Variables, Time in System usage | Peppino | Q&A | 4 | 06-26-2012 10:25 AM |
Show global variable as line graph in Recorder | Congshi Wang | Q&A | 1 | 12-08-2010 01:22 AM |
Global variable as experiment variable | Matthias Hofmann | Q&A | 3 | 09-08-2009 09:42 AM |