0 оценок0% нашли этот документ полезным (0 голосов)

22 просмотров67 страницMay 06, 2013

© Attribution Non-Commercial (BY-NC)

PPTX, PDF, TXT или читайте онлайн в Scribd

Attribution Non-Commercial (BY-NC)

0 оценок0% нашли этот документ полезным (0 голосов)

22 просмотров67 страницAttribution Non-Commercial (BY-NC)

Вы находитесь на странице: 1из 67

5/5/2013

Presented by

PRAGATI RANA 112008 PRAKASH CHANDRA BHARTI 112009 SOHAIL KHAN 112016

1

Guna 2012

OUTLINE

Exordium Historical Background Simulation Tools and Techniques Application Areas of Simulation Classification of Simulation Discrete Event Simulation Features Provided by Language Simulation Language Verification and Validation Input Modelling

2

5/5/2013

CONTENT COVERAGE

5/5/2013

PRAGATI RANA

P. C. BHARTI

Input Modelling

Exordium Historical Background Simulation Tools and Techniques Application Areas of Simulation Classification of Simulation

Discrete Event Simulation Features Provided by Language Simulation Language Verification and Validation

SOHAIL KHAN

EXORDIUM

5/5/2013

o What is Mathematical Modelling? Models describe our belief, how the real world functions. In mathematical modelling we translate those beliefs into the language of beliefs.

Advantage:

Mathematics is very precise language. This helps us to formulate ideas and identify underlying assumptions.

All results that mathematics have proved over hundreds of year are at our disposal.

4

Steps For Mathematical Modelling

5/5/2013

Formulate the Mathematical Problem Obtain the Mathematical Solution of the Model Interpret the Mathematical Solution Compare with reality

5

Motivation: An organisation realised that for the improvement in the performance of the system they have to see and experiment with the real system, through the observation and aid to statistics to reach valid conclusion towards future system improvements.

5/5/2013

Improvement can be done by the help of system modelling equations through analytical or numerical methods but the model may be too difficult for the complex system.

In this extreme situation people use simulation technique for the improvement, and now it has become common practice .

6

5/5/2013

o Building a computer model that consist of or that describes the behaviour of system. o Experimenting with this model to reach conclusions that support decisions.

o Once we have a computer simulation model of the actual system, we need to generate values for the random quantities that are part of the system input (to the model).

HISTORICAL BACKGROUND

5/5/2013

England.

analog simulator.

Followed by a progression from analog to digital simulator via hybrid analog and digital systems, followed

of several computers and back to simulation.

8

What approximation come in. Computer time is limited > few particles for short periods of time. (space-time is 4d. Moores Law implies lengths and times will double every 6 years if O(N).) Systems with many particles and long time scales are problematical. Hamiltonian is unknown, until we solve the quantum many-body problem! How do we estimate errors? Statistical and systematic. How do we manage ever more complex codes?

5/5/2013

o o o o

o

o o o o

Designing and analyzing manufacturing systems Evaluating military weapons systems or their logistics requirements Determining hardware requirements or protocols for communications networks Determining hardware and software requirements for a computer system Designing and operating transportation systems such as airports, freeways, ports, and subways Evaluating designs for service organizations such as call centers, fast-food restaurants, hospitals, and post offices Reengineering of business processes Determining ordering policies for an inventory system Analyzing financial or economic systems

10

5/5/2013

System:

5/5/2013

In practice, depends on objectives of study Might limit the boundaries (physical and logical) of the system Judgment call: level of detail (e.g., what is an entity?) Usually assume a time element dynamic system

State of a system:

Might depend on desired objectives, output performance measures Bank model: Could include number of busy tellers, time of arrival of each customer, etc.

11

... CONTD.

5/5/2013

Types of systems

Discrete

State variables change instantaneously at separated points in time Bank model: State changes occur only when a customer arrives or departs

Continuous

State variables change continuously as a function of time Airplane flight: State variables like position, velocity change continuously

are

partly

discrete,

partly

12

... CONTD.

System

