Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Event Simulation

Similar presentations


Presentation on theme: "Discrete Event Simulation"— Presentation transcript:

1 Discrete Event Simulation
Copyright, 1996 © Dale Carnegie & Associates, Inc.

2 Introduction Discrete event simulation is a type of simulation characterized by probabilistic methods and transaction processing. Examples: Job Shop Scheduling Telecommunications Networks Airport Traffic Prediction Interested in this course on operating systems.

3 What is the problem? I want to use the computer to simulate the interaction of objects and their operation. These objects interact in a parallel fashion. I need to simulate these interactions on a sequential computer.

4 Modeling Issue I The behavior of the objects is modeled by noting where interactions take place and what resources are needed to allow the interaction. For example, no consideration is normally given for such things a data structures (except as they impinge on resources).

5 What You Need to Know Physical system and its objects.
The interconnections between objects. The input transactions with distributions. The outputs. The probabilistic distributions of load (arrival) and effort (computation).

6 Does all this sound familiar?
If you’re a C++ or other object oriented fan, it should. OOPS comes from Simula67, a discrete event system developed in 1960’s.

7 DES Philosophy I The objects and their relationships represent a static picture of how transactions flow. Transactions carry information about work to be done. Transactions initiate activities have a beginning event and an ending event .

8 Activities Activities have a starting event and and ending event.
Activities are those actions that use time. Events are those activities that change state of the system. Activities cannot change system state.

9 The DES Philosophy II An event occurs instantaneously in time and is represented by a predicate. No change of state is possible between events. Objects take time to process their inputs Therefore, object processing has two phases.

10 States A state of the system at any time t is the value of all variables at time t. This can be thought of as a vector Sys.

11 The Golden Rule Where Sys is the state vector and Sys is the change.

12 State of the Simulation
At any point in time, the state of the simulation Sys is the collection of Activities in progress Activities that have been delayed Activities that will happen in the future.

13 Designing the Simulation
Design deterministic system. Specify procedures to compute the changes by the objects. Control the “time loop” by events.

14 Designing Objects Time Manipulation: Schedule events that are dependent on this object’s processing. Simulation of objects effect on the state of the simulation.

15 Time out for a simple example

16 Office Example Deal with morning mail
Time to deal with this: mean with sd. Generate stop event Objective: sort mail for the five bosses Generate new input to boss objects. Put them somewhere where boss objects can get them. Return to controller.

17 Developing Probability Functions
1 P(En) P(EI) E1 En

18 The Object MailClerk Object Mailclerk {
method acceptmailevent(Siz ) method stopmaileventl() }

19 Events If time is the system clock
Then the time at which this particular event should happen would be Time+random(mean,sd) Schedule(Event, Time, Parameters)

20 Schedule Loop Do Check FUTURE-EVENTS-QUEUE. If empty, terminate.
If not, move CLOCK to time of first event. Empty queue of all events for this time. Call the action routine specified by event. Start at top


Download ppt "Discrete Event Simulation"

Similar presentations


Ads by Google