-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasses2.py
44 lines (37 loc) · 1.33 KB
/
classes2.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
### Ressources
class RessourceUnavailability:
def __init__(self, latitude,longitude,unavailabilityStart,unavailabilityEnd):
self.latitude=float(latitude)
self.longitude=float(longitude)
self.unavailabilityStart=unavailabilityStart
self.unavailabilityEnd=unavailabilityEnd
class Ressource:
def __init__(self, latitude,longitude,skill,level,workingStart,workingEnd):
self.latitude=float(latitude)
self.longitude=float(longitude)
self.skill=skill
self.level=level
self.workingStart=workingStart
self.workingEnd=workingEnd
self.unavailabilities=[]
self.tasks=[]
self.hours=[]
def addUnavailability(self, unavailability):
self.unavailabilities.append(unavailability)
### Tâches
class TaskUnavailability:
def __init__(self, unavailabilityStart,unavailabilityEnd):
self.unavailabilityStart=unavailabilityStart
self.unavailabilityEnd=unavailabilityEnd
class Task:
def __init__(self, latitude,longitude,duration,skill,level,openingTime,closingTime):
self.latitude=float(latitude)
self.longitude=float(longitude)
self.duration=int(duration)
self.skill=skill
self.level=level
self.openingTime=openingTime
self.closingTime=closingTime
self.unavailabilities=[]
def addUnavailability(self, unavailability):
self.unavailabilities.append(unavailability)