You are on page 1of 6

Modeling and Simulation 19

SAMPLE DMAI

Fig. 1.6: A typical airfield, showing runways and DMPIs (black sectors).

To achieve this, we draw certain areas on the track so that if atleast one bomb falls on each
of these areas, 1000 meters will not be available anywhere on the three tracks. These areas are called
Desired Mean Areas of Impact (DMAI ), and have been shown as black areas in Fig. 1.6. Desired
Mean Points of Impact (DMPIs) and strips are chosen in such a way that, if each strip has at least
one bomb, no where a strip of dimensions 1000m × 15m is available. Number of strips Ns of effective
width Ws in a DMAI is given by,
 1, if Wd = W

Ns =   2W  ...(1.16)
int  W + 2r  + 1, otherwise
 d b

where W, Wd , rb are the width, denial width respectively of the RW and lethal radius of the bomblet.
Monte Carlo computer model of airfield denial has been discussed by Singh et al., (1997) and
is given in chapter four.

1.3.2 Distributed Lag Models—Dynamic Models


The market model, discussed in section 1.2.3 was straight forward and too simplistic. When model
involves number of parameters and hefty data, one has to opt for computer. Models that have the
properties of changing only at fixed intervals of time, and of basing current values of the variables
on other current values and values that occurred in previous intervals, are called distributed lag models
[Griliches, Zvi 1967]. These are a type of dynamic models, because time factor is involved in them.
They are extensively used in econometric studies where the uniform steps correspond to a time interval,
such as a month or a year, over which some economic data are collected. As a rule, these model
consists of linear, algebraic equations. They represent a continuous system, but the one in which data
is only available at fixed points in time.
As an example, consider the following simple dynamic mathematical model of the national
economy. Let,
C be consumption,
I be investment,
T be taxes,
G be government expenditure and Y be national income.
20 System Modeling and Simulation

Then
C = 20 + 0.7(Y − T )
I = 2 + 0.1Y 


T = 0 + 0.2Y  ...(1.17)
Y =C+ I +G 
All quantities are expressed in billions of rupees.
This is a static model, but it can be made dynamic by picking a fixed time interval, say one year,
and expressing the current values of the variables in terms of values of the previous year. Any variable
that appears in the form of its current value and one or more previous year’s values is called lagged
variables. Value of the previous year is denoted by the suffix with-1.
The static model can be made dynamic by lagging all the variables, as follows;
C = 20 + 0.7(Y−1 − T−1 )
I = 2 + 0.1Y–1 


T = 0.2Y−1  ...(1.18)
Y = C−1 + I−1 + G−1 

In these equations if values for the previous year (with –1 subscript) is known then values for
the current event can be computed. Taking these values as the input, values for the next year can
also be computed. In equation (1.18) we have four equations in five unknown variables.
It is however not necessary to lag all the variable like it is done in equation (1.18). Only one
of the variable can be lagged and others can be expressed in terms of this variable. We solve equation
for Y in equation (1.17) as
Y = 20 + 0.7(Y – 0.2Y ) + I + G
= 20 + 0.56Y + I + G
or Y = 45.45 + 2.27(I + G)
Thus we have,

I = 2.0 + 0.1Y–1 

Y = 45.45 + 2.27( I + G )

T = 0.2Y  ...(1.19)
C = 20 + 0.7(Y − T ) 

In equations (1.19) only lagged parameter is Y. Assuming that government expenditure is known
for the current year, we first compute I. Knowing I and G, Y and T for the current year is known,
and thus C is computed from the last equation. In this problem, lagged model is quite simple and
can be computed with hand calculator. But national economic models are generally not that simple
and require long computations with number of parameters.

1.4 COBWEB MODELS


In section 1.2.3, a simple static model of marketing a product had been discussed. In that model
two linear equations for demand D and supply S were considered. Aim was to compute the probable
Modeling and Simulation 21

