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
Downloads

Q&A Using Flexsim and building models

  #1  
Old 07-04-2011
Stefan Trabut Stefan Trabut is offline
Flexsim User
 
Join Date: Mar 2011
Posts: 29
Downloads: 12
Uploads: 0
Thanks: 34
Thanked 5 Times in 5 Posts
Rep Power: 115
Stefan Trabut is on a distinguished road
Default Reset stats for a single object

Hi,

is there a command like resetstats() which resets only a single object? (I would like to reset the state graph).

Thanks!
  #2  
Old 07-04-2011
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

If it's just the states, try this - just replace so() with your object:

treenode target=so();
set(state_since(target),time());
forobjectlayerunder(state_profile(target))
set(a,0);
The Following 3 Users Say Thank You to Jason Lightfoot For This Useful Post:
Stefan Trabut (07-05-2011)
  #3  
Old 07-27-2011
Stefan Trabut Stefan Trabut is offline
Flexsim User
 
Join Date: Mar 2011
Posts: 29
Downloads: 12
Uploads: 0
Thanks: 34
Thanked 5 Times in 5 Posts
Rep Power: 115
Stefan Trabut is on a distinguished road
Default content history

Thanks!

Is there also a way to reset the content history of a queue? (I would like to reset the content history graph)

Thanks!
  #4  
Old 07-27-2011
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

Just the graph would be :

treenode target =so();
clearcontents(stats_contentgraph(target));

but to reset the related content stats you'll need to include:
int num=content(target);
set(stats_contentmin(target),num);
set(stats_contentmax(target),num);
set(stats_contentavg(target),num);
set(stats_contentupdates(target),0);
set(stats_contentsince(target),time());

Then for the staytime stats it's:

set(stats_staytimemin(target),GLOBAL_DELAYINDEFINI TE);
set(stats_staytimemax(target),0);
set(stats_staytimeavg(target),0);
set(stats_staytimeupdates(target),0);
forobjectlayerunder(rank(stats_staytimehisto(targe t),2))
set(a,0);

Last edited by Jason Lightfoot; 07-27-2011 at 07:03 AM. Reason: 1) added staytime stats 2) set contentmin and max etc 3) min staytime
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Stefan Trabut (07-27-2011)
  #5  
Old 07-27-2011
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

I updated the code since I'd not accounted for the current state in setting the content min avg etc.. Also - you'll need to wait for the first item to exit before getting a valid minimum staytime.
  #6  
Old 07-27-2011
Stefan Trabut Stefan Trabut is offline
Flexsim User
 
Join Date: Mar 2011
Posts: 29
Downloads: 12
Uploads: 0
Thanks: 34
Thanked 5 Times in 5 Posts
Rep Power: 115
Stefan Trabut is on a distinguished road
Default User-defined recorder

Thanks!

Sorry to be picky: I would like the content graph to not only have e.g. 100 entries, but to cover the whole simulation, therefore I think I need a user-defined recorder. I just found out that the user-defined recorder records the information about the queue itself. Is there a way to reset the recorder?

Thanks!
  #7  
Old 07-28-2011
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: 319
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

You could use a table as dummy. Recorder shows values of the table and you can start to fill or reset the table when ever you want.
__________________
Hemmi


Thread Thread Starter Forum Replies Last Post
Two camera on Single screen together shashanktrivedi Q&A 7 02-05-2013 01:34 PM
object disappear when reset zhang xin Q&A 1 04-02-2011 10:44 AM
Reading Stats function from global table David Chan Q&A 4 05-27-2008 08:51 AM
Canceling "Set Object Reset Position" AlanZhang Q&A 8 10-15-2007 12:04 PM
How to turn on stats history in Vista to use Record object syseo Q&A 1 09-22-2007 01:45 AM


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.