5/5/2013

Physical model

Mathematical model

Analytical Solution

Simulation

13

CLASSIFICATION OF SIMULATION

5/5/2013

Most operational models are dynamic, stochastic, and discrete will be called discrete-event

simulation models

14

5/5/2013

Advantage:

greater realism easier to understand model the steady-state as well as the transit behavior.

Disadvantage:

time to construct model will be longer.

15

Advantage:

5/5/2013

Control variations

Generally less costly

Disadvantage:

Realism Validity

16

5/5/2013

Definition:

static

simulation

model

is

a system as it evolves over time.

17

5/5/2013

contains no random variables

18

5/5/2013

Continuous

event:

Programming:

19

Discrete-event simulation: Modeling of a system as it evolves over time by a representation where the state variables change instantaneously at separated points in time

More precisely, state can change at only a countable number of points in time These points in time are when events occur Programming

5/5/2013

Look at system only when events occur; time is advanced from event to event.

Event: Instantaneous occurrence that may change the state of the system

Sometimes get creative about what an event is e.g., end of simulation, make a decision about a systems operation

20

EXAMPLE

5/5/2013

it.

will be serve in the order of their arrival (FCFS).

service teams.

21

... CONTD.

Service times are also assumed to be random. After service, all customers return to the calling population.

5/5/2013

For this example, we use the following variables to define the state of the system: (1) the number of

that is, whether the server is busy or idle; and (3)the time of the next arrival.

of the system to change instantaneously.

22

... CONTD.

5/5/2013

All the information about them is maintained in a list called the event list.

We begin this simulation with an empty system and arbitrarily assume that our first event, an arrival, takes place at clock time 0.

Departure time = clock time now + generated service time

23

... CONTD.

Also, we now schedule the next arrival into the system by randomly generating an inter-arrival time from the inter-arrival time distribution and setting the arrival time as

Arrival time = clock time now + generated inter-arrival time

5/5/2013

Both these events are their scheduled times are maintained on the event list.

This approach of simulation is called the next-event timeadvance mechanism, because of the way the clock time is

most imminent event.

24

... CONTD.

As we move from event to event, we carry out the appropriate actions for each event, including any scheduling of future events.

5/5/2013

The jump to the next event in the next-event mechanism may be a large one or a small one; that is, the jumps in this method are variable in size.

With this method, we advance the simulation clock in increments of t time units, where t is some appropriate time unit, usually 1 time unit.

25

... CONTD.

5/5/2013

Consequently, we use only the next-event approach for the development of the models for the rest of the

chapter.

26

... CONTD.

5/5/2013

DT = scheduled time of the next departure SS = status of the server (1=busy, 0=idle) WL = length of the waiting line MX = length (in time units) of a simulation run

variables. This simple example illustrates some of the basic concepts in simulation and the way in which simulation can be used to analyze a particular problem.

27

... CONTD.

5/5/2013

Example: Single-server queue Estimate expected average delay in queue (line, not service) State variables Status of server (idle, busy) needed to decide what to do with an arrival Current length of the queue to know where to store an arrival that must wait in line Time of arrival of each customer now in queue needed to compute time in queue when service starts Events Arrival of a new customer Service completion (and departure) of a customer Maybe end-simulation event (a fake event) whether this is an event depends on how simulation terminates (a modeling decision)

28

5/5/2013

VIEWS UNDER WHICH THE SIMULATION IS GUIDED FOR THE DEVELOPMENT OF THE SIMULATION MODEL

Event Orientation defines the changes in state that occur at each event time Process Orientation describes the process through which the entities in the system flow

Activity Scanning Orientation describes the activities in which the entities in the system engage

29

... CONTD.

Event scheduling

Write modules that describe changes in the state of the system at each event Main program advances time One subprogram for each event General purpose programming language

5/5/2013

Process interaction

Write modules that describe the progress of entities through the system As entities move the systems changes state Entities are held to represent activities and delays Pro-model programming language

30

EVENT SCHEDULING

Time is advanced from event to event Future events list ordered list of upcoming events

