Professional Documents
Culture Documents
MODELLING
AND
SIMULATION
COURSE OUTLINE
Introduction to Simulation
Simulation Examples
General Principles
Simulation Software
Statistical Models in Simulation
Queuing Models
Random Number Generation
Verification and Validation of Simulation Model
Output Analysis for a Single Model
Comparison and Evaluation of Alternative System Design
INTRODUCTION TO
SIMULATION
System and System Environment
Components of System
Type of Systems
Type of Models
Simulation and Steps in simulation study
Advantages and Disadvantages of Simulation.
SYSTEM AND SYSTEM
ENVIRONMENT
System
Input
Process/state
Output
From Technology
concrete models,
mathematical models,
computational models.
SIMULATION
Simulation
Definitions:
Discipline of understanding and evaluating the interaction of parts of a real or theoretical system.
Accurate Depiction of Reality Parts of the system may not be observable (e.g., internals of a silicon chip or biological
system)
It may be too difficult,
hazardous, or
expensive to observe a real,
operational system
Uses of Simulations
1. Analyze systems before they are built
2. Reduce number of design mistakes
3.Optimize design
4. Analyze operational systems
SIMULATION
Simulation
Simulation is very useful for experiments with the internal interactions of a complex system, or of a
subsystem within a complex system.
Simulation can be employed to experiment with new designs and policies, before implementing
Simulation can be used to verify the results obtained by analytical methods and reinforce the
analytical techniques.
Simulation is very useful in determining the influence of changes in input variables on the output of
the system.
Simulation helps in suggesting modifications in the system under investigation for its optimal
performance.
SIMULATION
The Basic Steps of a Simulation Study
Problem Definition
defining the goals of the study
and determining what needs to be solved.
objective observations of the process to be studied.
determine if simulation is the appropriate tool for the problem under investigation
Project Planning
The tasks for completing the project are broken down into work packages with a responsible party assigned to
each package.
Milestones are indicated for tracking progress.
determine if sufficient time and resources are available for completion
SIMULATION
The Basic Steps of a Simulation Study
System Definition
identifying the system components to be modeled
and the performance measures to be analyzed.
defining the system requires an experienced simulator with appropriate level of detail and flexibility
Model Formulation
Understanding how the actual system behaves
determining the basic requirements of the model are necessary in developing the right model.
Creating a flow chart of how the system operates facilitates the understanding of what variables are involved
and how they interact.
SIMULATION
The Basic Steps of a Simulation Study
Input Data Collection & Analysis
The type of data to collect is determined.
New data is collected and/or existing data is gathered.
Data is fitted to theoretical distributions.
For example, the arrival rate of a specific part to the manufacturing plant may follow a normal distribution
curve.
Model Translation
The model is translated into programming language.
Choices range from general purpose languages such as C++, JAVA, Python or simulation programs such as
Arena, Ansys. MATLAB. Etc.
SIMULATION
The Basic Steps of a Simulation Study
Verification & Validation
Verification is to ensuring that the model behaves as intended
usually by debugging or through animation.
Verification is necessary but not sufficient for validation, that is a model may be verified but not valid.
Validation ensures that no significant difference exists between the model and the real system
The model reflects reality.
Validation can be achieved through statistical analysis.
Additionally, face validity may be obtained by having the model reviewed and supported by an expert.
SIMULATION
The Basic Steps of a Simulation Study
Experimentation & Analysis
Experimentation involves developing the alternative model(s),
executing the simulation runs,
statistically comparing the alternative(s) system performance with that of the real system.
Documentation & Implementation
Documentation consists of the written report and/or presentation.
The results and implications of the study are discussed.
The best course of action is identified, recommended, and justified
SIMULATION
SIMULATION
Decisions for Simulating
To recognize if simulation is the correct approach to solving a particular problem, the
following should be evaluated before embarking on simulation:
1. Type of Problem
2. Availability of Resources
3. Costs
4. Availability of Data
SIMULATION
Type of Problem
When Simulation is Not Appropriate
Simulation should not be used when the problem can be solved using common sense.
Not, if the problem can be solved analytically.
Not, if it is easier to perform direct experiments.
Not, if the costs exceeds savings.
Not, if the resources or time are not available.
No data is available, not even estimate simulation is not advised.
If there is no enough time or the people are not available, simulation is not appropriate.
If managers have unreasonable expectation say, too much soon – or the power of simulation is over
estimated, simulation may not be appropriate.
If system behavior is too complex or cannot be defined, simulation is not appropriate.
SIMULATION
Availability of Resources
People and time are the determining resources for conducting a simulation study.
An experienced analyst determine both the model's appropriate level of detail and how to verify and
validate the model.
Without a trained simulator, the wrong model may be developed which produces unreliable results.
The allocation of time should not be so limited so as to force the simulator to take shortcuts in
designing the model.
Enough time should allowed for:
the implementation of any necessary changes
verification and validation to take place if the results are to be meaningful.
SIMULATION
Costs:
Cost considerations should be given for each step in the simulation process,
purchasing simulation software if not already available, and computer resources.
Obviously if these costs exceed the potential savings in altering the current system, then
simulation should not be pursued.
SIMULATION
Availability of Data:
The necessary data should be identified and located,
if the data does not exist, then the data should be collectible.
If the data does not exist and cannot be collected,
continuing with the simulation study will eventually yield unreliable and useless results.
The simulation output cannot be compared to the real system's performance, which is vital for
verifying and validating the model.
SIMULATION
Simulation
Advantages of Simulation
New policies, operating procedures, decision rules, information flow, etc. can be explored without
disrupting the ongoing operations of the real system.
New hardware designs, physical layouts, transportation systems can be tested without committing
resources for their acquisition.
Hypotheses about how or why certain phenomena occur can be tested for feasibility.
Time can be compressed or expanded allowing for a speedup or slowdown of the phenomena under
investigation.
SIMULATION
Simulation
Advantages of Simulation
Insight can be obtained about the interaction of variables.
Insight can be obtained about the importance of variables to the performance of the system.
Bottleneck analysis can be performed indication where work-in process, information materials and so
on are being excessively delayed.
A simulation study can help in understanding how the system operates rather than how individuals
think the system operates. “what-if” questions can be answered.
Useful in the design of new systems.
SIMULATION
Simulation
Disadvantages of Simulation
Model building requires special training.
It is an art that is learned over time and through experience.
If two models are constructed by two competent individuals, they may have similarities, but it is
highly unlikely that they will be the same.
Simulation results may be difficult to interpret.
Since most simulation outputs are essentially random variables (they are usually based on random
inputs), it may be hard to determine whether an observation is a result of system interrelationships or
randomness.
Simulation modeling and analysis can be time consuming and expensive.
Skimping on resources for modeling and analysis may result in a simulation model or analysis that is
not sufficient for the task.
Simulation is used in some cases when an analytical solution is possible, or even preferable.
SIMULATION EXAMPLES
Examples
Areas of Applications Manufacturing:
Design analysis and optimization of production system, materials management, capacity planning,
layout planning, and performance evaluation
Business: Market analysis, prediction of consumer behaviour, and optimization of marketing strategy
and logistics, comparative evaluation of marketing campaigns.
Military: Testing of alternative combat strategies, air operations, sea operations, simulated war
exercises, practicing ordinance effectiveness, inventory management.
Healthcare applications: such as planning of health services, expected patient density, facilities
requirement, hospital staffing , estimating the effectiveness of a health care program.
SIMULATION EXAMPLES
Examples
Communication Applications:
Such as network design, and optimization, evaluating network reliability, manpower planning, sizing of
message buffers.
Computer Applications:
Such as designing hardware configurations and operating system protocols, sharing networking. Client/Server
system architecture
Economic applications:
such as portfolio management, forecasting impact of Govt.
Policies and international market fluctuations on the economy.
Budgeting and forecasting market fluctuations.
SIMULATION EXAMPLES
Examples
Transportation applications: Design and testing of alternative transportation policies, transportation
networks-roads, railways, airways etc.
Evaluation of timetables, traffic planning.
Environment application: Solid waste management, performance evaluation of environmental
programs, evaluation of pollution control systems.
Biological applications: Such as population genetics and spread of epidemics.
Business process Re-engineering: Integrating business process re-engineering with image –based
work flow, using process modelling and analysis tool.
GENERAL PRINCIPLES IN SIMULATION
Concepts In Discrete-Event Simulation
System
A collection of entities (people and machines..) that interact together over time for one or more goals
Model
abstract representation of a system, usually containing structural, logical or mathematical relationship that
describe a system in term of state, entities and their attributes , sets, processes,…
System state
A collection of variables in any time that describe the system
Entity
Any object or component in system that require explicit representation (server, customer,...)
Attributes
The properties of a given customer
List
A collection of associated entities , ordered in some logical fashion (FIFO, priority,…)
GENERAL PRINCIPLES IN SIMULATION
Event
An instantaneous occurrence that changes the state of a system
Event Notice
A record of a event to occur at the current or future time (type and time)
Event List
FEL (future event list)
Activity (unconditional wait)
A duration time of specified length (service time or interarrival time,… )
Deterministic, Statistical and functional
Delay (conditional wait)
A duration of time of unspecified indefinite length, which is not known until it ends (customer delay in
waiting line)
Clock A variable representing simulated time
GENERAL PRINCIPLES IN SIMULATION
Able-Baker Call center
System state
LQ(t): the number of callers waiting to serve
LA(t):0 or 1 indicate Able is idle or busy
LB(t):0 or 1 indicate Baker is idle or busy
Entities
Caller
Events
Arrival event, service completion by Able or Baker
Activities
Service time by Able/Baker and Inter-arrival time
Delay
A caller wait in queue until Able or Baker becomes free
GENERAL PRINCIPLES IN
SIMULATION
Event Scheduling Flow Chart
First, we need a main program that supervises everything else. Most importantly, this program invokes three
routines:
the initialization routine,
the timing routine, and
the event routine.
increment the number of customers who have gone through the line,
If the server is busy, we add the customer to the queue and increment the number of customers enqueued. If the queue is full, we
might have to adjust some parts of the system to accommodate this capacity. Perhaps we kick the customer out. If the queue isn't
full, we store the customer arrival time - we will need this later to compute their waiting time. Finally, we return to the main
program.
GENERAL PRINCIPLES IN
SIMULATION
Arrival Event
is schedule the next arrival.
Next, we examine the server and see if they are busy.
If the server is busy,
add the customer to the queue
increment the number of customers enqueued.
If the queue is full,
we might have to adjust some parts of the system to accommodate this capacity.
The dirty little secret is that the simulation language is doing event scheduling in
its implementation but exposes an API that allows us to model using process
interaction.
GENERAL PRINCIPLES IN
SIMULATION
In queueing simulations, a customer is generated, eventually gets served, and then
leaves. How do we perform these actions in a language like Arena? Arena exposes
functionality for
creating,
processing and
disposing of entities.
In contrast, the higher-level languages like Extend, Arena, Simio, Automod, and
AnyLogic require a lot less programming effort to get up and running.
GENERAL PRINCIPLES IN
SIMULATION
There are 5-10 major simulation players in Education as mentioned above
In industry, the price for simulation packages can range from under $1,000 to more than
$100,000.
Thankfully, freeware is also available: simulation packages exist in Java and Python
(SimPyl).
Though they might contain a learning curve, these packages can be powerful and enjoyable
to work with.
GENERAL PRINCIPLES IN
SIMULATION
What factors should we take into account when selecting a language?
We can examine the various costs. For example,
we can look at the cost of purchasing the licenses,
the cost of specialized programmers,
as well as certain run-time costs.
Intro to Arena