0% found this document useful (0 votes)
314 views32 pages

Simulation and Modelling - Module-1

This document provides lecture notes on simulation and modeling. It covers key concepts like discrete and continuous systems, system modeling types, Monte Carlo simulation, comparison of simulation and analytical methods, numerical computation techniques, probability concepts, random number generation, discrete event simulation using GPSS, simulation languages, experimental design, analysis of simulation output, and simulation of queuing, inventory, and scheduling systems. The document contains 3 modules that discuss these topics in detail across 25 sections to provide students an overview of simulation and modeling concepts and techniques.
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)
314 views32 pages

Simulation and Modelling - Module-1

This document provides lecture notes on simulation and modeling. It covers key concepts like discrete and continuous systems, system modeling types, Monte Carlo simulation, comparison of simulation and analytical methods, numerical computation techniques, probability concepts, random number generation, discrete event simulation using GPSS, simulation languages, experimental design, analysis of simulation output, and simulation of queuing, inventory, and scheduling systems. The document contains 3 modules that discuss these topics in detail across 25 sections to provide students an overview of simulation and modeling concepts and techniques.
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/ 32

Smartzworld.com Smartworld.

asia

1|Page

Department of MCA

LECTURE NOTE

ON

SIMULATION AND MODELLING

COURSE CODE: MCA-302

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

2|Page

MCA-302 Simulation & Modelling L-T-P: 3-1-0

Prerequisite: Familiarity with Linear Algebra, Probability and Statistics, Discrete


structures, graph theory Object-oriented design and programming.

Module-1 (10 Hours)


Inventory Concept: The technique of Simulation, Major application areas, concept of a
System, Environment, Continuous and discrete systems, systems modeling types of
models progress of a Simulation Study, Monte Carlo Method, Comparison of Simulation
and Analytical Methods. Numerical Computation Technique for discrete and
continuous models, Continuous System Simulation.

Module-2 (10 Hours)


Probability Concepts in Simulation : Stochastic variables, Discrete and Continuous
Probability Functions, Numerical evaluation of continuous probability functions,
continuous uniformly distributed random numbers, Random Number Generators –
Linear congruential Generator, Mid Square Method, Multiplicative Congruential
generator, rejection Method, Testing of random Numbers, Generation of Stochastic
variates, Arrival Patterns Service times.

Module-3 (10 Hours)


Discrete System Simulation and GPSS: Discrete Events, Representation of Time,
generation of arrival patterns, fixed time step versus next event simulation, Simulation
of a Telephone System, delayed calls. Introduction to GPSS : Creating and moving
transactions, queues, facilities and storages, gathering statistics, conditional transfers,
program control statements, priorities and parameters, standard numerical attributes,
functions, gates, logic switches and tests, Variables, Select and Count.

Module-4 (10 Hours)


Simulation Languages and Practical Systems: Continuous and discrete systems
languages, factors in the section of discrete systems simulation language. Computer
model of queuing, inventory and scheduling systems. Design and Evaluation of
simulation Experiments: Length of simulation runs, validation, variance reduction
techniques, experimental layout, analysis of simulation output, Recent trends and
developments.

Text Books:

1. Geoffrey Gordon, System Simulation,2/E, PHI Learning.


2. Narsingh Deo, System Simulation with Digital Computer, 2007, PHI Learning.

References:

1. Jerry Banks, John S. Carson II, Barry L. Nelson, David M. Nicol, P. Shahabudeen,
Discrete-Event System Simulation, Fourth Edition, Pearson Publication.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

3|Page

SIMULATION & MODELING


CONTENT
Page No.

1. Concept of a System 3
1.1 Discrete and continuous system
1.2 System Environment
1.3 Exogenous and Endogenous System
1.4 Deterministic and Stochastic System
2. Models 6
2.1 Types of Models
2.2 Principles used in modelling
3. Definition of Simulation and Application areas 13
4. Monte-Carlo technique of Simulation 14
5. Comparison of simulation and analytical methods. 15
6. Numerical Computation Technique 16
6.1 NCT for continuous models
6.2 NCT for discrete model
7. Program of a simulation study 21
8. Continuous system simulation 23
8.1 CSMP III program with details
9. Advantage of digital simulation over Analog simulation 30
10.Discrete & Continuous Probability function 31
11.Random number generation 34
11.1 Congruential generation
11.2 Mid-square method
11.3 Rejection method
12.Testing of random numbers 40
12.1 Kolmogorov-Smirnov Test
12.2 Chi - square Test with example
13.Generation of Stochastic Variables 46

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

