Computer Simulation-and-Modeling

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Unit 1 Simulation and Modeling

Modelling & Simulation


 
In Modelling & Simulation, Modelling is the process of representing a model which
includes its construction and working. This model is similar to a real system, which
helps the analyst predict the effect of changes to the system. Simulation of a system is
the operation of a model in terms of time or space, which helps analyze the
performance of an existing or a proposed system. In this tutorial, we will discuss the
concept and classification of Modelling & Simulation, their architecture, application
areas, and other key ideas.

Systems
A system is defined as a groups of objects that are joined
together in some regular interaction toward the
accomplishment of some purpose.
An automobile factory: Machines, components parts and
workers operate jointly along assembly line
Components of system
• Entity :An object of interest in the system : Machines in
factory
•Attribute : The property of an entity : speed, capacity
• Activity: A time period of specified length :welding, stamping
•State: A collection of variables that describe the system in any
time : status of machine (busy, idle, down,…)
• Event: A instantaneous occurrence that might change the
state of the system: breakdown
• Endogenous: Activities and events occurring with the system
•Exogenous Activities and events occurring with the
environment

System Environment
A system is often affected by changes occurring outside the
system: system Factory : Arrival orders environment.
Effect of supply on demand : relationship between factory
output and arrival (activity of system)
Banks : arrival of customers

Advantages and disadvantages of


simulation
Advantages

 It can avoid danger and loss of life.


 Conditions can be varied and outcomes investigated.
 Critical situations can be investigated without risk.
 It is cost effective.
 Simulations can be sped up so behaviour can be studied easily over a long period of time.
 Simulations can be slowed down to study behaviour more closely.
Disadvantages

 It can be expensive to measure how one thing affects another, to take the initial measurements and
to create the model itself (such as aerodynamic wind tunnels).
 To simulate something, a thorough understanding is needed and an awareness of all the factors
involved. Without this, a simulation cannot be created.

Application areas of simulation


 Logistics simulation
Optimize complex and dynamic logistics processes with simulation
 Simulation in production
Includes modeling single production lines, from the design of production resources and buffer
sizes to the simulation of entire production plants
 Detailed production planning
Optimization of preliminary planning while taking into account dynamic factors like current
availabilities or disruptions, resources, inventories, filling level of the facility, etc.
 Emulation
Virtual testing of control software with simulation
 Planning of machine scheduling
Optimising machine capacity utilization by minimizing set-up times and avoiding standby- and
waiting times
 Control station simulation
Optimisation of control strategies with the help of simulation
 Personnel simulation
Assistance for personnel resource planning and personnel dispatching
 Supply Chain simulation
Modeling and analysis of supply networks

What is a stochastic system?


The word "stochastic" means "pertaining to chance" (Greek roots), and is thus used to
describe subjects that contain some element of random or stochastic behavior. For a
system to be stochastic, one or more parts of the system has randomness associated
with it. Unlike a deterministic system, for example, a stochastic system does not
always produce the same output for a given input. A few components of systems that
can be stochastic in nature include stochastic inputs, random time-delays, noisy
(modelled as random) disturbances, and even stochastic dynamic processes.
Continuous system
Continuous systems are those types of systems in which input and output signals are the
same at both the ends. In this type of system, variable changes with time and any type of
variation is not found in the input and output signal. In response to the input signal, a
continuous system generates an output signal.

Suppose, we have two variable x and y and both vary with time. Continuous signals are
represented within parenthesis.

Discrete systems
In discrete systems, both input and output signals are discrete signals. The variables in the
discrete systems vary with time. In this type of system, the changes are predominantly
discontinuous. The state of variables in discrete system changes only at a discrete set of
points in time.

The variables in the discrete system are x and y and they are always presented in square
brackets [ ].
Systems modeling
Systems modeling or system modeling is the interdisciplinary study of the use
of models to conceptualize and construct systems in business and IT development.[2]
A common type of systems modeling is function modeling, with specific techniques such
as the Functional Flow Block Diagram . These models can be extended using functional
decomposition, and can be linked to requirements models for further systems partition.
Contrasting the functional modeling, another type of systems modeling is architectural
modeling which uses the systems architecture to conceptually model
the structure, behavior, and more views of a system.

Type Of Model

