0% found this document useful (0 votes)
2 views

Simulation & Modeling - CH5 - Simulation Software

The document discusses the essential features and considerations for simulation software, including the advantages of using simulation packages over general-purpose programming languages. It highlights the importance of modeling flexibility, ease of use, and debugging capabilities, as well as the classification of simulation software into general-purpose and application-oriented types. Additionally, it covers desirable software features such as hardware requirements, animation capabilities, and the significance of proper error detection and reporting in simulation modeling.

Uploaded by

Bacha Lamessaa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Simulation & Modeling - CH5 - Simulation Software

The document discusses the essential features and considerations for simulation software, including the advantages of using simulation packages over general-purpose programming languages. It highlights the importance of modeling flexibility, ease of use, and debugging capabilities, as well as the classification of simulation software into general-purpose and application-oriented types. Additionally, it covers desirable software features such as hardware requirements, animation capabilities, and the significance of proper error detection and reporting in simulation modeling.

Uploaded by

Bacha Lamessaa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

1/13/2023

5.1. Simulation Software


• Several features needed in programming of most discrete-event simulation
models, including:
• Generating random numbers, that is, observations from a U(0,1)
Chapter Five probability distribution
Simulation Languages and Software • Generating random variates from a specified probability distribution (e.g.,
exponential)
• Advancing simulated time
• Determining the next event from the event list and passing control to the
appropriate block of code
• Adding records to, or deleting records from, a list
• Collecting output statistics and reporting the results
• Detecting error conditions
1 2

Cont’d
5.2. Comparison of Simulation Packages with
• The following are some advantages of using a simulation package rather than a
Programming Languages general-purpose programming language:
• Simulation packages automatically provide most of the features needed to build a
• One of the most important decisions a modeler or analyst must make in simulation model, resulting in a significant decrease in “programming” time and a
performing a simulation study concerns the choice of software. reduction in overall project cost.
• If the selected software is not flexible enough or is too difficult to use, then • They provide a natural framework for simulation modeling. Their basic modeling
the simulation project may produce erroneous results or may not even be constructs are more closely akin to simulation than are those in a general-purpose
completed. programming language like C.
• Simulation models are generally easier to modify and maintain when written in a
simulation package.
• They provide better error detection because many potential types of errors are
checked for automatically. Since fewer modeling constructs need to be included in a
model, the chance of making an error will probably be smaller. (Conversely, errors in
a new version of a simulation package itself may be difficult for a user to find, and
the software may be used incorrectly because documentation is sometimes lacking.)
3 4

1
1/13/2023

Cont’d
• On the other hand, some simulation models (particularly for defense-related
applications) are still written in a general-purpose programming language.
Cont’d
Some advantages of such a choice are as follows: • Although there are advantages to using both types of software, we
• Most modelers already know a programming language, but this is often not the case believe, in general, that a modeler would be prudent to give serious
with a simulation package. consideration to using a simulation package.
• A simulation model efficiently written in C, C++, or Java may require less execution • If such a decision has indeed been made, we feel that the criteria
time than a model developed in a simulation package. This is so because a simulation
package is designed to address a wide variety of systems with one set of modeling discussed in Sec. 5.4 will be useful in deciding which particular
constructs, whereas a C program can be more closely tailored to a particular simulation package to choose.
application. This consideration has, however, become less important with the
availability of inexpensive, high-speed PCs.
• Programming languages may allow greater programming flexibility than certain
simulation packages.
• The programming languages C++ and Java are object-oriented (see Sec. 5.6), which
is of considerable importance to many analysts and programmers, such as those in the
defense industry. On the other hand, most simulation packages are not truly object-
oriented.
• Software cost is generally lower, but total project cost may not be. 5 6

5.3. Classification of Simulation Software 5.3.2. Modeling Approaches


• In this section we discuss various aspects of simulation packages. • A system is modeled by identifying its characteristic events and then writing a
5.3.1. General-Purpose Vs. Application-Oriented Simulation Packages set of event routines that give a detailed description of the state changes taking
• There are two main types of simulation packages for discrete-event simulation, place at the time of each event.
namely, general-purpose simulation software and application-oriented • The simulation evolves over time by executing the events in increasing order of
simulation software. their time of occurrence.
• A general-purpose simulation package can be used for any application, but • Here a basic property of an event routine is that no simulated time passes during
might have special features for certain ones (e.g., for manufacturing or process its execution.
re-engineering). • On the other hand, most contemporary simulation packages use the process
• On the other hand, an application-oriented simulation package is designed to be approach to simulation modeling.
used for a certain class of applications such as manufacturing, health care, or • A process is a time-ordered sequence of interrelated events separated by
communications networks. A list of application-oriented simulation packages is intervals of time, which describes the entire experience of an “entity” as it flows
given in Sec. 5.8. through a “system.”
7 8

