ATTENTIONThis 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 |
|
Downloads |
Gripes and Goodies Software problems and suggestions |
#1
|
|||
|
|||
Keeping run speed after closing the model
When I close my model and open again the run speed is always reset to 4.
If there is a fixed run speed for this model it is possible to code it e.g. in the OnModelOpen trigger. But I think the run speed is not model specific but depends on the situation (presentation, experiments, ...). I would prefer a solution which restores the last value for run speed. Lydia |
#2
|
||||
|
||||
The Run Speed is set in Main://project/exec/step and will not be saved in the model. But you can save the run speed within a model with labels.
I've build a small example which stores the run speed in a label. Just push "Y" to save the run speed and every time the simulation restarts the run speed will loaded from a label "runspeedflag". You have to save the model if you want to keep the last saved speed. Carsten |
The Following 3 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Tom David (04-30-2009) |
#4
|
||||
|
||||
Lydia, Carsten,
Another way to do this is to put the following line of code in the On Model Open trigger. The trigger can be located in the Tools-> Model Triggers -> On Model Open Menu. runspeed(10); Where 10 is the speed I want the model to be set to. Carsten has shown a cleaver and good way of implementing a way to save the runspeed to a label. If you wanted another way to do this using the model triggers, so that you didn't have to conciously save the speed. You could use the On Reset or On Run Stop triggers to store the value every time. This way everytime the model was reset or stopped the current speed would be saved. You do have to remember though that in all three cases if you don't save the model then the speed is not saved as well. If you don't want to save the speed on a particular object you can create a node in the Tools object and store the number there. You can then set and retrieve the number with the setnodenum and getnodenum commands. Good Luck, Brandon
__________________
thats not normal. |
The Following User Says Thank You to Brandon Peterson For This Useful Post: | ||
Lydia Franck (05-06-2009) |
#5
|
|||
|
|||
Carsten and Brandon,
thank you very much indeed!! You can even use the OnModelOpen trigger instead of a UserEvent so that the correct run speed is displayed already before pressing Run. Thanks again and best wishes, Lydia. |
Thread | Thread Starter | Forum | Replies | Last Post |
Model Speed | Alistair Smitheman | Q&A | 14 | 04-06-2009 12:45 PM |
Keeping the Ortho View Window in the background? | Nico Zahn | Q&A | 4 | 03-10-2009 10:16 AM |
Is the CPU usage depending on run speed? | Tom David | Q&A | 1 | 07-29-2008 01:25 PM |
What Slows Down Model Speed? | Xavier Jackson | Q&A | 1 | 06-26-2008 09:09 AM |
Increasing Run Speed | Alex Christensen | Tips and Tricks | 3 | 05-14-2008 04:11 PM |