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 06-09-2008
Paul Dowling Paul Dowling is offline
Flexsim User
 
Join Date: Aug 2007
Location: Sydney, Australia
Posts: 42
Downloads: 14
Uploads: 0
Thanks: 12
Thanked 4 Times in 4 Posts
Rep Power: 161
Paul Dowling is on a distinguished road
Default Make sure you stop model with the stop button before collecting state based statistics

For those who are unaware (like myself until today) the state based statistics will not take into account the most recent time spent in a given state (eg idle time after an operation has finished) unless the updatestates() command is called. This is called when you push the stop button, but NOT when you just slow the model time down to 0.

Regards
Paul
  #2  
Old 06-10-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: 490
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

Paul,

The update states command is also not called when you hit the pause button. The reason for this is that it can take some time for a model to update states if the model is very large and we wanted to give the users a way to pause the model without having to incure the delay. This is the reason that slowing the model speed to zero and hitting pause do not update states.
__________________
thats not normal.
The Following User Says Thank You to Brandon Peterson For This Useful Post:
Scott Mackay (10-07-2009)
  #3  
Old 06-10-2008
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

Since updatestates() acts on all objects in the model, you may want to be more selective on where and how frequently you use it. Use updatestate() if you are interested in a single object or a select few.

The long way (for further understanding of the state tree)
The updated total idle time of a single object can be obtained with the code below without using updatestate(). I am assuming in this example that "operator" is a pointer to the object we are interested in. Note that in the state tree, the state_since node is a time stamp when the object changed into its current state (when the state profile was last updated).


double totalidletime = getnodenum(rank(state_profile(operator), STATE_IDLE));

if(getstatenum(operator)==STATE_IDLE)
totalidletime += time() - getnodenum(state_since(operator));

The Following 3 Users Say Thank You to Kris Geisberger For This Useful Post:
Scott Mackay (10-07-2009)


Thread Thread Starter Forum Replies Last Post
In what cases the running simulation would stop itself? KelvinHo Q&A 1 05-08-2008 08:32 AM
How to run tasks after stop time? Fadhlullah Bin Rahmat Q&A 1 02-26-2008 04:44 PM
State Graph in Model Control GUI Tom David Q&A 4 11-21-2007 12:50 AM
Stop conveyor on loading mathiasds Q&A 2 11-20-2007 04:31 PM
Stop message with information (Debugging) Tom David Tips and Tricks 0 09-20-2007 01:10 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.