time advance machanisam

8
DISCRETE-EVENT DISCRETE-EVENT SIMULATION MODEL SIMULATION MODEL

Upload: vsunny488

Post on 11-Apr-2015

114 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: TIME ADVANCE MACHANISAM

DISCRETE-EVENT DISCRETE-EVENT SIMULATION SIMULATION

MODELMODEL

Page 2: TIME ADVANCE MACHANISAM

TIME ADVANCE MACHANISAMTIME ADVANCE MACHANISAM

Because of dynamic nature of discrete-event Because of dynamic nature of discrete-event simulation models, we must keep track of current simulation models, we must keep track of current values of simulated time as the simulation proceeds, values of simulated time as the simulation proceeds, and we also need a mechanism to advance simulated and we also need a mechanism to advance simulated time from one value to another. This is represented time from one value to another. This is represented through simulation clock. Two principal approach through simulation clock. Two principal approach have been suggested for advancing the simulation have been suggested for advancing the simulation clock are clock are next event time advancenext event time advance and and fixedfixed increment time advanceincrement time advance. First approach is used by . First approach is used by all simulation s/ws and the second is a special case of all simulation s/ws and the second is a special case of the firstthe first

Page 3: TIME ADVANCE MACHANISAM

FIXED-INCREMENT FIXED-INCREMENT TIME ADVANCETIME ADVANCE

Page 4: TIME ADVANCE MACHANISAM

The second principal approach for advancing the The second principal approach for advancing the simulation clock in a discrete –event simulation simulation clock in a discrete –event simulation model is called model is called fixed increment time advancefixed increment time advance

simulation clock is advanced in increment of simulation clock is advanced in increment of exactly exactly ΔΔt time units for some appropriate choice t time units for some appropriate choice of of ΔΔt.t.

After each update of the clock, a check is made After each update of the clock, a check is made to determine if any event should have occurred to determine if any event should have occurred during the previous interval of length during the previous interval of length ΔΔt. If any, t. If any, then these events are considered to occur at the then these events are considered to occur at the end of the interval and the system states are end of the interval and the system states are update accordingly.update accordingly.

Page 5: TIME ADVANCE MACHANISAM

Here the curved arrows represent the advancing Here the curved arrows represent the advancing of the simulation clock andof the simulation clock and ei ei is the actual time is the actual time of the occurrence of theof the occurrence of the ith ith event of any type . event of any type .

Here in the time interval [0,Here in the time interval [0,ΔΔt),an event occurs t),an event occurs at time e1 but is considered to occur at time at time e1 but is considered to occur at time ΔΔt t by the model.by the model.

Events occur at the same times e2 and e3 in the Events occur at the same times e2 and e3 in the interval [2interval [2ΔΔt,3t,3ΔΔt),but both events are considered t),but both events are considered to occur at time 3to occur at time 3ΔΔt,etct,etc

Page 6: TIME ADVANCE MACHANISAM

Two disadvantage of this fixed increment time Two disadvantage of this fixed increment time advance are the errors introduced by processing advance are the errors introduced by processing events at the end of the interval in which they occur events at the end of the interval in which they occur and the necessity of deciding which events to process and the necessity of deciding which events to process first when events that are amount not simultaneous in first when events that are amount not simultaneous in reality are treated as such by the model.reality are treated as such by the model.

These problems can be made less sever by making These problems can be made less sever by making ΔΔt smaller, but this increases the amount of checking t smaller, but this increases the amount of checking for events occurrences that must be done and results for events occurrences that must be done and results in an increase in execution time.in an increase in execution time.

Because of these considerations, fixed increment Because of these considerations, fixed increment time advance is generally not used for discrete-event time advance is generally not used for discrete-event simulation models when the times between successive simulation models when the times between successive events can vary greatlyevents can vary greatly. .

Page 7: TIME ADVANCE MACHANISAM

The primary use of this approach appears to be The primary use of this approach appears to be for systems where it can reasonably be assumed for systems where it can reasonably be assumed that all events actually occur at one of the times that all events actually occur at one of the times nnΔΔt (n=0,1,2,…)for an appropriately chosen t (n=0,1,2,…)for an appropriately chosen ΔΔtt

For example, data in economic systems are often For example, data in economic systems are often available only on an annual basis, and it is available only on an annual basis, and it is natural in simulation model to advance the natural in simulation model to advance the simulation clock in increments of 1 year.simulation clock in increments of 1 year.

Page 8: TIME ADVANCE MACHANISAM