2
1/13/2023

Cont’d
• The process corresponding to an entity arriving to and being served at a single
server is shown in Fig. 5.1.
Cont’d
• A system or simulation model may have several different types of processes.
• Figure 5.1: Process describing the flow of an entity through a system.
• Corresponding to each process in the model, there is a process “routine” that
describes the entire history of its “process entity” as it moves through the
corresponding process.
• A process routine explicitly contains the passage of simulated time and
generally has multiple entry points.

9 10

Cont’d Cont’d
• To illustrate the nature of the process approach more succinctly, Fig. 5.2 gives • To determine whether the customer entity currently arriving can begin service,
a flowchart for a prototype customer-process routine in the case of a single a check is made (at block 2) to see whether the server is idle.
server queueing system.
• If the server is busy, this customer entity is placed at the end of the queue
• (This process routine describes the entire experience of a customer progressing (block 3) and is made to wait (at block 4) until selected for service at some
through the system.) Unlike an event routine, this process routine has multiple undetermined time in the future. (This is called a conditional wait.)
entry points at blocks 1, 5, and 9.
• Control is then returned to the “timing routine” to determine what customer
• Entry into this routine at block 1 corresponds to the arrival event for a customer entity’s event is the most imminent now.
entity that is the most imminent event in the event list.
• At block 1 an arrival event record is placed in the event list for the next
customer entity to arrive. (This next customer entity will arrive at a time equal
to the time the current customer entity arrives plus an interarrival time.)

11 12

3
1/13/2023

Cont’d
• (If we think of a flowchart like the one in Fig. 5.2 as existing for each customer entity
in the system, control will next be passed to the appropriate entry point for the
flowchart corresponding to the most imminent event for some other customer.) Figure 5.2: Prototype
• When this customer entity (the one made to wait at block 4) is activated at some customer-process routine
point in the future (when it is first in queue and another customer completes service for a single-server
and makes the server idle), it is removed from the queue at block 5 and begins queueing system.
service immediately, thereby making the server busy (block 6).
• A customer entity arriving to find the server idle also begins service immediately (at
block 6); in either case, we are now at block 7.
• There the departure time for the customer beginning service is determined, and a
corresponding event record is placed in the event list. This customer entity is then
made to wait (at block 8) until its service has been completed. (This is an
unconditional wait, since its activation time is known.) Control is returned to the
timing routine to determine what customer entity will be processed next. When the
customer made to wait at block 8 is activated at the end of its service, this makes the
server idle at block 9 (allowing the first customer in the queue to become active
immediately), and then this customer is removed from the system at block 10. 13 14

Table: 5.1: Entities, attributes, resources, and queues for some


common simulation applications Cont’d
• A simulation using the process approach also evolves over time by executing
the events in order of their time of occurrence.
• Internally, the process and event scheduling approaches to simulation are very
similar (e.g., both approaches use a simulation clock, an event list, a timing
routine, etc.).
• However, the process approach is more natural in some sense, since one
process routine describes the entire experience of the corresponding process
entity.

15 16

4
1/13/2023

Common Modeling Elements 5.4. Desirable Software Features


• Simulation packages typically include entities, attributes, resources, and queues • There are numerous features to consider when selecting simulation software.
as part of their modeling framework. We categorize these features as being in one of the following groups:
• An entity (see Table 5.1 for examples) is created, travels through some part of • General capabilities (including modeling flexibility and ease of use)
the simulated system, and then is usually destroyed. • Hardware and software requirements
• Entities are distinguished from each other by their, which are pieces of • Animation and dynamic graphics
information stored with the entity. attributes • Statistical capabilities
• As an entity moves through the simulated system, it requests the use of • Customer support and documentation
resources. • Output reports and graphics
• If a requested resource is not available, then the entity joins a queue. • We now discuss each group of features in turn.
• The entities in a particular queue may be served in a FIFO (first-in, first-out)
manner, served in a LIFO (last-in, first-out) manner, or ranked on some
attribute in increasing or decreasing order.
17 18

5.4.1. General Capabilities Cont’d


