chapter 2 variety of modelling

15
A variety of Modeling Approaches Chapter 2

Upload: tigabu-yaya

Post on 13-Apr-2017

131 views

Category:

Engineering


4 download

TRANSCRIPT

Page 1: Chapter 2 variety of modelling

A variety of Modeling Approaches

Chapter 2

Page 2: Chapter 2 variety of modelling

contents

• General considerations

• Time handling: Time slicing approach and next event technique

• Deterministic and Stochastic Systems

Page 3: Chapter 2 variety of modelling

General considerations

• Model building is the first and most important step insimulation modeling

• First step in model building is problem analysis andinformation collection and then data collection follows– Identification of input parameters– Identification of Performance measure of interest– Identifying relationship among parameters and variables– Systematic representation

• Model construction, verification and validation– Estimate model input parameters and outputs, determine

type of random variables to be used– Verify model if it is correctly constructed – w.r.t. spec– Validate the model by comparing output of the model with

experimental or data collected from physical system

Page 4: Chapter 2 variety of modelling

Model Taxonomy

Page 5: Chapter 2 variety of modelling

Parts of a simple simulation model

• Entity

– Something that changes the state of the system

– Example: in a client server system, request from a client

– Batch size, inter arrival times and entity attributes

• Queue

– Is a buffer where entities wait for service

– Once an entity enter the queue, it has to wait until it gets service

– Length of a queue is dependent on system

– If queue is full, an entity will be rejected or ignored

• Resources

– Resources can be servers, ATM machines, etc

– A resource can be either idle or busy

– In more complex systems, they can be either in failed state or temporarily in active

Page 6: Chapter 2 variety of modelling

Time handling: Time slicing approach and next event technique

• One basic advantage of simulation

– Experimentation in compressed time

– Simulation which takes month’s or years can be experimented in minutes

– The two most important techniques

• Time slicing

• Next event approach

– Simulation worldview(paradigm or philosophy)

• Developer worldview – designers of simulation software

• User worldview – users of simulation software

– Discrete event simulation

• Simulation system has a state at any instant of time

• Events trigger jump or change of state

• Time is sliced at the point of occurrence of events

• The main concept in the simulation is to track next event

Page 7: Chapter 2 variety of modelling

Example – single machine or single server

• Jobs arrive randomly and are processed.

• If machine is busy wait in the FIFO buffer

• Inputs are – inter arrival times and processing times

• System state s(t)= number of jobs in system=number of jobs in queue +1=n

• System entities are job arrival and job departure

• Output/ performance measure – average waiting time

• Time taken by a job=waiting time +processing time

Page 8: Chapter 2 variety of modelling

Simulation event list

• Is a means of keeping track of different things that occur during a simulation run– An event is anything which occurs during a simulation run and can affect the

state of the system

– Example: Arrival to the queue, start of service, end of service

• It is controlled by advances in simulation clock

• Infinite combinations of arrival, queue and service start and finish will occur and have to be tracked for computation of performance measures

• There are four types of performance measures used usually– System time

– Queue time

– Time average number in queue

– utilization

Performance measures

Page 9: Chapter 2 variety of modelling

• System time – Total amount of time that the entity spends in the system

– Ti is the system time of an individual entity

– n is the total number of entities

• Queue time – Time that an entity spends in queue

Where Di is the queue time for an individual

• Time average number in queue – Average number of entities expected in the queue at any time t

Where Q is number in queue for a given length of timedt is the length of time that Q is observed T is total length of time for the simulation

Page 10: Chapter 2 variety of modelling

• Utilization At any time a resource may be idle(utilization level of zero) or busy(utilization level of 1)

B is utilization level which is zero or 1

dt is the length of time that B is observed

T the total length of the simulation

Page 11: Chapter 2 variety of modelling

Example : A single server single queue system has the following inter arrival times and service times

Calculate summary statistics for the average number in queue, average system time, average utilization based on 20min

Inter arrival time

1 4 2 1 8 2 4

Service time 2 5 4 1 3 2 1

Solution: We have to form simulation event list. Let us use table

Arrival number

Arrival time

Begin sv.time

End service time

System time Waiting time

Arrival number

Arrival time

Begin sv.time

End service time

System time Waiting time

1 1 1 3 2 0

Arrival number

Arrival time

Begin sv.time

End service time

System time Waiting time

1 1 1 3 2 0

2 5 5 10 5 0

Arrival number

Arrival time

Begin sv.time

End service time

System time Waiting time

1 1 1 3 2 0

2 5 5 10 5 0

3 7 10 14 7 3

Arrival number

Arrival time

Begin sv.time

End service time

System time Waiting time

1 1 1 3 2 0

2 5 5 10 5 0

3 7 10 14 7 3

4 8 14 15 7 6

5 16 16 19 3 0

6 18 19 21 3 1

7 22

Page 12: Chapter 2 variety of modelling

Performance measures

• Average system time for 20min simulation time, only 5 customers have left the server

• Time average number in queue- for this calculation, it is better to form a graph of number in queue verses time

8.45

37752AST

5

4

3

2

1

1 5 7 8 10 14 16 18 19

Page 13: Chapter 2 variety of modelling

• Time average in queue then is

• Resource utilization

5.020

1*11*42*21*1TAQ

8.020

162051513RU

Page 14: Chapter 2 variety of modelling

Simulation modeling is not free of cost

• Modeling cost

– A good model should have only necessary detail(right amount of detail only)

– Should have good validation result

• Coding cost

• Simulation runs

– Simulation modeling uses extensive statistics

– Adequate number of experiments have to be performed for statistical reliability

– Model should have optimum resource requirements

• Output analysis

Page 15: Chapter 2 variety of modelling

Deterministic and Stochastic Systems

• Mathematical models of systems can be deterministic or stochastic – Deterministic – input and output variables are fixed

• Inputs occur in the same sequence and fixed order

• System responds in same manner every time

• Simulation study may not be necessary

– Stochastic – at least one of the input/output variables is probabilistic

• Model random phenomenon that occur in time

• Arrival streams, service times, routing decisions etc

• Simulation runs typically generate extensive realizations of multiple interacting stochastic process