Download presentation
Published byAllan Lawrence Modified over 8 years ago
1
Simulation Examples And General Principles Part 2
Chapter 2 & 3 Simulation Examples And General Principles Part 2
2
General Principles in Discrete-Event Simulation
Goal: Dynamic & stochastic systems change in discrete manner. Definitions: System A collection of entities (people and machines..) that interact together over time for one or more goals Model An abstract representation of a system, usually containing structural, logical or mathematical relationship that describe a system in term of state, entities and their attributes , sets, processes,… System state A collection of variables in any time that describe the system
3
General Principles in Discrete-Event Simulation
Entity Any object or component in system that require explicit representation (server, customer,...) Attributes The properties of a given customer List A collection of associated entities , ordered in some logical fashion (FIFO, priority,…) Event An instantaneous occurrence that changes the state of a system Event Notice A record of a event to occur at the current or future time (type and time)
4
General Principles in Discrete-Event Simulation
Event List FEL (future event list) Activity (unconditional wait) A duration time of specified length (service time or interarrival time,… ) Deterministic, Statistical and functional Delay (conditional wait) A duration of time of unspecified indefinite length, which is not known until it ends (customer delay in waiting line) Clock A variable representing simulated time
5
Example (Able and Baker)
What are the simulation components? System state Entities Events Activities Delay Components are static. Need also to model system dynamics – relationships & interactions between components. How does an event affect/trigger other system components? How are activities defined? What are the initial and termination system states?
6
Example (Able and Baker)
7
Simulation Process A sequence of system snapshots representing the evolution of the system through time. A snapshot at a given time includes: System state List of activities and status of components when each activity ends. Cumulative statistics.
8
Event Scheduling / Time Advance Algorithm
The sequence of actions which a simulator must perform to advance the clock and build a new system snapshot. Future event list (FEL): a key element Contains all event notices for events that have been scheduled to occur at a future time. Advances simulation time and guarantees that all events occur in correct order. What does scheduling a future event mean?
9
Event Scheduling The essential idea: move along the time scale until an event occurs and then, depending on the event, modify the system state and possibly schedule new events. Based on this, it is a trivial exercise to run through a simulation of the system. The events are stored in an event queue, which lists all events in order. The first event in the queue is taken off, and other events may then be added (assuming that an event only triggers other events in the future).
10
Event Scheduling cont’d
Arrival Event: 1. Check the status of the server(s) (idle or busy) If there is an idle server Update idle status; Start serving the customer. Generate a new departure event at t + s* for this customer. If all busy, place customer in queue & update LQ(t) 2. Generate new arrival event t + a* for next customer. 3. Collect stats; Return control to time-advance routine
11
Simple diagram
12
Detailed diagram
13
Event Scheduling cont’d
Departure Event 1. Check queue (empty or not) If empty, set server to idle. If not empty then do Choose a waiting customer, start serving the customer Generate a new departure event at time t + s* for this customer 2. Collect stats; Return control to time-advance routine
14
Simple diagram
15
Detailed diagram
16
Single server example using event scheduling
19
Dump-Truck example using event scheduling
20
Components, assumptions ad objectives
System contains Six trucks Two loaders One scale Assumptions FCFS waiting lines for loading and scaling Travel time from loading to scaling negligible After scaling, the truck start traveling time during which it will unload all its loads Purpose: estimate loaders and scale utilization
23
Simulation starts with one truck at the scale and the others loading (i.e. two loading and 3 waiting to load) Generated times for loading, weighting, and traveling are:
31
Simulation can be simplified by not considering the trucks in the event notices.
i.e. (EL, t, DTi) can be simplified to (EL, t) However, for other objectives rather than computing the loaders and the scale utilization, like computing the system response time, this details is required. System response time: how long the truck spends from the time of arrival at loading until it leaves scaling.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.