Discrete-Event Simulation: Time Advancement Mechanisms - Prof. Mongare, Essays (university) of Mathematical Modeling and Simulation

An introduction to discrete-event simulation, focusing on time advancement mechanisms. Discrete-event simulation models concern systems where state variables change instantaneously at separate points in time. the simulation clock, time advancement methods, and their advantages and disadvantages. It also includes examples of fixed-time state and event-to-event models.

Typology: Essays (university)

2020/2021

Uploaded on 07/10/2021

felix-mogusu
felix-mogusu 🇰🇪

1 document

1 / 35

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
SIMULATION AND MODELING
DISCRETE-EVENT SIMULATION
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23

Partial preview of the text

Download Discrete-Event Simulation: Time Advancement Mechanisms - Prof. Mongare and more Essays (university) Mathematical Modeling and Simulation in PDF only on Docsity!

SIMULATION AND MODELING

DISCRETE-EVENT SIMULATION

INTRODUCTION

The following figure shows the

classification of simulation paradigms:

INTRODUCTION

Definition:  (^) Event is an instantaneous occurrence that may change the state of the system.  (^) Synonym Activity, Occurrence  (^) NB: Although discrete-event simulation could conceptually be done by hand calculations, the amount of data that must be stored and manipulated for most real-world systems dictates that discrete- event simulations be done a digital computer.

INTRODUCTION

An Algorithm

 (^) Definition 1: is a set of instructions that can be translated into a logical computer program that can eventually give answers to the problem being solved.

Definition 2: for any given problem is an algorithm is a sequence of instructions that can define a method of obtaining a solution to the problem.  (^) In a finite no. of steps if the solution exists. If the solution doesn’t exist, then the algorithm indicates so.

TIME - ADVANCEMENT MECHANISMS

 (^) As a result of the dynamic nature of discrete-event simulation models, it becomes necessary to keep track of the current value of simulated time as the simulation proceeds, and we also need a mechanism to advance simulated time from one value to another.  This variable in a simulation model that gives the current value of simulated time is called the Simulation Clock****.

TIME- ADVANCEMENT MECHANISMS

 (^) There are several notions of time during a simulation. We should keep these concepts distinct.

1. Physical Time It refers to time in the physical system.  (^) Wall Clock Time It refers to time during the execution of the simulation program. 2. Simulation Time It is an abstraction (logical time) used by the simulation to model physical time.

TIME- ADVANCEMENT MECHANISMS

 (^) NB:  (^) There is generally no relationship between simulated time and the time needed to run a simulation on the computer.  Historically, there are two principal approaches that have been suggested for advancing the simulation clock: Next-event Time Advance and Fixed- increment Time Advance  see next slide

FIXED-TIME STATE VS. EVENT-TO-EVENT

MODELS

a) Fixed-Time-State Model or Time-Stepped Model  In a time-stepped simulation, simulation time is subdivided as a sequence of equal-sized time steps (intervals), and then simulation advances from one time step to the next. b) Event-to-Event (Event-Driven) or Next-Event Model  (^) Rather than compute a new value for state variables in each time step, it is more efficient to only update the variables when ”something interesting” occurs, which is referred to as an “event.”

FIXED-TIME STATE MODEL

 (^) In this model, a clock is simulated by a computer. The clock is updated by a fixed time interval t (constant) such that if the 1 st reading To then, **_T 1 = T 0

  • t = t T 2 = T 1
  • t = t + t = 2t T 3 = T 2 + t = 2t + t = 3t Tn = T n-
  • t_**  (^) In a fixed time state model, the system is examined every after t fixed time interval to see if any event has taken place or not during that interval.  (^) The time can be in seconds, minutes, hours, days.  (^) See fixed time state model in the next slide

FIXED-TIME STATE MODEL

 (^) In the time interval (0, t) an event e 1 occurs but is considered to occur at time t by the model.  (^) No events occur in the interval (t , 2t ) but the model checks to determine that this is the case.  (^) Events e 2 and e 3 occur in the interval (2t, 3t) but both events are considered to occur at time 3t etc..

e 1
0 t 2t 3t 4t 5t
e 2 , e 3

FIXED-TIME STATE MODEL

 (^) A set of rules must be built in to the model to decide in what order to process event when 2 or more events are considered to occur at the same time by the model.  (^) Actions in the simulation occurring in the same time step are usually considered to be simultaneous, and are often assumed not to have an effect on each other.  (^) This is important as it allows such actions to be executed concurrently by different computers to speed up simulation.  (^) If two actions have a causal relationship that must be accurately modeled in the simulation, the actions must be simulated at different time steps.

FIXED-TIME STATE MODEL

 (^) Thus the size of the time steps(intervals) is important in determining the precision of the simulation with respect to time.  (^) A time-stepped simulation program fills in the space- time diagram by repeatedly computing a new state for the simulation, time step by time step.  (^) Actually, not every state variable need to be modified in each time step, but the execution mechanism can only advance from one time step to the next.

FIXED-TIME STATE MODEL

However, these problems can be made less

severe by making t smaller though this increases

the amount of checking for event occurrences that

must be done and results in an increase in

execution time.

Due to this consideration fixed increment time

advance is generally not used for discrete event

simulation models when the times between

successive events can vary greatly.

Hence the event-to-event model.

EVENT-TO-EVENT OR NEXT-EVENT MODEL  (^) In this case the computer advances time to the occurrence of the next event.  (^) NB: It’s only those points in time are kept track of and only when something of interest happens like an arrival or departure.  (^) With the next event time advance approach, the simulation clock is initialized to 0 and the times of occurrence of future events are determined.