4|Page

13.1 Inverse Transformation Technique.


14.Arrival Patterns 50
15.Service times Queuing Disciplines 54
16.Discrete Event Simulation 55
15.1 Representation of time
15.2 Generation of Arrival Patterns
15.3 Simulation of a telephone system
17.Introduction to GPSS 59
17.1 Simulation of a manufacturing shop
17.2 Facilities & Storage
17.3 Gathering statics, Conditional Transfers
17.4 Program Control Stunts
17.5 Priorities and Parameters
17.6 Standard numerical Attributes
18.Simulation of a single server queue 67
19.Simulation of a two server queue 68
20.Simulation of Inventory system 70
21.Length of simulation Runs, Variance Reduction Techniques 74
22.Continuous and discrete systems languages 78
22.1 Factors in the section of discrete systems simulation
language.
23.Verification and Validation 81
24.Experimental Layout Details 84
24.1 Factorial and Fractional design
25.Analysis of simulation output 85
26.1 Regenerative Techniques
26.2 Spectral analysis.
26.Simulation of Scheduling system 88

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

5|Page

SIMULATION AND MODELLING


MODULE – 1
Concept of a system:-
A system is defined as an aggregation or assemblage of objects joined in some
regular interaction or interdependence .Systems are of two types :-
• Static System
• Dynamic System

In static systems there are no changes over time where as in dynamic systems
the interactions cause changes over time.

Example 1
An aircraft system

Θi
Gyroscope Control surface Airframe
Desiredheading

Θο
Actual heading

An aircraft under autopilot control

Consider an aircraft flying under the control of an autopilot. A gyroscope in the


autopilot detects the difference between the actual heading and discard heading .It sends a
signal to move the control surfaces. In response to the control surface movement the airframe
steer towards the desired heading to the desired destination.

Example 2
A factory system

Customer order
Production control department

Raw material
Purchasing Fabrication Assembly Shipping
department department department department

Finishing product

Consider a factory that make assembles parts for a product. Two major components of
the factory system are the fabrication department that makes the part & the assembly

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

6|Page

department that produces the product. A purchasing department maintains & a shipping
department dispatches the finished product. A production control department receives order
& assigns work to the other department.

Components of a system
Three basic components are:-
• Entity
• Attributes
• Activities

Entity: - It is used to denote an object of interest in a system.

Attribute: - It denotes a property of an entity.

Activity:-Any process that causes changes in the system is called as an


activity.

Example:-

In the factory system the entities are the department, orders, parts and
products.Attributes are such factors as the quantities for each order, type of part or number of
machines in a department.The activities are the manufacturing process of the departments.

State of the system


It is used to mean a description of all the entities, attributes and activities as they exist
at one point of time.
Progress:-The progress of the system is studied by the system following a change in the state
of the system.

System Environment
A system is often affected by changes occurring outside the system. Such changes
occurring outside the system are said to occur in the system environment. An important step
in modelling system is to decide upon the boundary between the system and its environment.

The term endogenous is used to describe activities occurring within the system.
Example: sports, cultural functions in a university system.

The term exogenous is used to describe the activities in the environment that affect the
system.
Example: strikes in a university system.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

7|Page

Based on these activities a system may be classified as open or closed system. A


system for which there is no exogenous activity is said to be a closed system. A system that
has exogenous activities is called as an opensystem.

Deterministic vs.Stochastic Activities


Depending on the manner on which they can be described activities can be classified
as deterministic or stochastic.

Deterministic
An activity is said to be deterministic where the outcome of an activity can be
described completely in term of its input,
Example: AND, OR, NOT operations.

Stochastic
An activity is said to be stochastic where the effects of the activity vary randomly
over various possible outcomes.
Example: Throwing a dice or tossing a coin.

Continuous vs. Discrete system

Continuous system
Systems in which the changes are predominantly smooth are called continuous
system.
Example:
The movement of the aircraft occurs smoothly so aircraft system is a continuous
system.

