Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

bank queue

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 1.12 sec, absolute running time: 0.1 sec, cpu time: 0.04 sec, memory peak: 3 Mb, absolute service time: 1,23 sec 
edit mode |  history  | discussion
*** Discrete Event Simulation Example for ECE 2574 ***

Adding 15 events.

[0] Adding event: Alice Zuckerman, Time: 66, Duration: 1, Event type: ARRIVAL
[0] Adding event: Ambroise Ghosh, Time: 13, Duration: 16, Event type: ARRIVAL
[0] Adding event: Alice Lee, Time: 62, Duration: 15, Event type: ARRIVAL
[0] Adding event: Bert Smith, Time: 6, Duration: 19, Event type: ARRIVAL
[0] Adding event: Alice Ghosh, Time: 55, Duration: 5, Event type: ARRIVAL
[0] Adding event: Larry Zhang, Time: 6, Duration: 16, Event type: ARRIVAL
[0] Adding event: Alice Zhang, Time: 1, Duration: 8, Event type: ARRIVAL
[0] Adding event: Ambroise Ghosh, Time: 14, Duration: 13, Event type: ARRIVAL
[0] Adding event: Larry Lee, Time: 53, Duration: 20, Event type: ARRIVAL
[0] Adding event: Ambroise Ghosh, Time: 47, Duration: 8, Event type: ARRIVAL
[0] Adding event: Bert Jones, Time: 94, Duration: 19, Event type: ARRIVAL
[0] Adding event: Bert Zhang, Time: 98, Duration: 3, Event type: ARRIVAL
[0] Adding event: Bert Jones, Time: 80, Duration: 5, Event type: ARRIVAL
[0] Adding event: Emily Lee, Time: 52, Duration: 18, Event type: ARRIVAL
[0] Adding event: Alice Ghosh, Time: 17, Duration: 9, Event type: ARRIVAL

Running simulation...
[1] Adding event: Alice Zhang, Time: 9, Duration: 8, Event type: DEPARTURE
[1] Current number of tellers available: 1
[6] Adding event: Bert Smith, Time: 25, Duration: 19, Event type: DEPARTURE
[6] Current number of tellers available: 0
[6] Adding bank queue customer: Larry Zhang, Time: 6, Duration: 16, Event type: ARRIVAL
[9] Adding event: Larry Zhang, Time: 17, Duration: 16, Event type: DEPARTURE
[13] Adding bank queue customer: Ambroise Ghosh, Time: 13, Duration: 16, Event type: ARRIVAL
[14] Adding bank queue customer: Ambroise Ghosh, Time: 14, Duration: 13, Event type: ARRIVAL
[17] Adding bank queue customer: Alice Ghosh, Time: 17, Duration: 9, Event type: ARRIVAL
[17] Adding event: Ambroise Ghosh, Time: 33, Duration: 16, Event type: DEPARTURE
[25] Adding event: Ambroise Ghosh, Time: 44, Duration: 13, Event type: DEPARTURE
[33] Adding event: Alice Ghosh, Time: 49, Duration: 9, Event type: DEPARTURE
[44] Current number of tellers available: 1
[47] Adding event: Ambroise Ghosh, Time: 55, Duration: 8, Event type: DEPARTURE
[47] Current number of tellers available: 0
[49] Current number of tellers available: 1
[52] Adding event: Emily Lee, Time: 70, Duration: 18, Event type: DEPARTURE
[52] Current number of tellers available: 0
[53] Adding bank queue customer: Larry Lee, Time: 53, Duration: 20, Event type: ARRIVAL
[55] Adding event: Larry Lee, Time: 63, Duration: 20, Event type: DEPARTURE
[55] Adding bank queue customer: Alice Ghosh, Time: 55, Duration: 5, Event type: ARRIVAL
[62] Adding bank queue customer: Alice Lee, Time: 62, Duration: 15, Event type: ARRIVAL
[63] Adding event: Alice Ghosh, Time: 83, Duration: 5, Event type: DEPARTURE
[66] Adding bank queue customer: Alice Zuckerman, Time: 66, Duration: 1, Event type: ARRIVAL
[70] Adding event: Alice Lee, Time: 88, Duration: 15, Event type: DEPARTURE
[80] Adding bank queue customer: Bert Jones, Time: 80, Duration: 5, Event type: ARRIVAL
[83] Adding event: Alice Zuckerman, Time: 88, Duration: 1, Event type: DEPARTURE
[88] Adding event: Bert Jones, Time: 103, Duration: 5, Event type: DEPARTURE
[88] Current number of tellers available: 1
[94] Adding event: Bert Jones, Time: 113, Duration: 19, Event type: DEPARTURE
[94] Current number of tellers available: 0
[98] Adding bank queue customer: Bert Zhang, Time: 98, Duration: 3, Event type: ARRIVAL
[103] Adding event: Bert Zhang, Time: 108, Duration: 3, Event type: DEPARTURE
[108] Current number of tellers available: 1
[113] Current number of tellers available: 2