ie 303 discrete-event simulation - isik un · 2016-10-19 · event scheduling algorithm in our...
TRANSCRIPT
![Page 1: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/1.jpg)
L E C T U R E 3 : E V E N T - S C H E D U L I N G A L G O R I T H M
IE 303 Discrete-Event Simulation
![Page 2: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/2.jpg)
Outline
Event Scheduling Algorithm
Single Server Queue (Revisited)
List processing
![Page 3: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/3.jpg)
Review of the Previous Lecture
Properties of random random numbers
Uniformity
Independence from history
As sample size->∞, histogram of random numbers -> uniform distr.
Coin tossing game
Single server queue
-> -> -> ->
![Page 4: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/4.jpg)
Event Scheduling Algorithm
In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to newsvendor, coin tosses,
What if our simulation is more complex?
Example: Assume we are simulating a port. We have 3 types of ships:
Container ships, Bulk carriers, Tankers
Each ship should be served by different types of machinery…
![Page 5: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/5.jpg)
Event Scheduling Algorithm
Keeping track of events in a simulation model is much harder if we do it through ship arrivals…
So, we use event scheduling algorithm:
The idea of the algorithm is at each event occurrence (activity) e.g. arrival of a customer, start of production etc,
future event is generated and written into Future Event List (FEL).
![Page 6: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/6.jpg)
Event Scheduling Algorithm
Activity vs. Delay: Activity a duration of time of specified length (statistical distributions)
(e.g. service time or interarrival time), which is known when it begins.
Delay a duration of time of unspecified indefinite length, which is not known until it ends (e.g. a customer’s delay in a last-in-first-out waiting line)
Single Server Queue:
Event: Arrivals of customers, service completion in the server
Activity: Service time
Delay: customers’ waiting in the queue
![Page 7: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/7.jpg)
Event Scheduling Algorithm
At any given time t, the FEL contains all previously scheduled events and their associated event times in chronological order:
t < t1 ≤ t2 ≤ t3 ≤ ··· ≤ tn
Time t is the value of CLOCK, current value of simulated time. The event associated t1 is the next event (imminent event) that will occur.
![Page 8: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/8.jpg)
Event Scheduling Algorithm
As time proceeds, the system state and future events and statistics are handled with such a table.
![Page 9: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/9.jpg)
Event Scheduling Algorithm
Also, every simulation should have a stopping event (E), which should be kept in FEL.
How would you draw the flow diagram of this algorithm?
![Page 10: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/10.jpg)
Event Scheduling Algorithm
![Page 11: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/11.jpg)
Event Scheduling Algorithm
Lets build a simulation of a single server queue using the event scheduling algorithm…
![Page 12: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/12.jpg)
Event Scheduling Algorithm
Four output measures:
: Number of service starts . It will be incremented every time the service of a new customer is started.
: Server utilization is defined by total server busy time
divided by total time, TE .
: Average waiting time is defined by total waiting time number of service (W/ NS).
: Average queue length
: Service length
: Queue length
SN
B
TE
W
LQ
LS
![Page 13: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/13.jpg)
Event Scheduling Algorithm
![Page 14: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/14.jpg)
Event Scheduling Algorithm
![Page 15: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/15.jpg)
Dump Truck Example
![Page 16: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/16.jpg)
Dump Truck Example
![Page 17: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/17.jpg)
Dump Truck Example
![Page 18: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/18.jpg)
Dump Truck Example
![Page 19: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/19.jpg)
Dump Truck Example
![Page 20: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/20.jpg)
Dump Truck Example
![Page 21: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/21.jpg)
Dump Truck Example
![Page 22: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/22.jpg)
Dump Truck Example
![Page 23: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/23.jpg)
Dump Truck Example
![Page 24: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/24.jpg)
List Processing
As can be seen FEL plays a crucial role in the simulation algorithm.
It is important to know and manage FEL list which can get very long in real-life simulation applications.
FEL can be stored in arrays by a computer.
![Page 25: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/25.jpg)
List Processing
Storing event list in arrays is a straightforward way.
It has pros and cons at the same time. From any perspective it is important to establish main operations on FEL list:
Removing a record from the top of the list
Removing a record from any location on the list
Adding a record to the bottom or top of the list
Adding a record to an arbitrary location.
![Page 26: IE 303 Discrete-Event Simulation - ISIK UN · 2016-10-19 · Event Scheduling Algorithm In our simulations so far, we went trough entities, e.g. arriving customers, daily demand to](https://reader033.vdocument.in/reader033/viewer/2022042212/5eb4b24c0dcc945a071c3d2a/html5/thumbnails/26.jpg)
END OF LECTURE 4
Next Lecture Chapter 5.1, 5.3, 5.4