-
Notifications
You must be signed in to change notification settings - Fork 0
/
individual.py
46 lines (33 loc) · 1.16 KB
/
individual.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from __future__ import division
class Server(object):
def __init__(self, station, id_number, start_date=0.0):
self.station = station
self.id_number = id_number
self.patient = False
self.busy = False
self.start_date = start_date
self.busy_time = False
self.total_time = False
self.next_end_service_date = float('Inf')
@property
def utilisation(self):
return self.busy_time / self.total_time
class Patient(object):
def __init__(self, id_number, patient_class=0, priority_class=0):
# static
self.id_number = id_number
self.data_records = []
# dynamic
self.server = False
self.destination = False
self.patient_class = patient_class
self.prev_class = patient_class
self.priority_class = priority_class
self.prev_priority_class = priority_class
self.arrival_date = False
self.service_start_date = False
self.service_time = False
self.service_end_date = False
self.exit_date = False
self.queue_size_at_arrival = False
self.queue_size_at_departure = False