Discrete system
Systems in which the changes are predominantly discontinuous are called discrete
system.
Example:
Changes in the factory occur discontinuously so factory system is a discrete system.

Sampled data system


There are also systems that are intrinsically continuous but information about them is only
available at discrete points of time. These are called sampled data system.
Example:
Examination system

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

8|Page

System modelling
The model is defined as the body of information about a system gathered for the purpose of
studying the system. The tasks of deriving a system model are divided into two subtasks.
They are
1. Establishing the model structure
2. Supplying the data

Establishing the model structure

It determines the system boundary and identifies the entities, attributes and activities
of the system.

Supplying the data

The data provides the values that the attributes can have and define the
relationships involved in the activities.

Types of models

MODELS

PHYSICAL MATHEMATICAL

STATIC DYNAMIC STATIC DYNAMIC

NUMERICAL ANALYTICAL NUMERICAL

SYSTEM
SIMULATION

Models are broadly classified into physical models or mathematical models.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

9|Page

Physical models:
Physical models are based on some analogy between such systems as mechanical and
electrical or electrical or hydraulic. Here the system attributes are represented by such
measurements as voltage or the position of a shaft. The system activities are reflected in the
physical laws that derive the models.

Mathematical models:
The mathematical model use symbolic notations and mathematical equations to
represent a system. The system attributes are represented by variables and the activities that
represented by mathematical functions that interrelate the variables.

A second distinction is between static models and dynamic models. Static models can
only show the values that system attributes take where the system is in balanced. Dynamic
models follow the changes over time that result from system activities.

In case of mathematical model the third distinction is a technique by which the model
is solved that is actual values are assigned to system attributes.

A distinction is made between analytical and numerical method. Applying analytical


techniques means using the deductive reasoning of mathematical theory to solve a model.

Example: linear differential method

Numerical methods involve applying computational procedure to solve equations.


Any assignment of numerical values that uses mathematical tables involves numerical
methods.

System Simulation:
It is considered to be a numerical technique used in conjunction with dynamic models.
Models are of two types:

• Deterministic
• Stochastic

Static physical models:

They are used in ship buildings, deciphering of DNA molecules, Wind Tunnels and Water
Tanks in the course of designing air craft or ship. They are also used for solving equations
with particular boundary condition. Example: Scale models.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

10 | P a g e

Dynamic Physical models:

They rely upon an analogy between the system being studied and some other system
of a different nature.

The first figure represents the wheel suspension system of an automobile. It consists of mass (M) that
is subject to an applied force (F (t)) varying with time. A spring whose force is proportional to its

Extension and contraction and shock absorber that absorbs the damping force
proportional to the velocity of the mass. The motion of the system can be represented by the
following differential equation.

      = KF (t)

  = =



= velocity

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

11 | P a g e

  =  = Rate of change of velocity = Acceleration




Where, M = Mass

D = Damping factor of shock absorber

K = Stiffness constant of spring

x = Displacement of mass

F (t) = Applied force

The 2nd figure represents an electrical circuit with a resistance “R” and inductance “L”
and capacitance “C” connected in series with a voltage source that varies in time according to
the function E (t). Let “q” be the charge on the capacitance. This system can be represented
by the following equation-

    =
  
 

  = = Rate of change of charge = Current




  =  = Rate of change of current = Voltage


 

Where, L = Inductance

R = Resistance

q = Charge on Capacitance

C = Capacitance

E (t) = Function on voltage source that varies with time

By comparing two equation of mechanical system and electrical system which are
similar to each other given below.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

12 | P a g e

MECHANICAL SYSTEM ELECTRICAL SYSTEM

Mass (M) Inductance (L)

Damping Factor (D) Resistance (R)

Spring Constant (K) Capacitance (1/C)

Force F(t) Applied Voltage E(t)

Displacement (x) Charge (q)

Velocity ( ) Current ( )

Acceleration ( ) Voltage ( )

Both the systems are analogues of each other and the performance of either can be
studied with the other. It is similar to modify the electrical system than to change the
mechanical system. Example: Two credit what effect a change in the shock absorber will
have on the performance of the car. It will only necessary to change value of resistance in the
electrical circuit and observe the effect on the way the voltage varies.