price and demand of a product in the market subject to a condition that supply and demand should
be equal. But supply of the product in the market depends on the previous year price, and that can
be taken as lagged parameter. Thus equations (1.15) become
D = a – bP
S = c + dP–1 ...(1.20)
D = S

Model 1 Model 2
P 0 = 30 P0 = 5
a = 12 a = 10.0
b = 30 b = 0.9
c = 1.0 c = –2.4
0.9 1.2

In the equations (1.20), values of parameters a, b, c, and d can be obtained by fitting a linear
curve in the data from the past history of the product. We assign some initial value to the product
say P0 and find S from second equation of (1.20). Thus S and D are known and first equation of
(1.20) gives us new value of P. Using this value of P as initial value, we repeat the calculations and
again compute P for the next period. If price converges, we say model (1.20) is stable. Let us take
two examples and test whether these models converge or not.

Table 1.1: Cobweb model for marketing a product

Model 1 Model 2

i P i P

0 –0.533333 0 7.11111
1 0.382667 1 4.2963
2 0.355187 2 8.04938
3 0.356011 3 3.04527
4 0.355986 4 9.71742
5 0.355987 5 0.821216
6 0.355987 6 12.6828
7 0.355987 7 –3.13265
8 0.355987 8 17.9546
9 0.355987 9 –10.1618
10 0.355987 10 27.3268

We have given a small program to find the value of P on the next page.
22 System Modeling and Simulation

Program 1.1: Program for Cobweb Model for Marketing a Product


# include <fstream.h>
void main (void)
{
double po, a,b,c,d,s,q,p;
int i;
ofstream outfile;
outfile.open(“vps”);
cout << “ type values of Po, a, b, c, d\n”;
cin >>po >>a>>b>>c>>d;
cout <<po<<‘\t’<<a<<‘\t’<<b<<‘\t’<<c<<‘\t’<<d<<‘\t’<<“\n”;
outfile <<“i”<<‘\t’ <<“po” <<“\n”;
for (i=0; i<20; i++)
{
s = c +d*po;
q = s;
p = (a –q)/b;
po = p;
outfile <<i<<‘\t’ <<po <<“\n”;
}
}
results of two models are given in the Table 1.1.
We can see from the table that results in the case of first model converge even in five steps where
as in second model they do not converge et al. Data a, b, c, and d for model 2 is such that it does
not converge. Thus data of second model is not realistic. These parameters can be calculated from
the past history of the product by regression method. This model is called cobweb as it can be
graphically expressed as shown in Fig. 1.7.
In Fig. 1.7, we have first drawn supply and demand curves. A line parallel to quantity axis shows
that for price equal to one unit, supply is 2 units. If we draw a line parallel to price axis so that it
meets demand curve at point marked 1. Thus for the same quantity of supply and demand, price
immediately shoots up to more than eight units, due to short supply of product. With this high price,
supply shoots up to nine units. Again vertical line equating supply with demand reduces the price to
three. We repeat the process and ultimately find that curve converges to optimum value.

10 Demand
9
8
7 1

6 3 5 Supply
Price

5
6
4 4
3 2
2
1 0
0

1 2 3 4 5 6 7 8 9 10
Quantity

Fig. 1.7: Cobweb model.


Modeling and Simulation 23

For simulating the real life systems, no real science can serve the purpose, because knowledge
of different discipline is generally needed. That is why sometimes simulation is called an art and not
science. In the coming chapters, we will study different techniques, required for simulation. Probability
theory is one of the important scientific fields required for stochastic simulation. In next chapter, we
will study probability in details.

