Simulation and Modulation
Simulation and Modulation
Simulation and Modulation
Ms Ujjwala
Deptt. of Information Technology
Biyani Girls College, Jaipur
Published by :
Think Tanks
Biyani Group of Colleges
While every effort is taken to avoid errors or omissions in this Publication, any mistake or
omission that may have crept in is not intentional. It may be taken note of that neither the
publisher nor the author will be responsible for any damage or loss of any kind arising to
anyone in any manner on account of such errors and omissions.
Preface
am glad to present this book, especially designed to serve the needs of the
students. The book has been written keeping in mind the general weakness in
understanding the fundamental concepts of the topics. The book is self-explanatory
and adopts the Teach Yourself style. It is based on question-answer pattern. The
language of book is quite easy and understandable based on scientific approach.
This book covers basic concepts related to the microbial understandings about
diversity, structure, economic aspects, bacterial and viral reproduction etc.
Any further improvement in the contents of the book by making corrections,
omission and inclusion is keen to be achieved based on suggestions from the
readers for which the author shall be obliged.
I acknowledge special thanks to Mr. Rajeev Biyani, Chairman & Dr. Sanjay
Biyani, Director (Acad.) Biyani Group of Colleges, who are the backbones and main
concept provider and also have been constant source of motivation throughout this
Endeavour. They played an active role in coordinating the various stages of this
Endeavour and spearheaded the publishing work.
I look forward to receiving valuable suggestions from professors of various
educational institutions, other faculty members and students for improvement of the
quality of the book. The reader may feel free to send in their comments and
suggestions to the under mentioned address.
Author
Syllabus
Defination of System : Types of system-continous and discrete; Modeling
process and defination of a model; Compurter work load and preparerating
of its models; Verification and validation modeling procedures;l comparing
model data with real system.
Simulation Process: Use of simulation discrete and continuous simulation
procedures; simulation of a time sharing computer system.
Simulation languages: A brief introduction to important discrete and
continuous simulation language; Algorithm development and pseudo code
writing for simulation problems. Use of database and A.I. techniques in the
area of modeling and simulation.
Chapter 1
What is system?
Ans. The term system is derived from the Greek word system, which means an
organized relationship among fins hiring units or component. A system may
be defined as an orderly grouping of interdependent components linked
together according to a plan to achieve a specific objective.
The components of a system may be simple or complex, basic or advanced,
each component is a part of the total system has to do its share of work for the
system to achieve the intruded goal.
Q.2 Explain various characteristics of any system?
Ans. The various characteristics of any system are described follow.
Organization:Organization imp his starchier & order. It is the
arrangement of components that helps to achieve objectives. In the design of
a business system for example the hierarchical relationships starting with the
president on top & boding donrcnord to the blue-collar warders represents
the organization starchier. Such an arrangement partiays a system subsystem
relationships defines the oimlthority stretcher specifies the formal flow of
communication & formalizes the chain of command.
Interaction:- Interaction refers to the oranner in which each component
functions with other components of the system. In an brgemisation, for
example, purchasing must interod with production, aolrertising with soles &
payroll with personal. The interrelationship between these components
enables the perform effectively.
Interdependence: - Interdependence means that parts of the organization or
computer system depend on are another. They are coordinated & linked
together according to a plan. One subsystem depends on the input of another
subsystem for proper functioning that is the output of are subsystem is the
required input for another subsystem. This interdependence is crucial is
system work.
Ans. Scholars in various disciplines who are concerned about the tendency toward
the fragmentation of knowledge & the increasing complicity of phenomena
have sought a unifying approach to knowledge. Ludwig von berlalanffy a
biologist developed a general systems theory that applies to any arrangement
of elements such as cells, people, societies or even planets. Norbert wiener a
mathematician, observed that information & communications provide
connecting links for unifying fragments or elements. His system concept of
information theory, which shows the parolld between the functioning of
human beings & electronic systems, laid the foundation for todays computer
system. Herbert A Simon a political scientist related the system concept to the
study of organization by uniming an ongoing system a processor of
information by making decisions.
System analysis & general for information system were founded in general systems
theory, which emphasizes a close look at all parts of a system. Joo often analysis
focus on only are component. General system they by is concerned with den
doping a systematic theoretical framework upon which to male decisions. It
discourages thinking in a vacuum & encourages consideration of all the
activities of the organization & its internal environment. Pioneering work in
general system theory emphasized that organizations be viewed as total
system. The idea of systems has become most practical & necessary in
conceptualization the interrelationships & integration of
operations,
especially when using computers thus, a system is a may of thinking abort
organizations & their problems. It also involves a set of techniques that helps
in solving problems.
Q.4
Ans. The various types of systems are given below common classifications of
systems are:
1.
2.
Continuous or discrete
1.
Physical or ales tract:Physical systems are tangible entities that may be static or dynamic in
operation. For example the physical parts of the computer centre are the
offices, desks & chairs that facilitate operation of the computer. They can be
seen & coinled; they are static. In contrast a programmed computer is a
dynamic system. Data programs output & applications change as the users
demands or the priority of the information requested changes.
Abstract systems a conceptual or non physical entities. They may be as
straightforward as formulas of relationships among sets of variables or
models the abstract conceptualization of physical situations. A model is a
representation of a real or a planned system. The use of models makes it
easier for the analyst to visualize relationship in the system under study. The
objective is to point out the significant dements & the buy interrelationships
of a complen system.
2.
Continuous or discrete:Systems such as the aircraft in which the changes are predominantly smooth
are called continuous systems. Systems, like the factory in which changes are
predominantly discontinuous mill be called discrete systems. Few systems
are wholly continuous or discrete the aircraft for example may make discrete
adjustments to its trim as altitude changes while in the factory example
machining proceeds continuously, even though the start & finish of a job are
discrete changes. However in most systems one type of change predominates
so that systems can usually be classified as being continuous or discrete.
Q.5
Ans. Simulation in general is to pretend that one deals with real thing while really
working with an imitation. In operations research the imitation is a
computer model of the simulated reality. A flight simulator on a PC is also a
computer model of some aspects of the flight: it shows on the screen
the controls and what to pilot(the youngster who operates it) is supposed
to see from the cockpit(his armchair).
Q.6
Ans. To fly a simulator is safer and cheaper than the real airplane. For precisely
this reason, models are used in industry commerce and military: it is very
costly, dangerous and often impossible to make experiments with real
systems. Provided that models are adequate descriptions of reality (they are
valid), experimenting with them can save money, suffering and even time.
Q.7
Ans. Systems that change with time, such as a gas station where cars come and go
(calleddynamic systems) and involve randomness. Nobody can guess at
exactly which time the next car should arrive at the station, are good
candidates for simulation. Modeling complex dynamic systems theoretically
need too many simplifications and the emerging models may not be therefore
valid. Simulation does not require that many simplifying assumptions,
making it the only tool even in absence of randomness.
Q.8
How to simulate?
Ans. Suppose we are interested in a gas station. We may describe the behavior of
this system graphically be plotting the number of cars in the station; the state
of the system. Every time a car arrives the graph increases by one unit while a
departing car causes the graph to drop one unit. This graph (called sample
path), could be obtained from observation of a real station, but could also be
artificially constructed. Such artificial construction and the analysis of the
resulting sample path (or more sample paths in more complex cases) consist
of the simulation.
Chapter 2
System Dynamic
Q1
Ans. A static model eves the station ships between the system attributes when the
system equilibrium. It the point Y equilibrium is changed by attiring any of
the attribute values the model enables the new valves for all the attributes to
be derived but does not show the way in which they changed to their new
values. For example in marketing a commodity these is a balance between the
supply and demand for the commodity. Both factors depend upon price: a
simple market model will show what is the price at which the balance occurs.
Command for the commochty will be low when the price is high and it will
increase as the price drops. The relationship between demand, denoted by Q,
and price, denoted by P, might be represented by the strength line marked
Demand in the following graph. On the other hand, the supply can be
expected to increase as the price increases because the supplies see an
opportunity for more revenue suppose supply denoted by S, is plotlrd
against price and the relationship is the strength time marked supply in the
fig. it the condition remain stable the price will settle to the point at which the
two lines cross, because that is where the supply eznals the demand.
Since the relationship have been assumed linear, the complete market model
can be written mathematically as follows.
Q = a-bp S = C+ap S = Q
0.20
Qenand Q
Supply. S
P.Price 0.15
0.10
0.05
100.
200.
300.
400.
Quantity
500.
10
The last equation states the condition for the market to be cleared; it says
supply equals demand and so determines the price to which the market will
settle. For the model to correspond to normal market condition in which
demand goes down and supply increases as price goes up the coefficients b
and d need to be positive numbers.
The eqnilibrivnm market price, infect is given by the following expression
P
a c
b d
11
automobile. Solutions are shown for several values of g, and it can be seen
that when g is less than 1 the motion is oscillatory.
The factor g is called the damping ratio and when the motion is oscillatory
the frequency of oscillation is determined from the formula W = 2F Where f
is the number of cycle per second
Qenand 1 Q
Supply. S
Price
Quantity
Non-linear marfal - model
Environment
Environment
12
Environment Segment
Price
Population
Market
Population
Supply
Demand
National Economy
The above figure shows how the environment subsystem might be further
brofan down. The major element is the market model the set of relationship
that determine what the demand for the product will be. Major output of this
model is Demand. Two major inputs are the price and supply of the
product. Several other factors can influence the market. The ones chosen here
are the national economy the population that purchases the product and
competition from other produces. The national economy affects the market by
influencing the amount of money available to consumers.
Change in economic conditions would change the coefficients of that model if
the national economy is to be included in the present model an output of this
subsystem would be the coefficients to be used in the market model.
The obrions influence of population on the market is through knowing how
many people are likely to buy the product.
An additional factor could be the distribution of the population if the model
is to go as for as considering where the product distribution outlets are to be
placed.
Competition from other producers or from similar products is another factor
to be considered. It this is included the competition model is likely to interact
with the population model.
Production segment
following fig. the main input is the amount of labor and machinery assigned
for production.
Mans output is the supply of the product. If it is dradeel to look at the market
geographically then a distribution subsystem will be needed to investigate
how to location of ware houses should be matched to population distribution.
13
Population
National Economy
Population
Labor
Machinery
World Economy
Management segment
The management subsystem, further broken down according to following
figure. The main inputs are the demand for the product and capital
investment to be made in the business. The main outputs all the price to be
set and the profit to be expected. A pricing model sets the price and a
financial model decides low the investment capital is to be divided between
labor and machinery. Another activity of the management is to predict the
future demand for the product. A forecasting model may be needed to refract
the way the predictions are made. Both the national and the world economy
conditions could influence the financial model through their effects on the
money market.
14
Price
Demand
Population
Pricing
Population
Cabor
Machinery
Financing
Investment
World Econmy
The Management Segment
Competition
Market
Forecasting
Distribution
National
Economy
Production
Pricing
Financing
Pfofit
Investment
Machinery
World
Economy
The full corporate Model
The full corporate model Putting together the expansion of the there
segments of first fig gives the full model of above figure.
Exponential growth models :Growth implies a rate of change are the mathematical models describing
growth involve differential equation.
15
For example, the growth of a capital fund that is earning compound interest.
It the growth rate coefficient is K, then the rate at which the fund growth is k
times the current size of the fund. Expressed mathematically where x is the
current size of the fund.
X = Kx
x = xo at t = 0 = Kx
(i)
log x = Kt + logixo
log () = Kt
x = xo ekt
(ii)
5
4
k = 0.35
B
k = 0.25
k = 0.2
k = 0.1
4
t1 time
10
Above figure plats x for various valves of k and an initial value of 1. It can be
seen that the fund grows indefinitely whatever valve of k is used and it
grown farter with greater valves of k looking at the curve for k-0.2 and
picking the pint x=2 the corresponding slope at the point a has a certain valve
later at the point B where x has become twice as great as at A.
Since the slope is measured as the first order differential coefficient this fact is
simply the reflection of the can defining exponential growth the growth rate
is directly proportional to the current level.
Another way of describing the exponential function is to rony that the
logarithm of the variable increases linearly with time to lest whether any
particular set of data represents exponential growth the logarithms of the
data should be plotted against time. If the data then appear to fall on a
straight line, the growth is exponential and the slope of the straight line will
be greater for larger growth rate coefficients.
16
Alternatively the data can plotted on semi - logarithmic graph paper where
the horizontal ones are placed at logarithmic intervals. Plotting state on such
paper is equivalent to taking the logarithm of the data and then plotting on
normal liner graph paper.
The following fig shows the gross national product figures for several
countries plotted against year on semi-logarithmic paper. The points fall
reasonable well on strength lines, indicating exponential growth rates.
The growth rate coefficient can be estimated by packing two points of the
straight line that best gets the data and taking the (mafral) logarithm of the
ratio of the values.
It the points are x. and t, and x2 at t2 t > t1 the result is In From which it is
possible to derive K. In terms of the more familiar logarithms to base 10, the
corresponding result is
x2
0.434(t2 t1 ) K
x1
Log
1000
500
an
Jap
200
100
50
U.C.
20
10
1963
1965
1967
1969
1971
17
Sometimes the coefficient K is expressed in the form 1/T so that The solution
for the exponential growth model then takes the form The constant T is said
to be a time constant since it provides a measure of how rapidly the variable x
groves. For example when t equals T, the variable exactly e times its initial
valve xo. It T is small ray 2, x reaches this level after two times units. It T is
large, say 20, x only reaches that level after 20 times units. The inverse
relationship between K, the growth rate coefficient and T, the time constant,
means that a large coefficient is associated with a small time constant and
therefore a more rapid rate of increasing.
Q.4
Ans. Another model closely related to the exponential growth model is a model in
which a variable decays from some initial valve x0, at a rate proportional to
the current valve. The model can in fact be interpreted as a negative growth
model.
The equation for the model is x = - Kx X = x0 at t = 0 The solution is x = x0e
kt The response is shown is fig following figure for various values of K. is
with the exponential growth model the constant K is sometimes expressed in
the form 1/T.
The characteristics of the model is that the level x is divided by a constant
factor for a given interval of time. In the interval of T times units the level is
divided by e. since e is approximately 2.72. the level is reduced by a factor of
0.37. Each successive interval of T reduces the level by the some factor. Again
there is nothing significant about the valve e1 but comparing valves of T for
different models measures the relative times they will take to decay by a
given fraction.
Example of exponential decay model is the manner is which radioactive
material decays.
18
1.0
0.8
K = 0.05
out put
0.4
K = 0.1
K = 0.2
0.2
K = 0.5
K = 1.0
Q. 5
10
19
20
It is sometimes said that validation can be expressed by the query Are you
building the right thing? and verification by Are you building the thing
right? Building the right thing refers back to the users needs, while
building it right checks that the documented development process was
followed. In some contexts, it is required to have written requirements for
both as well as formal procedures or procedures or protocols for determining
compliance.
Q.7
21
sample analysis, single sample analysis with multiple ended online system
suitability testing.
The most tested attributes in the validation tasks may include
Selectivity/specificity
Accuracy
Precision/Repeatability
Curve fitting
Q.8
Ans. System Dynamics is a methodology for studying and managing complex feed
back system, such as our finds in business an other social system infect if has
been used to address practically every sort of feedback system. While the
word system has been applied to all sort of situations. Fed back is the
differentiating descriptor here feedback refers to the situation of x affecting y
and y in true affecting x perhaps through a chain of causes and effects.
One can not study the link x and y and independently the link between y and
x and predict how the system will behave only the study of the whole system
as a fed back system will lead to correct results.
Q.9
Ans. 1)
2)
3)
22
4)
5)
Population of
the community
Jobs
Mngratoni into
the community
Number of
available of jobs
per capital
Attractiveness of
the community
23
24
Choose among the set of plausible futures those that best reflect
stakeholder values and that strike an acceptable balance among
inevitable trade-offs.
Identify a
Persistent Problem
Graph its behavior
over time
Create a
Dynamic Hypothesis
Identify and map the
main causal forces that
create the problem
25
Run Simulation
Experiments
Compae model's behaviour to
expectations and/or data to
build confidence in the model
Choose Amount
Plausible Futures
Disocuss values and
consider trade - offer
Enact Policies
Build power and
organize actors to
establish chosen policies
Chaises the table functions dement for the model page of the palette
view.
2.
Click in the graphical editor where you want to place the table function
icon.
3.
Go to the general page of the properties view and specify the function
properties.
4.
5.
Define data for a table function in the table data table. Each argument
value pair is specified I an individual low of the label. To define pair of
valves go to the last row of the Table data table and enter the
argument valve in the argument cell and the function valve in the
function cell. To remove some pair of valves select the corresponding
row of the table and click.
6.
26
7.
Specify how the table function should behave when its argument is out
of large using the out of range drop-down list.
27
Chapter 3
Ans.
1.
System - A system is an organized group of entities such as people, equipment,
methods and parts, which work together toward a specific objective. A simulation
model characterizes a system by mathematically describing the responses that can
result from the interaction of entities.
2.
3.
Static model- A static model is one which is not influenced by time. There is
no simulation dock involved. The static of the model does not change with
respect to time. A simulation model that simulates the roll of a die in an
example of static model. The output of the model is not affected by time.
Dynamic modelA dynamic model is representation, which is influenced
by time. The static of the model evolves over simulated seconds, hours, days
and months. Manufacturing and many service systems are generally modeled
using a dynamic approach.
Warm-up-period- A warm up period is the amount of time that the model
needs to run to remove the initialization bias before statistical data collection
begins. The linger of the period is dependent upon the type of model being
used. Warm up periods for steady state simulation can sound through
experimentation with moving averages and other techniques.
Model Run- A model run mvolves operating a simulation for a specifically
period of time with a unique set of random valves. The simulation run length
is the amount of time simulated during the model runs.
Independent model replication -An independent model Replication entails
operating the same model for the same period of time with one or more
random seed valves. Multiple model replications are essential when
analyzing results.
4.
5.
6.
7.
28
Q. 2
Ans.
Q.3
Ans.
29
Shifts - Shifts are schedules that may be assigned to resources and locations.
Hours of work are defined graphically and any breaks I the shift can also be
specified.
Attributes- Attribute is very similar to the variables but is unique to specific
location or entity.
Attributes are used to capture information as an entity travels through the
model.
Arrays Array is a matrix of valves that may be referenced as a time
saving feature is model construction.
Variables - The model binlder as a counter a logic switch or for any one or
more additional purposes can define variables. Variables are global to the
model.
Q4. What is Modeling Process?
Ans. The Modeling ProcessThe diagram below is a schematic representation of
the entire model building process. (It is itself a mathematical model of
mathematical model building!). In the diagram:
4
Natural
System
Mathematical
System
3
v=R
1. Represents the natural law which actually governs the behavior of the natural
system. This may be some complex combination of chemistry, biology,
physics, politics, economics, etc. In general, the natural law may be quite
unknowable to us.
2.
30
3.
4.
31
Causality
Effect
cause
f(x)
x
32
2.
Q.5
Ans.
1.
2.
33
Ans. The scientific method is a procedure for the construction and verification of
models. After a problem is formulated, the process consists of four stages.
1.
2.
Representation/Measurement.
The symbols in a formal language are given meaning as objects, events or
relationships in the real world. This is the process used in translating word
problems to algebraic expressions in high school algebra. This process is
called representation of the world. In statistics, the symbols of algebra
(numbers) are given meaning in a process called measurement.
3.
Manipulation/Transformation.
Sentences in the language are transformed into other statements in the
language. In this manner implications of the model are derived.
4.
Verification.
Selected implications derived in the previous stage are compared with
experiments or observations in the real world. Because of the idealization and
simplification of the model-building process, no models can ever be in perfect
agreement with the real world. In all cases, the important question is not
whether the model is true, but whether the model was adequate for the
purpose at hand. Model-building in science is a continuing process. New and
34
moir powerful models replace less powerful models, with truth being a
closer approximation to the real world.
These four stages and their relation ship to one another are illustrated below.
35
model, for example, if the design of a race car can be accurately modeled
using mathematics, what changes in design will result in the least possible
wind resistance? Mathematical procedures are available which make these
kinds of transformations possible.
Q.7
36
37
38
39
Q9
Ans
40
41
If you need any assistance with time management, please feel free to
make an appointment with the study skills consultant in the Center for
Academic Success
Object Generation
Our vision is to simplify software development with object oriented methods
and tools.
Some keys to success in software projects are good communication,
systematic testing, reduced complexity and iterative development. We use
object oriented methods to achieve these goals.
Development Tools
Tool support is necessary to use object oriented design throughout
development and not just as a paper exercise that is forgotten once the coding
starts.
We are developing an Eclipse plugin called HiberObjects. This plugin makes
it easy to design classes and unit tests for Hibernate and JPA. HiberObjects is
free and open source.
There is a commercial extension HiberObjects Import DB Pro to reverse
engineer existing databases into HiberObjects.
We have another product DB Importer to reverse engineer existing databases
and generate JPA code without UML.
Consulting
Object Generation AB is located in Uppsala, Sweden. We provide consulting
services in Scandinavia within object oriented methods and Java
development. Our specialties are UML, Eclipse plugins, Hibernate, GWT and
Groovy/Grails.
Q10
Ans
42
An event is an abstract data type with a boolean state and the following
operations:
wait - when executed, causes the executing process to suspend until the
event's state is set to true. If the state is already set to true has no effect.
set - sets the event's state to true, release all waiting processes.
clear - sets the event's state to false.
Different implementations of events may provide different subsets of these
possible operations; for example, the implementation provided by Microsoft
Windows provides the operations wait (WaitForObject and related
functions), set (SetEvent), and clear (ResetEvent). An option that may be
specified during creation of the event object changes the behaviour of
SetEvent so that only a single process is released and the state is
automatically returned to false after that process is released.
Events are similar in principle to the condition variables used in monitors,
although the precise mechanism of use is somewhat different.
Event synchronization component
The event synchronization component, the Event Integration Facility or EIF,
sends updates to situation events that are forwarded to a Tivoli Enterprise
Console event server or a Netcool/OMNIbus Object Server back to the
monitoring server. Figure shows the flow of situation events from the
monitoring server to the event server as EIF events and the flow of updates to
the situation events back to the monitoring server. The Situation Event
Console, the Common Event Console, and the Tivoli Enterprise Console
event views are synchronized with the updated status of the events.
If you are monitoring event data from a supported event management system
in the Tivoli Enterprise Console event view or the Common Event Console
view, you can filter out forwarded events.
43
Types of queue
Structured queues
44
Q12
Ans
45
46
Example: Two queues (FIFO, Shortest-Job-First), event list (see text for
different examples)
FIFO queue: attrib1 = time of arrival
SJF queue: attrib1 = time of arrival, attrib2 = service requirement; insert new
records (customers) to keep list ranked in increasing order on attrib2; remove
next customer to serve off top of list
Event list: attrib1 = (future) event time, attrib2 = event type.
Q13
Ans
47
48
49
Chapter 4
Example 1:
50
A strip of material, randomly selected from each bolt, is cut into four
pieces (samples) the pieces are randomly assigned to receive one of the
four chemical treatments.
This process is replicated three times producing a Randomized Block (RB)
design.
Moisture resistance (y) were measured for each of the samples. (Low
readings indicate low moisture penetration).
The data is given in the diagram and table on the next slide.
9.9
10.1
11.4
12.1
C
A
B
D
13.4
12.9
12.2
12.3
D
B
A
C
12.7
12.9
11.4
11.9
B
D
C
A
Table
Blocks (Bolt Samples)
Q2
Ans
Chemical
10.1
12.2
11.9
11.4
12.9
12.7
9.9
12.3
11.4
12.1
13.4
12.9
51
crossed design. Such an experiment allows studying the effect of each factor
on the response variable, as well as the effects of interactions between factors
on the response variable.
For the vast majority of factorial experiments, each factor has only two levels.
For example, with two factors each taking two levels, a factorial experiment
would have four treatment combinations in total, and is usually called a 22
factorial design.
If the number of combinations in a full factorial design is too high to be
logistically feasible, a fractional factorial design may be done, in which some
of the possible combinations (usually at least half) are omitted.
Intervention studies with 2 or more categorical explanatory variables
leading to a numerical outcome variable are called Factorial Designs.
A factor is simply a categorical variable with two or more values, referred
to as levels.
A study in which there are 3 factors with 2 levels is called a 23 factorial
Design.
If BLOCKING has been used it is counted as one of the factors.
Blocking helps to improve precision by raising homogeneity of response
among the subjects comprising the block..
Advantages of factorial Designs are:
A greater precision can be obtained in estimating the overall main factor
effects.
Interaction between different factors can be explored.
Additional factors can help to extend validity of conclusions derived.
A Simple Example
Probably the easiest way to begin understanding factorial designs is by
looking at an example. Let's imagine a design where we have an educational
program where we would like to look at a variety of program variations to
52
53
54
Network simulator
A network simulator is a piece of software or hardware that predicts the
behavior of a network, without an actual network being present. A network
simulator is a software program that imitates the working of a computer
network. In simulators, the computer network is typically modelled with
devices, traffic etc and the performance is analysed. Typically, users can then
customize the simulator to fulfill their specific analysis needs. Simulators
typically come with support for the most popular protocols in use today, such
as WLAN, Wi-Max, UDP, and TCP.
Simulations
Most of the commercial simulators are GUI driven, while some network
simulators require input scripts or commands (network parameters). The
network parameters describe the state of the network (node placement,
existing links) and the events (data transmissions, link failures, etc). An
important output of simulations are the trace files. Trace files can document
every event that occurred in the simulation and are used for analysis. Certain
simulators have added functionality of capturing this type of data directly
from a functioning production environment, at various times of the day,
week, or month, in order to reflect average, worst-case, and best-case
conditions. Network simulators can also provide other tools to facilitate
visual analysis of trends and potential trouble spots.
Most network simulators use discrete event simulation, in which a list of
pending "events" is stored, and those events are processed in order, with
some events triggering future events -- such as the event of the arrival of a
packet at one node triggering the event of the arrival of that packet at a
downstream node.
Some network simulation problems, notably those relying on queueing
theory, are well suited to Markov chain simulations, in which no list of future
events is maintained and the simulation consists of transiting between
different system "states" in a memoryless fashion. Markov chain simulation is
typically faster but less accurate and flexible than detailed discrete event
simulation. Some simulations are cyclic based simulations and these are faster
as compared to event based simulations.
Simulation of networks can be a difficult task. For example, if congestion is
high, then estimation of the average occupancy is challenging because of high
variance. To estimate the likelihood of a buffer overflow in a network, the
time required for an accurate answer can be extremely large. Specialized
55
56
between those nodes and the traffic between the nodes. More complicated
systems may allow the user to specify everything about the protocols used to
handle traffic in a network. Graphical applications allow users to easily
visualize the workings of their simulated environment. Text-based
applications may provide a less intuitive interface, but may permit more
advanced forms of customization. Others, such as GTNets, are programmingoriented, providing a programming framework that the user then customizes
to create an application that simulates the networking environment to be
tested.
Q4
Ans
57
Estimation process
The entire purpose of estimation theory is to arrive at an estimator, and
preferably an implementable one that could actually be used. The estimator
takes the measured data as input and produces an estimate of the parameters.
It is also preferable to derive an estimator that exhibits optimality. Estimator
optimality usually refers to achieving minimum average error over some
class of estimators, for example, a minimum variance unbiased estimator. In
this case, the class is the set of unbiased estimators, and the average error
measure is variance (average squared error between the value of the estimate
and the parameter). However, optimal estimators do not always exist.
These are the general steps to arrive at an estimator:
In order to arrive at a desired estimator, it is first necessary to determine a
probability distribution for the measured data, and the distribution's
dependence on the unknown parameters of interest. Often, the probability
distribution may be derived from physical models that explicitly show how
the measured data depends on the parameters to be estimated, and how the
data is corrupted by random errors or noise. In other cases, the probability
distribution for the measured data is simply "assumed", for example, based
on familiarity with the measured data and/or for analytical convenience.
After deciding upon a probabilistic model, it is helpful to find the limitations
placed upon an estimator. This limitation, for example, can be found through
the CramrRao bound.
Next, an estimator needs to be developed or applied if an already known
estimator is valid for the model. The estimator needs to be tested against the
limitations to determine if it is an optimal estimator (if so, then no other
estimator will perform better).
Finally, experiments or simulations can be run using the estimator to test its
performance.
After arriving at an estimator, real data might show that the model used to
derive the estimator is incorrect, which may require repeating these steps to
find a new estimator. A non-implementable or infeasible estimator may need
to be scrapped and the process started anew.
In summary, the estimator estimates the parameters of a physical model
based on measured data.
58
Basics
To build a model, several statistical "ingredients" need to be known. These are
needed to ensure the estimator has some mathematical tractability instead of
being based on "good feel".
The first is a set of statistical samples taken from a random vector (RV) of size
N. Put into a vector,
After the model is formed, the goal is to estimate the parameters, commonly
denoted , where the "hat" indicates the estimate.
One common estimator is the minimum mean squared error estimator, which
utilizes the error between the estimated parameters and the actual value of
the parameters
59
as the basis for optimality. This error term is then squared and minimized for
the MMSE estimator.
Q5
Ans
60
61
If all possible samples of size n are taken and their means and
intervals are estimated, 95% of all the intervals will include
the true value of that the unknown parameter
A specific interval either will contain or will not contain the true
parameter (due to the 5% risk)
62
Assumptions
From sample A
We are 95% confident that the true mean price is between $4.63
and $5.77.
We are 99% confident that the true mean price is between $4.45
and $5.95.
From sample B
We are 95% confident that the true mean price is between $5.02
and $6.16. (Failed)
We are 99% confident that the true mean price is between $4.84
and $6.36.
63
Students t distribution
Note: t
Z as n increases
64
Using
65
Chapter 5
66
For example- Consider the first seed as 2714. by squaring are go the number
07365796.
From this number four middle digits 3657 are escheated which is the first
random number. This process is repeated until the required number of
random number are obtained.
Q3
(c) DYNAMO
(d) CSMP-III
Ans. (a) GPSS (General Purpose Simulations System) language was developed
principally by the IBM Corporation published in 1961.
The system which is to be simulated in GPSS is described by a block diagram
in which the blocks represent the activities, and lines joining the blocks
indicate the sequence in which the activities can be executed. Where there is a
choice of activities, more than one line leaves a block and the condition for the
choice is stated the block.
Features of GPSS
1. Restricted to simple queuing problem.
2. Poor computational facilities.
3. Inflexible input and output.
4. No language extension possible.
5. Easy to learn and use.
6. Good debugging facilities.
7. Machine efficiency is often poor.
8. Interpretative system.
67
Sol.(b) SIMSCRIPT: SIMCRIPT was developed at the RAND corporation in the early
1960s and was first released in 1962. SIMSCRIPT is an event-statement
oriented discrete language. A completely new version SIMSCRIPT II was
released by the RAND Corporation in 1968. The latest version is SIMSCRIPT
11.5 which was released in 1972.
About SIMSCRIPT
1. User should know programming in PROTRAN or ALGOL for learning
SIMSCRIPT.
2. It is capable of representing more complex data- structures and can
execute more complex design rule.
3. It is able to produce a more compact model that requires less storage
space and generally will be executed more rapidly.
4. SIMSCRIPT program can be implemented on several different
manufactures computer system and can be applied in general
programming problems.
68
69
The event notices are filled in chronological order. When all events that can
be executed at a particular time have been processed, the clock is updated to
the time to the next event notice and control is passed to the event routine
identified by the notice. These actions are automatic and do not need to be
programmed.
(C)
(D)
70
Q4
Ans
71
Chapter 6
Q.2 Write are steps for carrying out the Monte Carlo simulation.
Ans. The Monte Carlo method of simulations was developed by the two
mathematicians john von Neumann and stains low ulam Von merman and
72
1)
2)
3)
4)
5)
6)
7)
Q.3
stains low Ulan during world war II to study how for neutrons should trowel
through different materials. Me technique provided an approximate but quite
workable solution to the problem. The technique of Monte Carlo involves the
selection of random observations within the simulations model.
This technique is restricted for application involving random numbers to
solve deterministic and stochastic problems. The principle of this technique
replacement of actual statistical nurture by another universe described by
some assumed probability distribution.
The steps inversed in carrying out Monte Carlo simulations areSelect the measure of effectiveness of the problem. It is either to be misaimed
or minimized. Forex it may be idle time of service facility in the queuing
problem or number of shortages in an inventory control problem.
Identify the variables that affect the measure of effeteness significantly. Foes
no. of service facility in queuing problem or number of units in inventory
control problem.
Determine the cumulative probability destitution of each variable selected in
step (2). Plot these distribution with the values of the variables along as axis
and cumulative probability values along the y-axis.
Get a set of random members.
Consider each random number as a decimal value of the cumulative
probability distribution. Enter the cumulative distribution plot along the yaxis project this point horizontally till it meats the distribution curve. Then
project the point of intersection down on the x-axis.
Record the value generated in step 5. substitute in the formula chosen for
measure of effectiveness and find its simulated value.
Repeat step (5) and (6) until sample is large enough for the satisfaction of the
decision maker.
Reliance fresh deals with vegetables. The daily demand and purchases of
which are random variable records in the post show the following.
Purchase
Demand
Qty in kg
No. of days
Qty in kg
No. of days
10
20
30
40
50
40
50
190
150
70
10
20
30
40
50
50
110
200
100
40
The traders buys the commodity at Rs. 20 per kg and sells at Rs.30 per kg. It
any of the commodity remains at the end of the day. It has no saleable value.
The loss through unsteadied demand is Rs. 8 per kg.
73
Given are the following random numbers. Simulate 6 days trading and find
the total profit. Random numbers are 31, 18, 63, 84, 5, 79, 07, 32, 43, 75, 81, 27.
Use random numbers alternatively i.e. first to simulate purchase and second
to simulate demand.
Purchase
Qty
days
Probability
10
20
30
40
50
40
50
190
150
70
500
0.08
0.10
0.38
0.30
0.14
00-07
08-17
18-55
56-85
86-99
Table - II
Purchase
Qty
days
Probability
10
20
30
40
50
50
110
200
100
40
500
0.1
0.22
0.4
0.2
0.08
00-09
10-31
32-71
72-91
92-99
Final Worksheet
Purchase
No. of
days
Random
member
10
20
30
40
50
31
63
15
7
43
81
Demand
Qty.
Random
Purchased Number
30
40
20
10
30
40
18
84
79
32
75
27
Old
Demand
20
40
40
30
40
20
Cost Revenue
600
800
400
200
600
800
600
1200
600
300
900
600
Shortage
Cost
160
160
80
-
Profit
0
400
40
(60)
220
200
400
Herce are have simulated 6 days trading as above and the net profit after 6
days trading is equal to to Rs. 400.
Q. 4
Sol.
74
easier for humans to read. This is often achieved by making the sample
application independent so more specific items can be added later. Pseudo
code resembles, but should not be confused with, skeleton programs
including dummy code, which can be compiled without errors. Flowcharts
can be thought of as a graphical form of pseudo code.
Syntax: A the name suggests pseudo code generally does not actually obey
the syntax rule of any particular language there is no systematic standard
form, although any particular writer will generally borrow the appearance of
a particular language. Pseudo code may therefore vary widely in style, from a
near exact limitation of a real programming language at one extreme, to a
description approaching formatted prose at the other.
Example of pseudo code
If credit card number is valid
Execute transaction based on number and order
else
show a generic failure message
end if
Algorithm: An algorithm is procedure or formula for solving a problem. A
computer program can be viewed as elaborate algorithm. In mathematical
and computer science, an algorithm usually means small procedures that
solve a recurrent problem. It is a definite list of well-defined instructions for
completing a task; that given an initial state will proceed through a well
defined series of successive states, eventually terminating in an end-state. The
transition from one state to the next is not necessarily deterministic. The
concept of an algorithm originated as a means of recording procedures for
solving problems.
Example of Algorithm
Largest Number
Input: A non-empty list of number L
Output: The largest number in the List L
Largest Lo
for each item in the list L>1, do
if the item>largest, then
Largest the item
return largest
75
2.)
3.)
4.)
5.)
6.)
7.)
A system which does have exogenous activity is said to be:a. Open system
76
b. Closed System
c. Both of above
d. None of the above
8.)
Where the outcome of the activity can describe completely in terms of its
input, the activity is said to be:a. Deterministic
b. Stochastic
c. Endogenous
d. Exogenous
9.)
System analysis, System design and system postulation are the examples of:a. Types of system
b. Types of system study
c. Types of entities
d. Type of environment.
10.)
77
78
a.
b.
c.
d.
e.
f.
79
Block-building
Relevance
Accuracy
Aggregation
All of the above
None of the above
27.) Which of the following is true about subsystem:a. Any subsystem might, itself, be considered a system consisting of
subsystem at a still lower level of
b. detail, and so on.
a. Each subsystem has its own inputs and outputs and, standing by itself.
b. Both of above.
c. None of above
28.) In a Corporate model, what is/are main segment/segments?
a. Environment
b. Plant/ Physical plant
c. Management
d. All of the above
e. None of the above
29.) Where the effects of the activity vary randomly over various possible outcomes,
the activity is said to be:a. Deterministic
b. Stochastic
c. Endogenous
d. Exogenous
30.) System analysis is a:a. To produce a system that meets some specifications.
b. To understand how an existing system or a proposed system operates.
c. To produce a system in which behavior is known but the process is not
known.
d. None of the above.
31.) System design is a:a. To produce a system that meets some specifications.
b. To understand how an existing system or a proposed system operates.
c. To produce a system in which behavior is known but the process is not
known.
d. None of the above.
80
32.) Suspension model of an automobile wheel is an example of:a. Static Physical Model
b. Dynamic Physical Model
c. Static Mathematical Model
d. Dynamic Mathematical Model
81
2. (a)
3. (c)
4. (a)
5. (b)
6. (b)
7. (b)
8. (a)
9. (b)
10. (b)
11. (a)
12. (d)
13. (c)
14. (a)
15. (b)
16. (b)
17. (a)
18. (c)
19. (d)
20. (b)
21. (a)
22. (c)
23. (b)
24. (d)
25. (b)
26. (e)
27. (c)
28. (d)
29. (b)
30. (b)
31. (a)
32. (b)
33. (c)
34. (a)
35. (b)
36. (b)
37. (d)
38. (b)
39. (b)
40. (a)
82
Glossary
Adaptive
Subject to ADAPTATION; can change over time to improve fitness or accuracy.
Adaptation
An internal change in a SYSTEM that mirrors an external event in the system's
ENVIRONMENT. Could be a consequence of LEARNING.
Always Cooperate
An ITERATED PRISONER'S DILEMMA STRATEGY that cooperates with its
opponent under all circumstances (the exact opposite of ALWAYS DEFECT).
Always Defect
An ITERATED PRISONER'S DILEMMA STRATEGY that never cooperates with its
opponent under any circumstance (the exact opposite of ALWAYS COOPERATE).
Autonomous Agent
An entity with limited perception of its ENVIRONMENT that can process
information to calculate an action so as to be goal-seeking on a local scale.
Bottom-Up
A description that uses the lower-level details to explain higher-level patterns;
related to REDUCTIONISM.
Cellular Automation (CA)
A DISCRETE DYNAMICAL SYSTEM that is composed of an array of cells, each of
which behaves like a FINITE-STATE AUTOMATON. All interactions are local, with
the next state of a cell being a FUNCTION of the current state of itself and its
neighbours. CONWAY'S GAME OF LIFE is a CA.
Coevolution
Two or more entities experience EVOLUTION in response to one another. Due to
FEEDBACK mechanisms, this often results in a biological ARMS RACE.
Conway's Game of Life
A CELLULAR AUTOMATON rule set that operates on a two-dimensional grid.
Each cell changes its stat according to the states of its eight nearest neighbours: dead
cells come alive with exactly three live neighbours, and cells die if they have
anything but two or three neighbours. The Game of Life can display complex
83
patterns such as GLIDERS, FISH, and GLIDER GUNS, and is also capable of
UNIVERSAL COMPUTATION.
Crossover
A genetic operator that splices information from two or more parents to form a
composite offspring that has genetic material from all parents.
Difference Equation
An equation that describes how something changes in DISCRETE time steps.
NUMERICAL SOLUTIONS to INTEGRALS are usually realized as difference
equations.
Differential Equation A description of how something CONTINUOUSLY changes
over time. Some differential equations can have an ANALYTICALLY SOLUTION
such that all future states can be know without SIMULATION of the time evolution
of the SYSTEM. However, most can have a NUMERICAL SOLUTION with only
limited accuracy.
Dynamics/Dynamical
Pertaining to the change in behaviour of a SYSTEM over time.
Emergent
Refers to a property of a collection of simple subunits that comes about through the
interactions of the subunits and is not a property of any single subunit. For example,
the organization of an ant colony is said to "emerge" from the interactions of the
lower-level behaviours of the ant, and not from any single ant. Usually, the
emergent behaviour is unanticipated and cannot be directly deduced from the
lower-level behaviours. COMPLEX SYSTEMS are usually emergent.
Euler's Method The simplest method of obtaining a NUMERICAL SOLUTION of a
DIFFERENTIAL EQUATION. There are many other numerical techniques that are
more accurate; however, an ANALYTICAL SOLUTION (i.e., a closed form of an
integral) is always preferred but not always possible.
Evolution
A process operating on populations that involves VARIATION among individuals,
traits being INHERITABLE, and a level of FITNESS for individuals that is a
FUNCTION of the possessed traits. Over relatively long periods of time, the
distribution of inheritable traits will tend to reflect the fitness that the traits convey
to the individual; thus, evolution acts as a filter that selects fitness-yielding traits
over other traits.
84
Fitness Landscape
A representation of how MUTATIONS can change the FITNESS of one or more
organisms. If high fitness corresponds to high locations in the landscapes, and if
changes in genetic material are mapped to movements in the landscape, then
EVOLUTION will tend to make populations move in a uphill directions on the
fitness landscape.
Genetic Algorithm (GA)
A method of SIMULATING the action of EVOLUTION within a computer. A
population of fixed-length STRINGS is evolved with a GA by employing
CROSSOVER and MUTATION operators along with a FITNESS FUNCTION that
determines how likely individuals are to reproduce. Gas perform a type of SEARCH
in a FITNESS LANDSCAPE.
Genetic Programming (GP) A method of applying simulated EVOLUTION on
PROGRAMS or program fragments. Modified forms of MUTATION and
CROSSOVER are used along with a FITNESS function.
Glider
A simple object in CONWAY'S GAME OF LIFE that swims diagonally through the
grid space.
Glider Gun
An object CONWAY'S GAME OF LIFE that builds and emits GLIDERS, which can
then be collided in purposeful ways to construct more complicated objects.
85
Graph
A construct that consists of many nodes connected with edges. The edges usually
represents a relationship between the objects represented by the nodes. For example,
if the nodes are cities, then the edges may have numerical values that correspond to
the distances between the cities. A graph can be equivalently represented as a
MATRIX.
Iterated Prisoner's Dilemma
The PRISONER'S DELEMMA game played in an ITERATIVE manner for a number
of rounds that is unknown to both players.
Iterate/Iterative
Doing something repeatedly. Doing something repeatedly. Doing something
repeatedly. Doing something repeatedly. Doing something repeatedly.
Lamarckism
A method of heredity that does not apply to genetics but is applicable to social
ADAPTATION. Lamarckism posits that acquired traits can be passed from parent to
offspring.
Learning
A process of ADAPTATION by which a set of adjustable parameters is
automatically modified so that some objective is more readily achieved.
Meme
A unit of cultural information that represents a basic idea that can be transferred
from one individual to another, and subjected to MUTATION, CROSSOVER, and
ADAPTATION.
Model
In the sciences, a model is an estimate of how something works. A model will
usually have inputs and outputs that correspond to its real-world counterpart. An
ADAPTIVE SYSTEM also contains an implicit model of its ENVIRONMENT that
allows it to change its behaviour in anticipation of what will happen in the
environment.
Monte Carlo Method
Any technique of statistical sampling employed to approximate solutions to
quantitative problems. This technique is not what we mean by "simulation."
Mutation
A RANDOM change in any portion of genetic material. For a GENETIC
ALGORITHM, this means that a value in a BIT STRING is randomly set.
86
Natural Selection
The natural filtering process by which individuals with higher FITNESS are more
likely to reproduce than are individuals with lower fitness.
Neural Network (NN)
A network of NEURONS that are connected through SYNAPES or WEIGHTS. In
this book, the term is used almost exclusively to denote an artificial neural network
and not the real thing. Each neuron performs a simple calculation that is a
FUNCTION of the AVTIVATIONS of the neurons that are connected to it. Through
FEEDBACK mechanisms and/or the NONLINEAR output response of neurons, the
network as a whole is capable of performing extremely complicated tasks, including
UNIVERSAL COMPUTATION and UNIVERSAL APPROXIMATION. Three
different classes of neural networks are FEEDFORWARD, FEEDBACK, and
RECURRENT NEURAL NETWORKS, which differ in the degree and type of
CONNECTIVITY that they possess.
Numerical Solution
A solution to a problem that is calculated through a SIMULATION. For example,
solving the THREE BODY PROBLEM is not possible in the worst case; however,
with the DIFFERENTIAL EQUATIONS that describe the motions of three bodies in
space, one could simulate their movements by simulating each time step.
Nevertheless, numerical solutions are usually error-prone due to SENSITIVITY and,
therefore, can be used to estimate the future for only relatively short time spans, in
the worst case.
Prisoner's Dilemma
A NON-ZERO-SUM game in which both players have the incentive not to cooperate
independently, no matter what. But collectively they would be better off if they did
cooperate. This tension between individual incentive and collective incentive is what
makes the PD intriguing.
Simulate/Simulation
EXPERIMENTATION in the space of theories, or a combination of experimentation
and THEORIZATION. Some numerical simulations are PROGRAMS that represent
a MODEL for how nature works. Usually, the outcome of a simulation is much a
surprise as the outcome of a natural event, due to the richness and uncertainty of
COMPUTATION.
Simulated Annealing
A partially RANDOM method of SEARCH and OPTIMIZATION usually used for
COMBINATORIAL OPTIMIZATION problems. The technique is modeled on how
the molecular structure of metals is disordered at high temperatures but very
87
88
Case Study
1.) Name three or four of the principal entities, attributes, and activities to be
considered if you were to simulate the operation of:a.) A gasoline filling station
b.) A cafeteria
c.) A Barber shop.
2.)
89
Bibliography
http://www.inf.utfsm.cl/~hallende/download/Simul-22002/Introduction_to_Modeling_and_Simulation.pdf
2.)
http://www2.econ.iastate.edu/tesfatsi/ABMTutorial.MacalNorth.JOS2010.p
df