Static Mathematical Models:

A static model gives the relationship between the system attributes when the system is in
equilibrium. Example: In marketing a commodity there is a balance between the supply and
demand for the commodity. Both factor depend upon price. The demand for a commodity
will be low when the price is high and it will increase as the price drops.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

13 | P a g e

PRICE

Equillibrium Point

QUANTITY

Demand (Q) Supply (S)

Q = a - bp

S = c + dp

S = Q (Equilibrium)

Q = Demand

P = Price

S = Supply

a, b, c, d are constants.

c + dp = a – bp (b + p) d = a - c
 !

"#

(Equilibrium price where demand = supply)

Dynamic Mathematical Model:

It allows the changes of system attributes to be derived as a function of time. This derivation
may be made with analytical solution or with a numerical computation depending upon the
complexity of the model.

     = KF (t)

This an equation of a wheel suspension of a vehicle.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

14 | P a g e

Principles used in modelling:

The guiding principle of modelling are:

a. Block Building
b. Relevance
c. Accuracy
d. Aggregation
Block Building:

The description of the system should be organized in a series of block. The aim is to simplify
the specification of the interaction with in a system. Each block describes a part of the system
that depends upon the few input variables and results in few output variables. The system as a
whole can be described in terms of interconnection between the blocks and can be
represented graphically as a simple block diagram. Example: The description of a factory is
an example of a block diagram where each department has been treated as a separate block
where the inputs and outputs being the work passed from department to department.

Relevance:

The model should only include those aspects of the system that are relevant to the study of
the objective. A relevant information should be excluded because it increases the complexity
of the model and causes more work in solving the model.

Accuracy:

The accuracy of the information gathered for the model should be considered.

Aggregation:

It is the extent to which the number of individual entities can be grouped together into larger
entities. In some studies it may be necessary to construct artificial entities through the process
of aggregation. Example: An economic or social studies usually treats a population as a
number of social classes and conduct the study as each social class as a distinct entity.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

15 | P a g e

Population

Government Home
Students Business Private Jobs
Jobs Makers

Application Areas of Simulation:


Simulation is an experimental technique. It is a fast and experimental method of doing
an experiment under computer. There is no specific unifying theory of computer simulation
and no principle guiding the formulation of simulation model. Simulation may be applied for
system, there is difficult to predict like whether or public jam where the system itself is
complex or the theory is not sufficiently regular. Simulation provides an alternative that is
cheap and fast and fills the gap between exact analysis and physical intuition.

Simulation in Science and Engineering Research:

Earlier most experiments were carried out physically in the laboratories. Millions
were spent on physical models like network analysers, Aircraft flight, Simulators and
expensive experiments.

Today a majority of experiments are simulated in a simulator. Computer experiments are


faster cheaper, easier and provide better inside into the system than laboratory experiments.

Simulation in Soft science:

Simulation plays vital role in biology, sociology and economics, medicines etc.,
where experimenting could be very expensive dangerous or even impossible.

In field such as Biology and economics, the problems are large involving thousands of
variables and are complicated due to uncertainty.

Simulation for Business executive:

There are many problems faced by management that cannot be solved by standard
operations research tools like linear and dynamic programming inventory and queuing. So a
business executive has to make a decision best on his intuition and experiment. But with
computer simulation he can make better and meaningful decisions. Simulation is widely used
for inventory control, facility planning, production scheduling etc.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

16 | P a g e

System Simulation:
It is defined as the technique of solving problems by the observations of performance
over time of a dynamic model of system. This definition includes the use of dynamic physical
models where the results are derived from physical measurements rather than numerical
computations.

Monte Carlo Technique of Simulation:


)