• The most important feature for a simulation-software product to have is • The following are some specific capabilities that make a simulation product
modeling flexibility or, in other words, the ability to model a system whose flexible:
operating procedures can have any amount of complexity. • Ability to define and change attributes for entities and also global variables,
• Note that no two systems are exactly alike. and to use both in decision logic (e.g., if-then-else constructs)
• Thus, a simulation package that relies on a fixed number of modeling constructs • Ability to use mathematical expressions and mathematical functions
with no capability to do some kind of programming in any manner is bound to (logarithms, exponentiation, etc.)
be inadequate for certain systems encountered in practice. • Ability to create new modeling constructs and to modify existing ones, and
to store them in libraries for use in current and future models
• Ideally, it should be possible to model any system using only the constructs
provided in the software—it should not be necessary to use routines written in a
programming language such as C.

19 20

5
1/13/2023

Cont’d Cont’d
• The second most important feature for a simulation product is ease of use (and • Hierarchical modeling is useful in modeling complex systems.
ease of learning), and many contemporary simulation packages have a graphical • Hierarchy allows a user to combine several basic modeling constructs into a
user interface to facilitate this. new higher-level construct.
• The software product should have modeling constructs (e.g., icons or blocks) • These new constructs might then be combined into an even higher-level
that are neither too “primitive” nor too “macro.” construct, etc.
• In the former case, a large number of constructs will be required to model even • This latter construct can be added to the library of available constructs and can
a relatively simple situation; in the latter case, each construct’s dialog box will then be reused in this model or future models
contain an excessive number of options if it is to allow for adequate flexibility.
• This ability to reuse pieces of model logic increases one’s modeling efficiency.
• In general, the use of tabs in dialog boxes can help manage a large number of
options. • Hierarchy is an important concept in a number of simulation packages.
• It is also a useful way to manage “screen clutter” for a graphically oriented
model that consists of many icons or blocks.
21 22

Cont’d Cont’d
• The software should have good debugging aids such as an interactive debugger. • Note that a run-time license generally has a considerably lower cost than a
• A powerful debugger allows the user to do things such as: normal developmental license or is free.
Follow a single entity through the model to see if it is processed correctly • A feature that is of considerable interest is the ability to import data from (and
See the state of the model every time a particular event occurs (e.g., a export data to) other applications (e.g., an Excel spreadsheet or a database).
machine breakdown) • Traditionally, simulation products have provided performance measures
Set the value of certain attributes or variables to “force” an entity down a (throughput, mean time in system, etc.) for the system of interest. Now some
logical path that occurs with small probability products also include a cost module, which allows costs to be assigned to such
things as equipment, labor, raw materials, work in process, finished goods, etc.
• In some discrete-event simulations (e.g., steelmaking), it may be necessary to
have certain capabilities available from continuous simulation.
• We call such a simulation a combined discrete-continuous simulation.

23 24

6
1/13/2023

Cont’d 5.4.2. Hardware and Software Requirements


• Occasionally, one might have a complex set of logic written in a programming • In selecting simulation software, one must consider what computer platforms
language that needs to be integrated into a simulation model. Thus, it is the software is available for.
desirable for a simulation package to be able to invoke external routines.
• Almost all software is available for Windows-based PCs, and some products are
• It is useful for the simulation package to be easily initialized in a nonempty and also available for Apple computers.
idle state. For example, in a simulation of a manufacturing system, it might be
desirable to initialize the model with all machines busy and all buffers half full, • If a software package is available for several platforms, then it should be
in order to reduce the time required for the model to reach “steady state.” compatible across platforms.
• Another useful feature is that the state of a simulation can be saved at the end • The amount of RAM required to run the software should be considered as well
of a run and used to restart easily the simulation at a later time. as what operating systems are supported.
• Finally, cost is usually an important consideration in the purchase of simulation • It is highly desirable if independent replications of a simulation model can be
software. Currently, the cost of simulation software for a PC ranges from $1000
to $100,000 or even more. However, there are other costs that must be made simultaneously on multiple processor cores or on networked computers.
considered, such as maintenance fees, upgrade fees, and the cost for any
additional hardware and software that might be required (see Sec. 6.4.2).
25 26

5.4.3. Animation and Dynamic Graphics Cont’d


• The availability of built-in animation is one of the reasons for the increased use • The following are some of the uses of animation:
of simulation modeling. • Communicating the essence of a simulation model (or simulation itself) to a
• In an animation, key elements of the system are represented on the screen by manager or to other people who may not be aware of (or care about) the
icons that dynamically change position, color, and shape as the simulation technical details of the model
model evolves through time. • Debugging the simulation computer program
• For example, in a manufacturing system, an icon representing a forklift truck • Showing that a simulation model is not valid
will change position when there is a corresponding change in the model, and an • Suggesting improved operational procedures for a system (some things may
icon representing a machine might change color when the machine changes not be apparent from looking at just the simulation’s numerical results)
state (e.g., idle to busy) in the model. • Training operational personnel
• Promoting communication among the project team

