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 12-18-2012
mearjun mearjun is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 123
Downloads: 5
Uploads: 0
Thanks: 27
Thanked 19 Times in 11 Posts
Rep Power: 119
mearjun will become famous soon enough
Default Is it possible to save a model in steady state?

Here's what I need... I run an emergency department model and the model begins empty.. I run the model for some time and calculate when it reaches steady state.. that is when wait times and average length of stay becomes steady..
Now some how I want to save this model after it reaches steady state so that next time I open it it opens pre-loaded with patients and not empty as in time 0.. Is it possible to do somehow ?
  #2  
Old 12-18-2012
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

File > State Files > Save State
The Following User Says Thank You to Phil BoBo For This Useful Post:
mearjun (12-20-2012)
  #3  
Old 12-20-2012
mearjun mearjun is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 123
Downloads: 5
Uploads: 0
Thanks: 27
Thanked 19 Times in 11 Posts
Rep Power: 119
mearjun will become famous soon enough
Default

Thanks Phil.. I tried to save the state but it crashes every time I run it.. Plus it does not identify a bunch of global variables all of a sudden... Is there some fix to this.. I am using Flexsim 6 with windows 8
  #4  
Old 12-20-2012
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

This appears to be a bug in how global variables' states are restored. We'll look into it.

If you load the model (fsm) before loading the state (fst), then the global variables should work correctly.
  #5  
Old 12-21-2012
mearjun mearjun is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 123
Downloads: 5
Uploads: 0
Thanks: 27
Thanked 19 Times in 11 Posts
Rep Power: 119
mearjun will become famous soon enough
Default

I did that too.. the error message is gone but if I want to run the model further it starts from time 0 again
  #6  
Old 12-21-2012
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

Can you post an example? I'm testing with the attached model and state and it seems to be functioning properly.
Attached Files
File Type: zip test2.zip (78.5 KB, 69 views)
  #7  
Old 12-23-2012
mearjun mearjun is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 123
Downloads: 5
Uploads: 0
Thanks: 27
Thanked 19 Times in 11 Posts
Rep Power: 119
mearjun will become famous soon enough
Default

Here is my model.. Please check whats wrong here.. After loading the state and hitting run it begins back from 0...
Attached Files
File Type: zip Final Working Model.zip (2.30 MB, 69 views)
  #8  
Old 12-23-2012
mearjun mearjun is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 123
Downloads: 5
Uploads: 0
Thanks: 27
Thanked 19 Times in 11 Posts
Rep Power: 119
mearjun will become famous soon enough
Default

I tried it a few more times.. every time there is a new issue. Sometimes it does not load.. some times it loads but does not identify variables...as in the attached model.. The multiprocessors do not seem to call in the operators and there is a pile of items in the queue... even in the one that you have uploaded there is an error message when u load state on to the model..

PS: i really need this to work.. Without this all my work will be waste... !!!
Attached Files
File Type: zip Final Working Model1.zip (3.08 MB, 69 views)
  #9  
Old 12-29-2012
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

There's no error message in Phil's example that I can see unless you load the saved state twice - then you can get this in the system console, but I'm not sure that it's a problem:
time: 139.683295 exception: int linkedlist::clear() #2
exception: int linkedlist::clear() #2

As for your model, it looks like the saved state contains events that are earlier than the time you saved the state. Again not sure if that's a problem or why it's happening.
  #10  
Old 01-01-2013
mearjun mearjun is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 123
Downloads: 5
Uploads: 0
Thanks: 27
Thanked 19 Times in 11 Posts
Rep Power: 119
mearjun will become famous soon enough
Default SOLUTION FOUND

There is a simple way to do this.. the steps (if u wish to save state) are:
1.) save the model b4 running it if u have made any changes.
2.) run the model
3.) save state
4.) close model but do not save it this time.

Next time when u load the state it will load and run properly...
The Following User Says Thank You to mearjun For This Useful Post:
Jason Wills (01-14-2013)


Thread Thread Starter Forum Replies Last Post
Cannot save a model as an XML file Vadim Fooks Q&A 1 05-10-2012 06:17 PM
Error message when I try to save a model. Ger Finan Q&A 1 04-29-2012 06:22 PM
SAve and restore the state of the model during a simulation run Stephan Seidel Q&A 3 04-16-2012 08:50 AM
update flexsim 5.10,can not save model LINWEIXU Q&A 5 01-31-2011 07:11 AM
Collect data from steady state period (Recorder, VisualTool Thirapan Kangwansura Q&A 1 05-19-2010 06:18 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.