Physical Model
- Physical model is the smaller or larger physical copy of an object
being modeled.
- The geometry of model is just the rescaled view of the object it
represents.
- The horizontal and vertical scaling may not be balanced as per the
requirements of the model.
- The physical model helps in visualization of the object taken into
consideration in an effective way.
- It is also used to solve equations with the particular boundary
conditions.

Static Physical Model:


- Static physical model is the physical model which describes
relationships that do not change with respect to time.
- Such models only depict the object’s characteristics at any instance
of time, considering that the object’s property will not change over
time.
- Eg : An architectural model of a house, scale model of a ship and so
on.

Dynamic Physical Model:


- Dynamic physical model is the physical model which describes the
time varying relationships of the object properties.
- Such models describes the characteristics of the object that changes
over time.
- It rely upon the analogy between the system being studied and some
other system of a different nature, but have similarity on forces that
directs the behavior of the both systems.
- Eg: A model of wind tunnel, a model of automobile suspension and
so on.

Mathematical Model
- Mathematical model is the model which is composed of a symbols
and logic.
- Such model is also called an abstract model.
- It describes the system using mathematical concepts.
- The mathematical model is used to explain the system and to study
the effects of different components, and to make predictions about the
behavior of the system.
- It generally consists of following major elements:
a) Governing equations
b) Defining equations
c) Constitutive equations
d) Constraints
Static Mathematical Model:
- Static mathematical model is the mathematical model that represents
the logical view of the system in equilibrium state.
- Such models are time-invariant.
- It is generally represented by the basic algebraic equations.
- Eg: An equation relating the length and weight on each side of a
playground variation, supply and demand relationship model of a
market and so on.

Dynamic Mathematical Model:


- Dynamic mathematical model is the mathematical model that
accounts for the time dependent changes in the logical state of the
system.
- Such models are time-variant.
- It is generally represented by differential equations or difference
equations.
- Eg: The equation of motion of planets around the sun in the solar
system.

Distributed-Lag Models

Distributed-Lag Models. A distributed-lag model is a dynamic model in which the effect of a


regressor x on y occurs over time rather than all at once.

Simulation Modeling Steps


 

A simulation of a system is the operation of a model of the


system; “Simulation Model”. The steps involved in developing a
simulation model, designing a simulation experiment, and
performing simulation analysis are: [1]
 Step 1. Identify the Problem: Enumerate problems with an
existing system. Produce requirements for a proposed system.
 Step 2. Formulate the Problem: Select the bounds of the
system, the problem or a part thereof, to be studied. Define
overall objective of the study and a few specific issues to be
addressed. Define performance measures – quantitative criteria
on the basis of which different system configurations will be
compared and ranked. Identify, briefly at this stage, the
configurations of interest and formulate hypotheses about system
performance. Decide the time frame of the study. Identify the end
user of the simulation model.
 Step 3. Collect and Process Real System Data: Collect data on
system specifications, input variables, as well as performance of
the existing system.
 Step 4. Formulate and Develop a Model: Develop schematics
and network diagrams of the system. Translate these conceptual
models to simulation software acceptable form. Verify that the
simulation model executes as intended. Verification techniques
include traces, varying input parameters over their acceptable
range and checking the output, substituting constants for random
variables and manually checking results, and animation.
 Step 5. Validate the Model: Compare the model’s performance
under known conditions with the performance of the real system.
Perform statistical inference tests and get the model examined by
system experts. Assess the confidence that the end user places
on the model and address problems if any.
 Step 6. Document Model for Future Use: Document objectives,
assumptions and input variables in detail. Document the
experimental design.
 Step 7. Select Appropriate Experimental Design: Select a
performance measure, a few input variables that are likely to
influence it, and the levels of each input variable. Generally, in
stationary systems, steady-state behavior of the response
variable is of interest. Ascertain whether a terminating or a
nonterminating simulation run is appropriate. Select the run
length. Select appropriate starting conditions. Select the length of
the warm-up period, if required. Decide the number of
independent runs – each run uses a different random number
stream and the same starting conditions – by considering output
data sample size. Sample size must be large enough (at least 3-5
runs for each configuration) to provide the required confidence in
the performance measure estimates. Alternately, use common
random numbers to compare alternative configurations by using a
separate random number stream for each sampling process in a
configuration. Identify output data most likely to be correlated.
 Step 8. Establish Experimental Conditions for Runs: Address