27 28

7
1/13/2023

Cont’d Cont’d
• There are two fundamental types of animation: concurrent and post processed • We now discuss desirable features for animation. First, the simulation software
(also called playback). should provide default animation as part of the model-building process. Since
animation is primarily a communications device, it should be possible to create
• In concurrent animation the animation is being displayed at the same time that high-resolution icons and to save them for later reuse. The software should
the simulation is running. come with a library of standard icons, or it should be possible to import icons
• Note, however, that the animation is normally turned off when making from an external source (e.g., Google Warehouse). The software should provide
production runs, because the animation slows down the execution of the smooth movement of icons; icons should not “flash” or “jump.” There should be
a control to speed up or slow down the animation. It should be possible to zoom
simulation. in or out and to pan to see different parts of a system too large to f t on one
• In post-processed animation, state changes in the simulation are saved to a disk screen. Some software products have named animation views, so that one can
file and used to drive the graphics after the simulation is over. construct a menu of views corresponding to different parts of the simulated
system. It is desirable if the animation uses vector-based graphics (pictures are
• Some simulation software products have both types of animation. drawn with lines, arcs, and fills) rather than pixel-based graphics (pictures are
drawn by turning individual pixels on or off). The former type of graphics
allows rotation of an object (e.g., a helicopter rotor) as well as a vehicle to
maintain its proper orientation as it goes around a corner.
29 30

Cont’d 5.4.4. Statistical Capabilities


• Some simulation products with concurrent animation allow the user to stop the • If a simulation product does not have good statistical-analysis features, then it is
simulation “on the fl y” while observing the animation, make changes to certain impossible to obtain correct results from a simulation study. First, the software
model parameters (e.g., the number of machines in a workstation), and then instantly
restart the simulation. However, this can be statistically dangerous if the state of the must have a good random-number generator (see Chap. 3), that is, a
system and the statistical counters are not reset. mechanism for generating independent observations from a uniform distribution
• Many simulation packages provide three-dimensional animation (the vantage point on the interval [0, 1]. Note that not all random-number generators found on
from which to view the animation can be rotated around all three axes), which might computers or in software products have acceptable statistical properties. The
be important for management presentations and for situations in which vertical generator should have at least 100 different streams (preferably far more) that
clearances are important. In these products it may also be possible to provide the can be assigned to different sources of randomness (e.g., interarrival times or
viewer of the animation with a perspective of “riding through the system on the back service times) in a simulation model—this will allow different system designs
of an entity.”
to be compared in a more statistically efficient manner. The simulation software
• It should be possible to import CAD drawings and clip art into an animation. It is should produce the same results on different executions if the default seeds are
often desirable to display dynamic graphics and statistics on the screen as the
simulation executes. Examples of dynamic graphics are clocks, dials, level meters used for the various streams—the seeds should not depend on the internal clock
(perhaps representing a queue), and dynamically updated histograms and time plots of the computer. On the other hand, the user should be able to set the seed for
(see Sec. 6.4.6). An example of the latter would be to update a plot of the number in each stream, if desired.
some queue as the simulation moves through time. 31 32

8
1/13/2023

Cont’d
• In general, each source of randomness in the system of interest should be • If a theoretical distribution cannot be found that is a good representation for a
represented in the simulation model by a probability distribution, not just the source of randomness, then an empirical (or user-defined) distribution based on
perceived mean value. If it is possible to find a standard theoretical distribution the data should be used. In this case, random numbers are used to sample from
that is a good model for a particular source of randomness, then this distribution a distribution function constructed from the observed system data.
should be used in the model. At a minimum, the following continuous • There should be (a single) command available for making independent
distributions should be available: exponential, gamma, Weibull, lognormal, replications (or runs) of the simulation model. This means:
normal, uniform, beta, and triangular. The last distribution is typically used as a
• Each run uses separate sets of different random numbers.
model for a source of randomness when no system data are available. Note also
that very few input random variables in real simulations have a normal • Each run uses the same initial conditions.
distribution. The following discrete distributions should also be available: • Each run resets the statistical counters.
binomial, geometric, negative binomial, Poisson, and discrete uniform.

33 34

