Computer Simulation-and-Modeling
Computer Simulation-and-Modeling
Computer Simulation-and-Modeling
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
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.
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.
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.
Distributed-Lag Models
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 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].