Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1 

2 

3class ArrivalProcess: 

4 """ 

5 Arrival process class for use in the OpenQTSim package 

6 """ 

7 

8 def __init__(self, symbol='M', arr_rate=8): 

9 """ 

10 symbol: symbol of the process (M, E_k, etc.) 

11 arr_rate: arrivals per hour 

12 """ 

13 

14 self.symbol = symbol 

15 self.arr_rate = arr_rate 

16 

17 def get_IAT(self, customer_nr=[]): 

18 """ 

19 Return the inter arrival time based on the inter arrival time distribution or deterministic list 

20 """ 

21 

22 if self.symbol == "M" or self.symbol == "E2": 

23 return self.arrival_distribution.rvs() 

24 

25 elif self.symbol == "D": 

26 return self.arrival_distribution.loc[customer_nr, ['IAT']].item()