1.5 SIMULATION
In the section 1.2, we had given an example of a mathematical model of hanging wheel of a vehicle.
It will be shown by numerical computations of the equation (1.1) in chapter five, that system does
not oscillate when parameter ζ is greater than or equal to one. This we could find by numerically
integrating the equation (1.2). If it was possible to get analytical solution of equation (1.2), one could
easily find by putting ζ = 1, that system does not oscillate. However, with the method of numerical
techniques, one has to run the program for different values of ζ and then find out that for ζ ≥ 1 , system
is stable. Same is the case with simulation. One has to run simulation model number of time, to arrive
at a correct output. Due to this reason, sometimes numerical computation is called simulation. But
information derived numerically does not constitute simulation. Numerical computation only gives
variations of one parameter in terms of other and does not give complete scenario with the time.
Simulation has long been an important tool of designers, whether they are simulating a supersonic
jet, a telephone communication system, a wind tunnel, a large scale military war gaming, or a
maintenance operation.
Although simulation is often viewed as a “method of last resort” to be employed when every other
technique has failed. Recent advances in simulation methodologies, availability of softwares, and
technical developments have made simulation one of the most widely used and accepted tools in system
analysis and operation research.
Naylor et al., [41] defines the simulation as follows:
Simulation is a numerical technique for conducting experiments on a digital computer, which
involves certain types of mathematical and logical models over extended period of real time.
We thus define system simulation as the technique of solving problems by the observation of the
performance, over time, of a dynamic model of the system. In other words, we can define simulation
as an experiment of physical scenario on the computer.
Why simulation is required? According to Naylor [41], some of the reasons why simulation is
appropriate are:
1. Simulation makes it possible to study and experiment with the complex internal interactions
of a given system, whether it be a firm, an industry, an economy, or some subsystem
of one of these.
2. Through simulation we can study the effect of certain informational, organizational, and
environmental change on the operation of a system by making alterations in the model of
the system and observing the effects of these alterations on the system’s behavior.
3. Detailed observation of the system being simulated may lead to a better understanding of
the system and to suggestion for improving it, suggestions that otherwise would not be
apparent.
24 System Modeling and Simulation

4. Simulation can be used as a pedagogical device for teaching both students and practitioners
basic skills in theoretical analysis, statistical analysis, and decision-making.
5. Operational gaming has been found to be an excellent means of simulating interest and
understanding on the part of the participants, and is particularly useful in the orientation
of persons who are experienced in the subject of the game.
6. Simulations of complex systems can yield valuable insight into which variables are more
important than others in the system and how these variables interact.
7. Simulation can be used to experiment with new situations about which we have little or
no information so as to prepare for what may happen.
8. Simulation can serve as a “pre service test” to try out new policies and decision rules for
operating a system, before running the risk of experimenting of the real system.
9. When new components are introduced into a system, simulation can be used to help foresee
bottlenecks and other problems that may arise in the operation of the system.
Monte Carlo method of simulation is one of the most powerful techniques of simulation and is
discussed below.

1.5.1 Monte Carlo Simulation


Simulation can also be defined as a technique of performing sampling experiments on the model of
the system. This is called stochastic simulation and is a part of simulation techniques. Because sampling
from a particular probability distribution involves the use of random numbers, stochastic simulation
is sometimes called Monte Carlo Simulation. Historically, Monte Carlo method is considered to be
a technique, using random or pseudo random numbers. It is important to know what random numbers
are. Let us take a simple example of tossing a coin. If coin is unbiased, probability of coming head
is 0.5. If we generate two numbers say, 0 and 1, so that occurrence of both is equally likely. Let
us assume that number 1 depicts head and 0, tail. These numbers are called uniform random numbers.
We will discuss stochastic simulation in chapter four.
We give below some differences between the Monte Carlo method and simulation:
1. In the Monte Carlo method, time does not play as substantial role, a role as it does in
stochastic simulation.
2. The observations in the Monte Carlo method, as a rule, are independent. In simulation,
however, we experiment with the model over time so, as a rule, the observations are serially
correlated.
3. In the Monte Carlo method, it is possible to express the response as a rather simple function
of the stochastic input variates. In simulation the response is usually a very complicated
one and can be expressed explicitly only by the computer program itself.

You might also like