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 > Tips and Tricks
Downloads

Tips and Tricks Share helpful modeling ideas

  #1  
Old 11-21-2013
David Chan David Chan is offline
Flexsim Distributor
 
Join Date: Sep 2007
Posts: 326
Downloads: 74
Uploads: 0
Thanks: 217
Thanked 73 Times in 44 Posts
Rep Power: 218
David Chan has a spectacular aura aboutDavid Chan has a spectacular aura aboutDavid Chan has a spectacular aura about
Default Display Time In System

Hi

We used to use VisualTool to show the average staytime of a flowitem in the model. Now we have the TimeInSystem as tracked variables for each flowitem. Besides using code to work out the average TimeInSystem, is there a simpler way to show that in the Dashboard using Text?

Simpler means I don't have worked out myself, but there is an available variables that I just have to choose just as Average stay time.

Thanks

David
__________________
Advent2 Labs
David
  #2  
Old 11-21-2013
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: 1174
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

I've added an item to the development list to create Min, Max, and Average Tracked Variable stats for the Dashboard.

In the mean time, you could use a Model Documentation dashboard stat object and display the calculated average of the tracked variable. Attached is a model that shows how this can be done.

You can find the average of a tracked variable by using the getdatastat() command like this:

Code:
treenode timeInSystem = node("/Tools/TrackedVariables/TimeInSystem", model());
int numEntries = getbundlenrentries(timeInSystem);
if (numEntries > 0)
     return getdatastat(STAT_MEAN, numEntries, getbundlevalue(timeInSystem, count - 1, 1));
else return 0;
Attached Files
File Type: fsm average_time_in_system.fsm (15.0 KB, 389 views)

Last edited by Phil BoBo; 04-13-2015 at 03:35 PM.
The Following 10 Users Say Thank You to Phil BoBo For This Useful Post:
Tom David (12-02-2013)
  #3  
Old 11-30-2013
David Chan David Chan is offline
Flexsim Distributor
 
Join Date: Sep 2007
Posts: 326
Downloads: 74
Uploads: 0
Thanks: 217
Thanked 73 Times in 44 Posts
Rep Power: 218
David Chan has a spectacular aura aboutDavid Chan has a spectacular aura aboutDavid Chan has a spectacular aura about
Default

Hi

I found that the export function for both TimeInSystem and QuantityInSystem is not working. Is there another way export the data?
__________________
Advent2 Labs
David
The Following User Says Thank You to David Chan For This Useful Post:
Jason Lightfoot (11-30-2013)
  #4  
Old 11-30-2013
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

Here's a workaround for now but only for a single tracked variable.

Make the tracked variable bundle you want to export so() (they're in /Tools/TrackedVariables) and then run this script:

string startDir = modeldir();
if (stringlen(startDir) < 4) startDir = documentsdir();
string filePath = getfilebrowse("*.csv", "Comma Separated Format", "", startDir, 1);
treenode tvar=so();
exportdataset(tvar, filePath, DATATYPE_BUNDLE);
fileopen(filePath, "a");fpr();
fpt(concat("End of ",getname(tvar)));fpr();
fileclose();

Last edited by Jason Lightfoot; 11-30-2013 at 06:03 PM.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Tom David (12-02-2013)
  #5  
Old 12-02-2013
David Chan David Chan is offline
Flexsim Distributor
 
Join Date: Sep 2007
Posts: 326
Downloads: 74
Uploads: 0
Thanks: 217
Thanked 73 Times in 44 Posts
Rep Power: 218
David Chan has a spectacular aura aboutDavid Chan has a spectacular aura aboutDavid Chan has a spectacular aura about
Default

Just realized another way of capturing the data is using the Experiment but we need to have the TimeInSystem Vs Time setup in the Dashboard. At the Experiment, we choose that as the PFM using average. That should provide us with the Average TimeInSystem.

Any comment?
__________________
Advent2 Labs
David

Tags
dashboard, time in system


Thread Thread Starter Forum Replies Last Post
Interpreting System Console FlorianK Q&A 3 03-26-2013 10:34 AM
Tracked Variables, Time in System usage Peppino Q&A 4 06-26-2012 10:25 AM
Average Stay Time error in Rack by display in dashboard Peppino Gripes and Goodies 5 06-09-2012 03:35 AM
System and Line controllers? George Serhan Q&A 2 01-31-2012 05:58 AM
How can i get the total time of process in the system wilmermoncada Q&A 3 11-29-2009 01:44 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.