5/5/2013

As events are scheduled, they are added to the list As events occur they are removed from list

Activities in event ( one / event type) List is required to keep track of entities in a set Statistics Two types

W = (W1 +W2 + +Wn)/n = Total Wait / # of wait L = (0(t1) + 1(t2-t1) + 2(t3-t2) + 1(t4-t3)) / t4

31

ACTIVITY SCANNING

5/5/2013

Activity scanning

Small time increments is inefficient Large time increments may miss activity Describes the activities in which the entities in the

system engage.

32

PROCESS ORIENTED

Process oriented:

5/5/2013

The logic associated with such a system or events can be generalized and

defined by a single statement

A simulation language could then translate such statement into the appropriate sequence of events

describes the processes through which the entities in the system flow.

These statements, define a sequence of events which are automatically executed by the simulation language as the entities move through the process

However, since we are normally restricted to a set of standardized statement, provided by the simulation language, our model flexibility is not as great as with the event condition

33

5/5/2013

Conceptual

framework(entities,

attributes,

resource,

queues)

Maintenance of event list Random variable generation Animation Debugging function Output analysis Input analysis Report generation

34

SIMULATION LANGUAGES

5/5/2013

computer programming.

Several special-purpose computer simulation languages have been developed to simplify programming.

languages, includes GPSS, GASP IV and SLAM.

Most simulation languages use one of two different modeling approaches or orientations; event scheduling or process interaction.

35

... CONTD.

GPSS uses the process-interaction approach. SLAM allows the modeler to use either approach or even a mixture of the two, whichever is the most appropriate for the model being analyzed.

5/5/2013

commonly used in simulation.

In fact, several simulation languages, including GASP IV and SLAM, use a FORTRAN base.

36

... CONTD.

5/5/2013

For the rest of the program, we use the GASP routines. Because of these prewritten routines, GASP IV provides a great deal of programming flexibility.

37

... CONTD.

5/5/2013

Building a GPSS model then consist of combining these sets of blocks into a flow diagram so that it represents the path an entity takes as it passes through the system.

SLAM was developed by Pritsket and Pegden (1979). It allows us to develop simulation model as network

any combination of these.

38

... CONTD.

5/5/2013

make in performing a simulation study.

The most important of these is that the specialpurpose languages provide a natural framework for simulation modeling and most of the features needed in programming a simulation model.

39

Always assume that your assumption is invalid. Robert F. Tatman

5/5/2013

Top-down, modular design Assertions (anti-bugging)

Say, total packets = packets sent + packets received If not, can halt or warn

Even if end-simulation will be complicated and non-deterministic, use simple repeatable values (maybe fixed seeds) to debug

40

5/5/2013

Continuity tests

Slight change in input should yield slight change in output, otherwise error

Thrput

Thrput

(Undebugged)

(Debugged)

Degeneracy tests

41

5/5/2013

Seed independence random number generator starting value should not affect final conclusion

(maybe

individual

output,

but

not

overall

42

conclusion)

VALIDATION

5/5/2013

Unlike verification, techniques to validate one simulation may be different from one model to another Three key aspects to validate:

Assumptions Input parameter values and distributions Output values and conclusions

Expert intuition Real system measurements Theoretical results

43

... CONTD.

5/5/2013

Most practical, most common Brainstorm with people knowledgeable in area Assumptions validated first, followed soon after by input. Output validated as soon as output is available (and verified), even if preliminary Present measured results and compare to simulated results (can see if experts can tell the difference)

Throughput

0.2

0.4

0.8

44

5/5/2013

to measure

But even one or two measurements add an enormous amount to the validity of the simulation

Should

compare

input

values,

output

values,

workload

characterization

45

Can use statistical techniques (confidence intervals) to determine if simulated values different than measured

5/5/2013

May not be useful for sole validation but can be used to complement

measurements or expert intuition

Ex: measurement validates for one processor, while analytic model validates for many processors

Would require too many resources and may be impossible Can only show is invalid

