Page 629 - ExtendSim User Guide
P. 629

Model Execution 603
Running a model
Blocks that control or monitor simulation runs
In addition to the menu commands and toolbar buttons, several blocks provide customized control over the simulation run. As is true for other blocks, you can clone dialog items from these blocks onto the model worksheet as discussed in “Cloning” on page 582.
Buttons (Utilities library)
Creates buttons to activate frequently-used commands such as running a simula- tion, opening a Notebook, and saving the model. Since this block is most often used to create a user interface for a model, it is discussed in “Creating a dash- board interface” on page 584.
Pause Sim (Utilities library)
Pauses the simulation when certain conditions are met. This gives more flexibil- ity than cloning the Buttons block’s Pause Simulation button (discussed on
page 585). Give the command Run > Resume or click Pause/Resume to continue execution. See also “Stepping through a model” on page 600
RealTimer (Utilities library)
Reports information about simulation run times. It should be placed at the far right on the model worksheet. Reports the duration of the simulation run(s) as well as the proportion of run time each block used. At the conclusion of the run, its dialog opens to display the run duration in hours, minutes, seconds, tenths of
seconds and ticks (sixtieth of a second). Block profiling information is stored in a database table.
Run Model (Utilities library)
Runs the simulation when the Run Simulation Now button is pressed. The options in this block give you more flexibility than cloning the Run Simulation button from the Buttons block (discussed at “Buttons” on page 585.)
Time Sync (Utilities library)
Synchronizes the model to run in real time. It does this by pausing on each simu- lation step until the amount of simulation time that has passed equals the amount of real time that has passed. This is only effective if the model is running faster than real time. If the model is running slower then real time, the block will have
no effect. The timing starts at the beginning of simulation execution after all of the blocks have been initialized.
Saving intermediate results
There may be occasions when you need to pause a simulation before it’s finished running and save it to continue at a later time. For example:
• To interrupt a long model run when you need to shut down your computer
• Toresumeasimulationafterastartuporwarm-upperiod
• For debugging: pause just before the bug occurs and continue multiple times to try to track down the bug
• To change the random numbers after the model has run for an amount of time To pause a running model and save it for continuation later:
How To


































































































   627   628   629   630   631