File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -494,7 +494,7 @@ Simulation of arrival times and service deliveries for a multiserver queue::
494
494
495
495
from heapq import heappush, heappop
496
496
from random import expovariate, gauss
497
- from statistics import mean, median, stdev
497
+ from statistics import mean, quantiles
498
498
499
499
average_arrival_interval = 5.6
500
500
average_service_time = 15.0
@@ -513,8 +513,8 @@ Simulation of arrival times and service deliveries for a multiserver queue::
513
513
service_completed = arrival_time + wait + service_duration
514
514
heappush(servers, service_completed)
515
515
516
- print(f'Mean wait: {mean(waits):.1f}. Stdev wait: {stdev (waits):.1f}. ')
517
- print(f'Median wait: {median(waits):.1f}. Max wait: {max (waits):.1f}.' )
516
+ print(f'Mean wait: {mean(waits):.1f} Max wait: {max (waits):.1f}')
517
+ print('Quartiles:', [round(q, 1) for q in quantiles (waits)] )
518
518
519
519
.. seealso ::
520
520
You can’t perform that action at this time.
0 commit comments