Instead, show validation in a few select cases, to lend confidence to the overall model results

46

INPUT MODELLING

You make custom Widgets How do you model the input process? Is it deterministic? Is it random? Look at some data

5/5/2013

ORDERS

Now what?

6/4/2004 6/15/2004

47

HISTOGRAM

8

5/5/2013

7 6 5 4 3 2 1 0

[0 ,2 ]

[2 ,4 ]

[4 ,6 ]

[6 ,7 ]

[8 ,1 0]

[1 0, 12 ] [1 2, 14 ] [1 4, 16 ] [1 6, 18 ] [1 8, 20 ]

OTHER OBSERVATIONS

Trend?

48

Seasonality

20

5/5/2013

Use the data directly (trace-driven simulation) Use the data to fit an empirical distribution Use the data to fit a theoretical distribution

ASSUMPTIONS

oTo fit a distribution, the data should be drawn from IID observations oCould it be from more than one distribution? oStatistical test oIs it independent?

49

ABSENCE OF DATA

5/5/2013

mean of the distribution

Documentation SMEs

50

TRIANGULAR DISTRIBUTION

5/5/2013

51

a=b=2 a=b=3

5/5/2013

a=b=5

a=b=10

52

a=2, b=4

5/5/2013

53

5/5/2013

Benefits:

Fill in gaps and smooth data Make sure tail behavior is represented

Extreme events are very important to the simulation but may not be represented

54

5/5/2013

A customer places a monthly order. Since the customer keeps inventory of the product, a large order is often followed by a small order

A distributor with several warehouses places monthly orders, and these warehouses can supply the same customers The behavior of customers logging on to a web site depends on

55

SOLUTIONS

5/5/2013

Should use a time-series model that captures the autocorrelation

Need a vector time-series model

Customers

56

Need a random vector model where each component may have a different distribution

Examples of models

Univariate Time-independent Multivariate

5/5/2013

Binomial, etc. Normal, gamma, beta, etc. Empirical/Trace-driven Independent binomial Multivariate normal Bivariate-exponential

Discrete-time

Cont.-state

Stochastic Processes

Continuous-time

57

Discrete-state

Cont.-state

5/5/2013

Arrivals of email to a server Arrivals of bug discovery in software

58

IS DATA REALITY

5/5/2013

Data

is often

Distorted

Poorly communicated, mistranslated or recorded Data is always old by definition Some of the data is often missing Often only summaries, or collected at certain times This may all be on purpose!

Dated

Deleted

Dependent

Deceptive

59

5/5/2013

reasons

There is rarely a theoretical justification for the distribution. Simulation is often sensitive to the tails and this is where the problem is!

the model being well-defined

ALTERNATIVE

data Treat other cases as if there is no data, and use beta distribution

60

numbers

random

E.g., we have talked about arrival times, service times being drawn from a particular distribution

5/5/2013

We do this by first generating a random number (uniform between [0,1]) and then

transforming it appropriately

THREE ALTERNATIVES

Pseudo-random numbers

61

Quasi-random numbers

5/5/2013

Validity

The simulation model may not be valid due to cycles and dependencies in the model

Precision

62

PSEUDO-RANDOM NUMBERS

5/5/2013

interval

cannot distinguish it from a random sequence

Introduced in the early 50s and still in very wide use today Recursive formula

Every number is determined by these four values

63

5/5/2013

Every time we anticipate a new customer arrival (place an arrival even on the events list), we need to generate a realization of of the arrival times

Know how to generate unit uniform. Can we use this to generate exponential? (And other distributions)

64

5/5/2013

Direct

Indirect

Acceptance-rejection

65

CONCLUSION

5/5/2013

The historical background, need, and modelling of simulation, simulation tool, technique and input modelling are discussed in this presentation.

66

5/5/2013

THANK YOU

VALUABLE SUGGESTIONS

67

## Гораздо больше, чем просто документы.

Откройте для себя все, что может предложить Scribd, включая книги и аудиокниги от крупных издательств.

Отменить можно в любой момент.