(*+ 

a ,- b x
Figure - The Monte Carlo Method

The Monte Carlo method is a numerical computational method which consists of


experimental sampling with random number.

For example, the integral of a single variable over a given range corresponds to
finding the area under the graph representing the function. Suppose the function f(x0) is
positive and has lower and upper bound a and b respectively and the function is bounded
above by the value c. The graph of the function is then contained within a rectangle with
sides of length (b-c) and c. If we are pick points at random within the rectangle and
determined whether they lie beneath the curve or not, it is apparent that, providing the
distribution of selected points is uniformly spread over the rectangle, the fraction of points
falling on or below the curve should be approximately the ratio of the area under the curve to
the area of the rectangle.

If ‘N’ points are used and ‘n’ of them fall under the curve, then approximately

n/N = $
& %


&'

 $ (#= n/N * c(b-a)


&

The accuracy improves as the number N increases. When it is decided that sufficient points
have been taken, the value of integral is estimated by multiplying n with N by the area of
rectangle i.e.)c(b-a).

Computational Technique:-

For each point, a value of ‘x’ is selected at random between a and b, say x0. A second
random selection is made between 0 and c to give Y. If Y0 is <=f(x0), the point is accepted
in the count ‘n’, otherwise it is rejected and the next point is picked. This method often
based on integral of many variables by using a random number for each of the variables.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

17 | P a g e

Monte Carlo application are sometimes classified as being simulation. Simulation and
Monte Carlo method are both numerical computational technique but the difference is that
simulation applies to dynamic model whereas MonteCarlo technique applied to static
model.

Comparison of Simulation and Analytical Method:

The main drawback of simulation is:

• It gives specific solution rather than general solution.


For example, in the study of automobiles wheel, an analytical solution gives all the
condition that can cause oscillation. But each execution of a simulation only tells
whether a particular set of condition did or did not cause oscillation. To try to find
all such condition required that the simulation be repeated under many different
condition.
• The step by step nature of the simulation technique means that the amount of
computation increases very rapidly as the amount of detail increases. Coupled with
the need to make many runs, the simulation model result in extensive amount of
computing.
• Many simulation runs may be needed to find a maximum and yet leave undecided
the question of whether it is a local or global maximum.

Drawback of Analytical Technique:


• The range of problem that can be solve mathematically is limited.
• Mathematical technique requires that the model be expressed in some particular
format. For example, in the form of linear algebraic equation and continuous linear
differential equation.
• There are many simple limitation on a system such as physical stock, finite time
delays or non-linear forces which makes a soluble mathematical model insoluble.
But simulation removes this limitation.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

18 | P a g e

Numerical Computation Technique for Continuous Models:-


To illustrate the general numerical technique of simulation based on a continuous
model, consider the following example. A builder observes that the rate at which he can sell
houses depends directly upon the number of families who do not yet have a house. As the
number of people without houses diminishes, the rate at which he sells house drops. Let Hbe
the potential number of households, andybe the number of families with houses. The situation
is represented in Fig. 1.

N
U
M
B
E
R
S
O
L
D

The horizontal line at H is the total market for houses. The curve for y indicates how
the number of houses sold increases with time. The slope of the curve (i.e., the rate at which y
increases) decreases as H-y gets less. This reflects the slowdown of sales as the market
becomes saturated. Mathematically, the trend can be expressed by the equation

y. = k1 (H-y), y=0 at t=0

Consider now a manufacturer of central air conditioners designed for houses. His rate
of sales depends upon the number of houses build. (For simplicity, it is assumed that all
houses will install an air conditioner.) As with house sales, the rate of sales diminishes as the
unfilled market diminishes.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

19 | P a g e

Let s be the number of installed air conditioners. Then the unfilled market is the
difference between the number of houses and the number of installed air conditioners. The
sales trend may be expressed mathematically by the equation

x. = k2(y-x), x=0 at t=0

The change of s with time is also illustrated in Fig. 2. The two equation constitute a mode of
the growth of air conditioner sales. Because of its simplicity, it is in fact possible to solve the
method analytically. However, it quickly becomes insoluble if it is expanded to become more
representative of actual marketing conditions. The market limit, for example, may not be
stable. It could grow with population growth or fluctuate with economic conditions. The
coefficients that determine the rates of growth could be influences by the amount of money
spent on advertising, and there could be competitive influences, such as mobile homes or
apartment housing. These influences could also depend upon the population growth or
prevailing economic condition, and so further complicate the model.

The simple model, however, will serve to illustrate the general methods applied in
suppose that the computation is made at uniform intervals of time and that the calculation has

NUMBER SOLD

already progressed to the time ti when the two variables of the problem have the values yi and
si. Figure 2 shows the next step in the calculation.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

20 | P a g e

The calculation steps forward an interval ∆t to ti+1 = ti+ ∆t. The rates of sales are
assumed to be constant over the interval. The rates can be interpreted as the amount of
change per unit time. That is,
./0
.1
rate of change of y =

./0
.1
rate of change of x =

From the equations of the model, these may be written

∆yi = k1 (H-yi) .1

∆xi = k2(H-xi) .1

Since yi and xi are known, it is a simple matter to get the values of y and x at time ti+1.
However, it will be noticed that the equation for ∆yi must be solved first to get the value of yi
needed in the equation for xi. In preparation for the solution of a continuous system model,
therefore, there must be a careful sorting of the equations to establish a workable order.

Repetition of the calculation using the new values of y and x produces the output at
the end of the next interval. As illustrated in Fig.2, the calculation is equivalent to calculation
the slope at each point and projecting a short straight line at that slope. The simulation output
is a series of such line segments, approximating the continuous curve that represents the true
output of the model.

The method described is a very simple way of integrating differential equations


numerically, but it is not a very accurate method, unless small steps are used, compared with
the rate at which the variables change. There are other much more accurate, and often more
efficient, ways of integrating numerically which do not rely simply upon the last-known
value of the variables. Rather, they use several previous values to predict the rate at which the
variables are changing. (Special methods are used to supply initial values to start the process.)
In addition, the computation interval is often adjusted in size to match the rate at which the
variables are changing.

There are many programming systems available that incorporate continuous system
simulation languages. They usually include a number of computational methods for the user’s
selection.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

21 | P a g e

NCT for Discrete Models: -


Document Start Work Finish Cumulative Break
Pending
No. Time(Tw) Time(Tc) Flag(Y/N)
Time(Ts) Time(Tf)
Jobs(N)

1 0 45 45 45 N 57

2 45 16 61 61 Y 56

3 66 5 71 5 N 55

4 71 29 100 34 N 54

5 100 33 133 67 Y 53

6 138 25 163 25 N 52

7 163 21 184 46 N 51

NOTE :-Tf = Ts + Tw, Tc= Tc + Tw

Consider the above example, a clerk begins his days of works with a file of document
to be processed. The time taken to process them varies. He works through the file beginning
each document, as soon as he finishes the previous one except that he takes that 5min break if
at that time, he finishes a document is an hour or more, since he begins work or he left a
break. We assume that the time to process the documents are given. We will keep a count of
no. of documents left for processing. This count will be initially set to the no. of document at
the beginning of the day and we assume that no. of document arrive during the day. The
count will be decremented for each completed job and the work will stop when count goes to
zero.

The first column numbers the documents, the second column gives the time the clerk
begins to work for a document denoted by (Ts), the third column give the time required to
work on the document called as the work time(Tw), the fourth column gives the time at
which the document is finished processing in time (Tf), the fifth column contains the

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

22 | P a g e

cumulative time since work started on since the last break measured at the time each job is
completed (Tc), the sixth column contains the break flag, this take the value ‘Y’ ,if the clerk
should take a break after the ith document and the value ‘N’ if he should not. The clerk works
until there are no more documents to be processed. On the time he finishes the document
goes beyond some prescribed time limit representing the end of the working period. The
computation proceeds row by row and from left to right.

Progress of simulation study:-


An initial state is to describe the problem to be solved in a concise manner so that
there is a clear statement of what question are being asked and what measurements need to be
taken in order to answer those question. Based on this problem definition a model must be
defined.

A possible solution is to explore to pass the model that can be solved analytically. The
result will help to guide the simulation technique.

When it is decided to simulate, we must plan the study by deciding upon the major
parameters to be varied, the no. of cases to be conducted and order in which runs are to be
made.

Given that, the simulation is to be on a digital computer and its program must be
written. The next stage is, executing a series of runs according to the study plan. The main
value of the early runs in a simulation study is to get insight in to general behaviour of the
system and to know which parameters are important for the system. This may lead to
reassessment of the model then results are verified and if found reasonable, simulation stops.

Given that, the simulation is to be on a digital computer and its program must be
written. The next stage is, executing a series of runs according to the study plan. The main
value of the early runs in a simulation study is to get insight in to general behaviour of the
system and to know which parameters are important for the system. This may lead to
reassessment of the model then results are verified and if found reasonable, simulation stops.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

23 | P a g e

Describe the
Problem

Define a Model

Simulate? N Use Analytical Reasonable? Y


Methods

Y N

Plan the Study Redefine the


Model

Write a
Program

Validate the
Model

Run the Model

Reasonable? N

Y N

Y Run N Y
Reasonable?
More? Verify Result Stop

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

24 | P a g e

PROGRESS OF SIMULATIONSTUDY

Describe the
problem

Define a
model

Simula N Reaso N
Use analytical
te? methods nable?

Y Y

Redefine
Plan the model
study

Write a
program

Validate the
model

Run the
model

N
Reaso
nable?

Y More N Reasonab Y
Verify result le?
runs? Stop

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

25 | P a g e

An initial state to describe the problem to be solved in a concise manner so that there
is a clear statement of what questions to be asked and what measurements needed to be taken
answer these questions.

• Based on these problem definition a problem must be defines


• A possible part explore the cost of a model that can be solved analytically the results
in guiding the simulation study.
• When it is decided to simulate we must plan the study by deciding upon the measure
parameter to be varied the number of cases to be conducted and the order in which
runs at to be made.
• Given that the simulation is to be on a digital computer a program must be written.
The next stage is executing runs to be study plans.
• The main value of the early runs in a simulation study is to get inside into the general
behaviour of the system and to know which Parameters are important for the system.
• This may lead to re-assessment of the model, when results are verified and it found
reasonable the simulation will be stopped.

Continuous System Simulation


“A Continuous system is one in which the predominant activities of the system cause
smooth changes in the attributes of the system entities”.

When a system is modelled mathematically the variable of the model


representation the attributes are controlled by continuous system. In Continuous system the
relationship describes rates at which attributes changes, so changes that the model consists of
differentiation equation.

For Example wheel suspension system of an Automobile.

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

26 | P a g e

x K
D

f(t)

(DIAGRAM WHEEL SUSPENSION SYSTEM OF AN AUTOMOBILE)

This system represents the suspension of an automobile wheel when the automobile
body is assured to be immobile in a vertical direction. The figure represents a mass ‘M’
which is subject to an applied force F(t) varying with time. A spring whose force is
proportional to its extension or contraction given by ‘K’ and a shock absorber which exerts a
damping force ‘D’ proportional to velocity of the mass.

If we pick a point of the wheel as a reference point from which to measure the vertical
displacement of the wheel, the variable ‘x’ represents the displacement of the point taking ‘x’
to be positive for an upward movement. The velocity of the wheel in the vertical direction is
the rate of change of displacement which is first differential.

3 =
43
41

The acceleration of wheel in the vertical direction is the rate of change of velocity
45 3
which is second differential i.e.3 = 415 , for mass ‘M’ and applied force KF (t).The equation of
motion in the absence of any other forces should be

KF(t)=  -------------------------------------------------(1)

This force is represented by  ,where ‘D’ is the measure of viscosity of the shock
But the shock absorber exerts a resisting force that depends on the velocity of wheel.

absorber. The spring also exerts a resisting force which depends on the extend to
which it has been compressed, represented by K(x), where ‘K’ is a constant defining a
stiffness of the spring. Since both these forces oppose the motion of wheel they are to
be subtracted from the applied force to given following equation.

KF (t)- -Kx= 

 =KF (t)- -kx ---------------------------------------------(2)

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

27 | P a g e

CSMPIII PROGRAM OF WHEEL SUSPENSION SYSTEM OF AN AUTOMOBILE

TITLE AUTOMOBILE SUSPENSION SYSTEM

PARAM D=(5.656,16.968,39.582,56.56)

CONST M=2.0, F=1.0, K=400.0

X2DOT=(1.0/M)*(K*F-D*XDOT-K*X)

XDOT=INTGRL (0.0, X2DOT)

X= INTGRL (0.0, XDOT)

TIMERDELT =0.005, FINTIM =1.5, PREDEL =0.05, OUTDEL =0.05

PRINT X, XDOT ,X2DOT

PRTPLT X

LABEL DISPLACEMT VERSUS TIME

END

STOP

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

28 | P a g e

DIAGRAM FOR CSMPIII PROGRAM OF WHEEL SUSPENSION


SYSTEM OF AN AUTOMOBILE

 1   - 
K
-
D 

K Scale
Integrator Sign Inverter Integrator Sign Inverter
Summer Changer

Continuous System Simulation Language (CSSL)


They use statement type of input for digital computer and allow a problem to program
directly from an equation of mathematical model.

CSMP III
It consists of three types of statement,

1. Structural Statement
2. Data Statement
3. Control Statement

Structural Statement

It defines the model; it consists of FORTAN like statement and functional blocks.

Data Statement

They assign numerical value to parameters, constraints and initial conditions.

Control Statement

They specify option’s in assembly an execution of the program & the choice of
output.

Example:

X = 6Y/W+ (Z-2)

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

29 | P a g e

Structural statement, X = (6.0*Y)/W+ (Z-2.0) **2.0

Functional blocks

There are various functional block’s.

1. INTEGRATOR

Y=$+ *#8  9!

Functional block=

Y=INTGRL(IC, X)

Y (0) =IC

2. LIMITOR

It is used to limit a function within some range.

Y=LIMIT (P1, P2, X)

P1
P2

Y=P1, X<P1

Y=P2, X>P2

Y=Y=X1P1 ≤ X ≤ P2

3. STEP FUNCTION

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

30 | P a g e

Y=STEP (P)

Y=

Y=SIN(X)

Y=ABS(X)

DATA STATEMENT

INCON

It can be used to set the initial values of the integration function.

CONST A=0.5

PARAM

It is used to specify a series of values in a parameter.

PARAM D= (0.25, 0.50, 0.75, 1.0)

CONTROL STATEMENT

TIMER

It is used to specify certain time interval.

Ex:-

TIMER DELT = 0.05 (Integration interval)

FINTIM = 1.5 (Finish time)

PRDEL = 0.1 (Interval at which to print result)

OUTDEL = 0.1 (Interval at which to print-plot)

• If printed or print-plot output is required, control statement with the word PRINT and
PRTLT are follows by the names of variable.
• TITLE, LABLE is used to put heading on the printed and PRTLT output.

Example

Write a CSMP III program of an automobile suspension system.


¨
M  +D  +Kx = KF(t)
.

Answer:-
¨ .
M  =KF (t) – D  –Kx

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

31 | P a g e

¨
 =1/M {KF (t) – D -Kx}
.

TITLE AUTOMOBILE SUSPENSION SYSTEM

PARAM D= (5.656, 16.968, 39.582, 56.56)

CONST M = 2.0, F = 1.0, K = 400.0

X2DOT = (1.0/M) * (K * F – D* XDOT – K * X)

XDOT = INTGRL (0.0, X2DOT)

X = INTGRL (0.0, XDOT)

TIMER DELT = 0.005, FINTIM = 1.5, PRDEL = 0.05, OUTDEL = 0.05

PRINT X, XDOT, X2DOT

PRTPLT X

LABLE DISPLACEMENT VERSUS TIME

END

STOP

WRITE A CSMP-III PROGRAM TO SOLVE THE EQUATION

<+15 +50 +200x=10


3*

== = =x=0 at t=0

<+15 +50 +200x=10


3*

<=10-15 -50 -200x


3*

<=-1/3(15 +50 +200x-10)


*

CONST M=-1/3,F=1.0,K=-10

X3DOT=(1.0/-3.0)*{(15.0*X2DOT)+(50.0*XDOT)+(200.0*X)-10}

X2DOT = INTGRL (0.0, X3DOT)

jntuworldupdates.org Specworld.in
Smartzworld.com Smartworld.asia

32 | P a g e

XDOT = INTGRL (0.0, X2DOT)

X = INTGRL (0.0, XDOT)

TIMER DELT = 0.005, FINTIM = 1.5, PRDEL = 0.05, OUTDEL = 0.05

PRINT X, XDOT, X2DOT

PRTPLT X

END

STOP

Advantages of analog simulation over digital simulation

• Higher speed of solution


• Direct access to an immediate display of the computer results.

jntuworldupdates.org Specworld.in

You might also like