-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWorkOrder.py
51 lines (41 loc) · 1.57 KB
/
WorkOrder.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
47
48
49
50
51
class WorkOrder:
def __init__(self,workID,facility,equipment,equipmentID,priority,time,submissionTime,inProgress):
self.workID = workID
self.facility = facility
self.equipment = equipment
self.equipmentID = equipmentID
self.priority = priority
self.time = time
self.submissionTime = submissionTime
self.inProgress = inProgress;
#flipped for everything because less priority and less time is better
def __lt__(self, other):
return ((self.priority,self.time) < (other.priority, other.time))
def __gt__(self, other):
return ((self.priority,self.time) > (other.priority, other.time))
def __eq__(self, other):
return ((self.priority,self.time) == (other.priority, other.time))
def __le__(self, other):
return ((self.priority,self.time) <= (other.priority, other.time))
def __ge__(self, other):
return ((self.priority,self.time) >= (other.priority, other.time))
def __ne__(self, other):
return ((self.priority,self.time) != (other.priority, other.time))
def getWorkID(self):
return self.workID
def getFacility(self):
return self.facility
def getEquipment(self):
return self.equipment
def getEquipmentID(self):
return self.equipmentID
def getPriority(self):
return self.priority
def getTime(self):
return self.time
def getSubmissionTime(self):
return self.submissionTime
def getStatus(self):
return self.inProgress
def __str__(self):
return str(self.workID) + " " + self.facility + " " + self.equipment + " " + self.equipmentID + " " + str(self.priority) + " " + str(self.time) + " " + str(self.submissionTime) + " " + str(self.inProgress)