SM-1
SM-1
Sujan Karki
Email: sujan074bct045@ioepc.edu.np
Contact No.: 9819387234
Master’s in Information System Engineering (MscIne) *Ongoing
Bachelor in Computer Engineering – Purwanchal Campus,IOE
UNIT 1
Introduction to Simulation
3
…
What is Model?
– Is simply just a product that showcase a system of your interest.
– Key feature of model is manipulability.
– It can be physical model(House model, aircraft model, organs model) and
conceptual model(computer model, statistical model, business model).
– It is considered static.
What is Modelling?
– Is a process of representing a model including construction and working.
Or, creating a model in order to represent a system with their properties.
Or, act of building model.
– aims to be a true system / conceptual framework that describe system.
What is Simulation ?
– Act of using model.
– useful to study properties of a model of a real world system.
– uses a model to explore states that would not be possible in the original
system.
4
– Considered dynamic as the variables of simulations changes.
–changing one or more variables of model and observing the resulted changes.
…
o Simulation Modelling is the process of creating and analyzing a digital
prototype of a physical model to predict its performance in the real world.
o It help designers, engineer to understand, under what circumstances and in
which ways a part could fail and what load it can withstand.
Types of system
1. Endogenous and Exogenous System
Activities and events occurring within a system is Endogenous . e.g. in
baking system drawing cash in bank.
Activities and event in the environment affecting system Exogenous. e.g.
arrival of customers
2. Closed and open System
System for which there is no exogenous system and event is said to be
closed. E.g. water in an insulated flask
System for which there is exogenous system and event is said to be open.
E.g. Bank system
8
…
3. Continuous and Discrete System
Continuous system is one in which the state variables change continuously
over time. For example: Water Flow in a River, Temperature Control in an
Oven. Can be described by a set of differential equations.
Discrete system is one in which the state variables changes only at a discrete
set of time. For example: banking system in which no of customers (state
variable) changes only when a customer arrives or service provided to
customer i.e. Customer depart form system, Traffic Light Control System
Event associated with each state transition.
9
Types of Models
10
…
o Mathematical and Physical model
Model that use symbolic notations and mathematical equations to
represent system. The system attributes are represented by variables,
and the activities are represented by mathematical functions that
interrelate the variables.
Physical models are based on some analogy between such systems as
mechanical and electrical or electrical and hydraulic.
In a physical model of a system, the system attributes are represented
by measurements such as voltage or the position of a shaft. For
example the rate at which the shaft of a DC motor turns depends on the
voltage
applied to the motor.
o Static and Dynamic model
– Static is a type of model where time is not a significant variable.
– It is a representation of system at a particular point in time i.e. time
plays no role. Architectural model of house
–Dynamic is a type of model where time plays significant role and is a
significant variable. Wind tunnel
11 – It is the representation of a system that evolves over time.
…
o Deterministic and Stochastic model
– Deterministic models have a known set of inputs, which result into
unique set of outputs.
– None of the system property is random.
– For example: Simulation of a digital circuit. Simulation of chemical
reaction based on equations.
– In stochastic model, there are one or more random input variables,
which lead to random outputs.
– For example: Inter-arrival time or service time of customers at a
restaurant or store. Amount of time required to service a customer in
bank.
o Analytical and Numerical model
– Analytical model is one which is solved by using the deductive
reasoning of mathematical theory. Analytical model is exact and gives
exact solution. E.g. value of 1/2. Analytical models are time consuming
and sometimes impossible.
– Numerical model is the one which is solved by applying
computational procedures. Numerical model gives the approximate
value or solution. E.g. PI=22/7 is approximate value. Mathematical
12
models are less time consuming and possible for most cases.
…
13
…
14
…
15
Steps in Simulation Study
1
2
3 4
6
7
8
9
10
11
12
16
…
o Problem formation
- To begin any study, there must be statement of problem.
- Problem statement is formulated either by policy makers or analysts.
o Setting objectives and overall project plan
- Objectives for the simulation must be formulated.
- It indicates what is to be done by the simulation.
- In this phase, it is decided whether or not the simulation is the
appropriate tool. Include time, cost and manpower needed along with
the expected results of each stage.
o Model Conceptualization
- Model building is the process of construction of a model of a system.
For modeling, essential features of the system are extracted at first, basic
assumptions are made and then the assumptions are modified until
approximate results are obtained.
- At initial stage, the model should be simple and over time should
develop complexity.
- Excessive complexity should be forbidden to minimize model and
expenses.
17
…
o Data Collection
- Data plays important role in simulation.
- Data collection is very difficult phase as it requires more time, so it
should be started as early as possible.
- The data to be collected depends on the study objectives.
o Model Translation
- The model of real world generally requires storage, so model must be
entered into a computer recognizable format.
- The model programming must be selected by the modeler, whether a
simulation language or to use a special purpose simulation software.
- Simulation languages are more powerful and flexible than software’s.
But the choice depends on model complexity.
o Verified?
- This stage involves verification of the computer program of modeling.
- Verification is successful if the input parameters and the logical
structure of the models are correctly represented in the computer.
18
…
o Validated?
- Validation is performed by calibrating the model against the actual
system behavior so as to improve the system model.
- This is iterative process which is successful once the model accuracy is
acceptable.
o Experimental Design
- The alternatives that are to be simulated are determined.
- For each system design, length of initialization period, length of
simulation run and number of replications to be made of each run are
decided.
o Production Runs and Analysis
- It is used to estimate measures of performance for the system design
being simulated.
o More Runs?
- After the analysis of the runs, it is decided whether or not more runs
are needed.
19
…
o Documentation and Reporting
- Program documentation is the document stating the operation of the
program. It is necessary to understand how the program works. It
facilitates easy modification and maintenance of the program.
- Progress documentation provides the chronology of work done and
decisions made. It helps in tracking the course of project towards
success.
- The result of the analysis should be clearly stated in a final report.
o Implementation
- It involves actual implementation of the model.
- Model implementation depends on how well all the other stages are
succeeded.
- Proper success of other stages results in good implementation while
improper model on implementation may result in hazards.
20
Phases of simulation study
I Phase:
•Consists of steps 1 and 2
•It is period of discovery/orientation
•The analyst may have to restart the process if it is not fine-tuned
•Recalibrations and clarifications may occur in this phase or another phase.
II Phase:
•Consists of steps 3,4,5,6 and 7
•A continuing interplay is required among the steps
•Exclusion of model user results in implications during implementation
III Phase:
•Consists of steps 8,9 and 10
•Conceives a thorough plan for experimenting
•Discrete-event stochastic is a statistical experiment
•The output variables are estimates that contain random error and therefore
proper statistical analysis is required.
IV Phase:
•Consists of steps 11 and 12
•Successful implementation depends on the involvement of user and every steps
21 successful completion.
When simulation is the appropriate tool?
1. Simulation should be used when the problem cannot be solved using
common sense.
2. Can be used to verify analytical solutions.
3. Should be used in internal interacting of complex system or of a
subsystem within a complex system.
4. Can be employed to experiment with new designs and policies ,
before implementing
5. Should be used in determining the influence of change in input
variables on the output of the system.
6. Suggesting modifications in the system under investigation for its
optimal performance
22
When simulation is not the appropriate tool?
1. Simulation should be used when the problem cannot be solved
using common sense.
2. When problem can be solved analytically and easily.
3. If it is easier to perform direct experiments.
4. If the cost becomes too high such that cost exceeds saving.
5. If resource and time are not available.
23
Advantages of Simulation
o Simulation helps to learn about real system, without having the
system at all. It helps to study the behavior of a system without
building it.
o New hardware designs, physical layouts, transportation systems and
various systems can be tested without committing resources for their
acquisition.
o Simulation Models are comparatively flexible and can be modified to
accommodate the changing environment to the real situation.
o Simulation technique is easier to use and can be used for wide range
of situations.
o In systems like nuclear reactors where millions of events take place
per second, simulation can expand the time to required level.
o Results are accurate in general, compared to analytical model.
o Help to find un-expected phenomenon, behavior of the system.
o Easy to perform ``What-If'' analysis.
24
Disadvantages of Simulation
1. Expensive and difficult to build a simulation model. Model
building requires special training.
25
Applications of Simulation
1. Manufacturing: Design analysis and optimization of production
system, materials management, capacity planning, layout planning,
and performance evaluation, evaluation of process quality.
2. Business: Market analysis, prediction of consumer behavior, and
optimization of marketing strategy and logistics, comparative
evaluation of marketing campaigns.
3. Military: Testing of alternative combat strategies, air operations, sea
operations, simulated war exercises, practicing ordinance
effectiveness, inventory management.
4. Healthcare applications: Applications such as planning of health
services, expected patient density, facilities requirement, hospital
staffing , estimating the effectiveness of a health care program.
5. Communication Applications: Applications such as network design,
and optimization, evaluating network reliability, manpower
planning, sizing of message buffers.
26
Applications of Simulation
6. Computer Applications: Can be applicable in fields such as
designing hardware configurations and operating system protocols,
sharing networking, gaming.
7. Economic applications: Can be used in portfolio management,
forecasting impact of Govt. Policies and international market
fluctuations on the economy. Budgeting and forecasting market
fluctuations.
8. Transportation applications: Design and testing of alternative
transportation policies, transportation networks-roads, railways,
airways etc. Evaluation of timetables, traffic planning.
9. Environment application: Solid waste management, performance
evaluation of environmental programs, evaluation of pollution
control systems.
10. Biological applications: Such as population genetics and spread of
epidemics.
2
7
Assignments
1. Define modelling and simulation. What are the various steps in
simulation study? Explain and Illustrate with the flowchart.
[3+6]
2. What are the advantages and disadvantages of simulation. [5]
3. When simulation is appropriate tool? When simulation is not
appropriate tool? [3+3]
4. Explain different phase in Simulation study. [6]
5. Explain the area of application of simulation. [5]
6. Define System, Model and Simulation. [3]
7. Explain different components of system with example. [4]
8. Define system modelling. [2]
9. Differentiate the following:
1. Deterministic and Stochastic Model
2. Static and Dynamic Model
2 3. Continuous and Discrete Model
8
. . . to be continued !!!
29