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 ServiceProcess: 

4 """ 

5 Server process class for use in the OpenQTSim package 

6 """ 

7 

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

9 """ 

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

11 srv_rate: services per hour 

12 """ 

13 

14 self.symbol = symbol 

15 self.srv_rate = srv_rate 

16 

17 def get_ST(self, server, 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 server.service_distribution.rvs() 

24 

25 elif self.symbol == "D": 

26 return server.service_distribution.loc[customer_nr, ['ST']].item()