Page 636 - ExtendSim User Guide
P. 636

Model Execution
Speeding up a simulation
to an artificially short period of time. For instance, you may want to only model the time it takes the manufacturing operation to go from start-up to operating in a normal manner.
The number of simulation runs is determined by statistical sample size calculations and your modeling goals. If your goal is to estimate performance, the number of runs is determined by the required range in a confidence interval. If your goal is to compare alternatives, the number of runs is based on acceptable levels of risk.
For more information on determining the length and number of simulation runs, please refer to a simulation or statistics textbook.
Speeding up a simulation
The more complex your model, the more important it is to have it run quickly. Models become complex as you add more detail to the workings of each part, or as you run it for longer or, for continuous models only, with smaller delta time increments. Although ExtendSim runs models at extremely high speeds relative to other programs, it can never hurt to think about speed con- siderations. The following topics discuss some common reasons why a simulation might run slower than it should and how to speed it up.
Displaying data or movement
The most important thing to remember about running speed is that anything that causes the screen to update will inherently slow down your model. Tips to keep in mind include:
• Onlyuseanimationwhenyouneedit,sinceanimationwillslowyourmodeldownmorethan any other activity.
•Do not keep plotters open when running your model if you are concerned about speed. To keep a plotter closed, select the plotter’s dialog tool (shown at right). In the resulting dialog, select either Show plot at end of simulation or Do not show plot.
• ClosedialogsandNotebooksthathaveparametersupdatingwhilethemodelisrunning.
Inefficient settings or block code
In some situations the simulation settings, or a block’s code or the settings in its dialog, will cause a model to run slowly.
• Deltatime.Forcontinuousmodels,considerusinglargerdeltatimeincrementssothat ExtendSim does fewer computations. For example, if each step is a day in your model, con- sider making each step a week. Of course, this will not work with every model because some calculations are based on the number of steps and will thus be not accurate if you reduce the number of steps.
• Modelprofiling.Insomesituationsablock’scodeorthesettingsinitsdialogwillcausea model to run slowly. For example, you might have 80,000 items arriving in a Queue that is set to prioritize its inputs, or an inefficient section of code in a block you have created. ExtendSim provides two methods for profiling blocks: placing a block in the model or using a menu command:
• UsingtheRealTimerblock(Utilitieslibrary).PlacetheRealTimerblockatthefarright of the model. In its Block Profiles tab, enable block profiling and choose a location to store the report. Then run the simulation. A database table stores information about each block in the model: name, number, label, time spent executing, percentage of total time spent executing, the size (allocated memory) of the block at the beginning of the
How To

   634   635   636   637   638