Cont’d Cont’d
• Note that simulation results from different runs are independent and also • It should be possible to construct a confidence interval for the difference
probabilistic copies of each other. This allows (simple) classical statistical between the means of two simulated systems (e.g., the current system and a
procedures to be applied to the results from different runs. proposed system) by using the method of replication.
• There should be a statistically sound method available for constructing a • The simulation software should allow the user to specify what performance
confidence interval for a mean (e.g., the mean time in system for a part in a
factory). The method should be easy to understand and should provide good measures to collect output data on, rather than produce reams of default output
statistical results. In this regard, we feel that the method of replication is data that are of no interest to the user.
definitely the superior approach. • At least one simulation product allows the user to perform statistical
• If one is trying to determine the long-run or “steady-state” behavior of a system, experimental designs (see Chap. 5) with the software, such as full factorial
then it is generally desirable to specify a warmup period for the simulation, that designs or fractional factorial designs. When we perform a simulation study, we
is, a point in simulated time when the statistical counters (but not the state of would like to know what input factors (decision variables) have the greatest
the system) are reset. Ideally, the simulation software should also be able to impact on the performance measures of interest. Experimental designs tell us
determine a value for the warmup period based on making pilot runs. There is what simulation experiments (runs) to make so that the effect of each factor can
currently at least one simulation product that uses Welch’s graphical approach
to specify a warmup period. be determined. Some designs also allow us to determine interactions among the
35 factors. 36

9
1/13/2023

Cont’d 5.4.5. Customer Support and Documentation


• A topic that is of interest to some people planning to buy simulation software is • The simulation software vendor should provide public training on the software
“optimization”. Suppose that there are a number of decision variables (input on a regular basis, and it should also be possible to have customized training
factors) of interest, each with its own range of acceptable values. (There may presented at the client’s site. Good technical support is extremely important for
also be linear constraints on the decision variables.) In addition, there is an questions on how to use the software and in case a bug in the software is
objective function to be maximized (or minimized) that is a function of one or discovered. Technical support, which is usually in the form of telephone help,
more simulation output random variables (e.g., throughput in a manufacturing should be such that a response is received in at most one day.
system) and of certain decision variables. Then the goal of an “optimizer” is to • Good documentation is a crucial requirement for using any software product. It
make runs of the simulation model (each run uses certain settings of the should be possible, to learn a simulation package without taking a formal
decision variables) in an intelligent manner and to determine eventually a training course. Generally, there will be a user’s guide or reference manual.
combination of the decision variables that produces an optimal or near-optimal There should be numerous detailed examples available. Most products now
solution. These optimization modules use heuristics such as genetic algorithms, have context-dependent online help, which we consider very important. (It is
simulated annealing, neural networks, scatter search, and tabur search. not sufficient merely to have a copy of the documentation available in the
software.) Several products have a library of “mini examples” to illustrate the
various modeling constructs.
37 38

Cont’d 5.4.6. Output Reports and Graphics


• There should be a detailed description of how each modeling construct works, • Standard reports should be provided for the estimated performance measures. It
particularly if its operating procedures are complex. For example, if a should also be possible to customize reports, perhaps for management
simulation software product for communications networks offers a module for a presentations. Since a simulation product should be flexible enough so that it
particular type of local-area network, then its logic should be carefully can compute estimates of user-defined performance measures, it should also be
delineated and any simplifying assumptions made relative to the standard
stated. possible to write these estimates into a custom report. For each performance
measure (e.g., time in system for a factory), the average observed value, the
• It is highly desirable to have a university-quality textbook available for the minimum observed value, and the maximum observed value are usually given.
simulation package.
If a standard deviation is also given (based on one simulation run), then the user
• Most simulation products offer a free demo and, in some cases, a working should be sure that it is based on a statistically acceptable method (such as
version of the software can be downloaded from the vendor’s website, which batch means with appropriate batch size), or else it should be viewed as highly
will allow small models to be developed and run.
suspect. [Variance and standard-deviation estimates require independent data,
• It is useful if the vendor publishes an electronic newsletter and has a yearly which are rarely produced by one run of a simulation model.] It should be
users’ conference. The vendor should have regular updates of the software possible to obtain reports at intermediate points during a simulation run as well
(perhaps, once a year).
as at the end.
39 40

10
1/13/2023

Cont’d
• The simulation product should provide a variety of (static) graphics. First, it • It should be possible to export individual model output observations (e.g., times
should be possible to make a histogram for a set of observed data. For in system) to other software packages such as spreadsheets, databases, statistics
continuous (discrete) data, a histogram is a graphical estimate of the underlying packages, and graphical packages for further analysis and display.
probability density (mass) function that produced the data. Time plots are also
very important. In a time plot one or more key system variables (e.g., the
numbers in certain queues) are plotted over the length of the simulation,
providing a long-term indication of the dynamic behavior of the simulated
system. (An animation provides a short-term indication of the dynamic
behavior of a system.) Some simulation products allow the simulation results to
be presented in bar charts or pie charts. Finally, a correlation plot is a useful
way to measure the dependence in the output data produced from one
simulation run.

41 42

11

You might also like