the question of obtaining accurate information and the most
information from each run. Determine if the system is stationary
(performance measure does not change over time) or non-
stationary (performance measure changes over time).
 Step 9. Perform Simulation Runs: Perform runs according to
steps 7-8 above.
 Step 10. Interpret and Present Results: Compute numerical
estimates (e.g., mean, confidence intervals) of the desired
performance measure for each configuration of interest. Test
hypotheses about system performance. Construct graphical
displays (e.g., pie charts, histograms) of the output data.
Document results and conclusions.
 Step 11. Recommend Further Courses of Action: This may
include further experiments to increase the precision and reduce
the bias of estimators, to perform sensitivity analyses, etc.
Although this is a logical ordering of steps in a simulation study,
many iterations at various sub-stages may be required before the
objectives of a simulation study are achieved. Not all the steps
may be possible and/or required. On the other hand, additional
steps may have to be performed. 

Amdahl’s law
It is named after computer scientist Gene Amdahl( a computer architect from IBM and
Amdahl corporation), and was presented at the AFIPS Spring Joint Computer Conference
in 1967. It is also known as Amdahl’s argument. It is a formula which gives the
theoretical speedup in latency of the execution of a task at a fixed workload that can be
expected of a system whose resources are improved. In other words, it is a formula used
to find the maximum improvement possible by just improving a particular part of a
system. It is often used in parallel computing to predict the theoretical speedup when
using multiple processors.
Speedup-
Speedup is defined as the ratio of performance for the entire task using the enhancement
and performance for the entire task without using the enhancement or speedup can be
defined as the ratio of execution time for the entire task without using the enhancement
and execution time for the entire task using the enhancement.
If Pe is the performance for entire task using the enhancement when possible, Pw is the
performance for entire task without using the enhancement, Ew is the execution time for
entire task without using the enhancement and Ee is the execution time for entire task
using the enhancement when possible then,
Speedup = Pe/Pw
or
Speedup = Ew/Ee
Amdahl’s law uses two factors to find speedup from some enhancement –
 Fraction enhanced – The fraction of the computation time in the original computer
that can be converted to take advantage of the enhancement. For example- if 10 seconds
of the execution time of a program that takes 40 seconds in total can use an
enhancement , the fraction is 10/40. This obtained value is Fraction Enhanced.
Fraction enhanced is always less than 1.
 Speedup enhanced – The improvement gained by the enhanced execution mode; that
is, how much faster the task would run if the enhanced mode were used for the entire
program. For example – If the enhanced mode takes, say 3 seconds for a portion of the
program, while it is 6 seconds in the original mode, the improvement is 6/3. This value is
Speedup enhanced.
Speedup Enhanced is always greater than 1.
The overall Speedup is the ratio of the execution time:-
Gustafson’s Law

Gustafson demonstrated with a 1024-processor system that the basic presumptions


in Amdahl’s Law are inappropriate for massive parallelism [Gustafson88].
Gustafson found that the underlying principle that “the problem size scales with
the number of processors, or with a more powerful processor, the problem
expands to make use of the increased facilities is inappropriate” [Gustafson88].

Gustafson’s empirical results demonstrated that the parallel or vector part of a


program scales with the problem size. Times for vector start-up, program loading,
serial bottlenecks, and I/O that make up the serial component of the run do not
grow with the problem size [Gustafson88].

Gustafson formulated that if the serial time, s, and parallel time, p = (1 − s),
on a parallel system with n processors, then a serial processor would require
the time:

Comparing the plots of Equations 7.1 and 7.2 in Figure 7.3, it can be seen that
Gustafson presents a much more optimistic picture of speedup due to parallelism
than does Amdahl. Unlike the curve for Amdahl’s Law, Gustafson’s Law is a
simple line, “one with a much more moderate slope: 1 − n. It is thus much
easier to achieve parallel performance than is implied by Amdahl’s paradigm”
[Gustafson88].

A different take on the flaw of Amdahl’s Law can be observed as “a more


efficient way to use a parallel computer is to have each processor perform similar
work, but on a different section of the data. . . where large computations are concerned
this method works surprisingly well” [Hillis98]. Doing the same task but
on a different range of data circumvents an underlying presumption in Amdahl’s
Law, that is, “the assumption that a fixed portion of the computation. . . must be
sequential. This estimate sounds plausible, but it turns out not to be true of most
computations” [Hillis98].

You might also like