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 > Q&A
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2014
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 313
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default 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
Reply With Quote
  #2  
Old 01-13-2014
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 636
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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
Reply With Quote
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post:
Sebastian Hemmann (01-13-2014), Tom David (01-13-2014)
  #3  
Old 01-13-2014
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 729
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

Phil also posted a useful solution here.
Reply With Quote
The Following 2 Users Say Thank You to Anthony Johnson For This Useful Post:
Jörg Vogel (01-14-2014), Sebastian Hemmann (01-14-2014)
  #4  
Old 01-14-2014
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 636
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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 documentation window looks a bit strange after you have made some changes in the code. It shows the source code directly . Then double click in the document window to edit it. Apply the changes in the window.
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
Reply With Quote
The Following 4 Users Say Thank You to Jörg Vogel For This Useful Post:
Carsten Seehafer (01-14-2014), Sebastian Hemmann (01-14-2014), Steven Hamoen (01-14-2014), Tom David (01-14-2014)
  #5  
Old 01-14-2014
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1168
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

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.

Attached Thumbnails
Click image for larger version

Name:	edit_code.png
Views:	132
Size:	16.1 KB
ID:	2417   Click image for larger version

Name:	edit_code2.png
Views:	131
Size:	9.8 KB
ID:	2418  
Reply With Quote
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post:
Carsten Seehafer (01-14-2014), Jörg Vogel (01-14-2014), Sebastian Hemmann (06-16-2015), Tom David (01-16-2014)
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
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


All times are GMT -6. The time now is 12:33 PM.


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