Scheduling.txt
2.43 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@startuml
'skinparam backgroundColor #AAFFFF
skinparam activity {
'StartColor red
'BarColor SaddleBrown
'EndColor Silver
'BackgroundColor Peru
BackgroundColor<<MODULE>> Orange
'BorderColor Peru
'FontName Impact
}
title **Current (2017) scheduling activity diagram (general overview)**
(*) --> "schedule = (Schedule Creation)"
--> "Set night limits (schedule.plan_start and schedule.plan_end)"
--> if "First Schedule ?" then
-->[yes] "schedule.plan_night_start = schedule.plan_start"
--> "Setting of <b>sequences</b> : a list of all the observable sequences (from database)" as A2
else
-->[no] "<b>Recovery of previous schedule's data:</b>
EXECUTED sequences, plan_night_start, plan_end
copy_from_previous_schedule()\l" <<MODULE>>
endif
--> A2
--> "//Add to each sequence its schedule id://
sequences = [(sequence, shs) for sequence in sequences]"
--> "Creation of the interval [plan_start ; plan_end] \land insertion in the intervals list"
--> "<b>Remove invalid sequences</b>
bad parameters : jd1 < 0 for example
removeInvalidSequences()"<<MODULE>>
--> "// TODO: <b>Determine priorities according to user and SP</b>"<<MODULE>>
-->"<b>Remove non eligible sequences</b>
//remove UNPLANNABLE sequences : overlap [jd1; jd2], [plan_start; plan_end] < duration for example//
removeNonEligibleSequences()" <<MODULE>>
--> "<b>Sort Sequences</b>
//Sort sequences by priority and soonest jd2//
sortSequences()"<<MODULE>>
--> "<b>Check Quota</b>
//Check if the user's quota is sufficient//"
-->if "Is Quota Sufficient ?" then
-->[no] "<b>Reject Sequence</b>"
else
-->[yes]"<b>Get matching intervals</b>
//Get the matching intervals for the sequence//"
endif
-->if "Intervals Found ?" then
-->[yes] "<b>Place sequence</b>
placeSequence(sequence, shs, matching)" <<MODULE>>
--> ==P==
else
-->[no] "<b>Try Shifting Sequences</b>
//Trying to shift the left or/and right sequences//
//in order to fit the current sequence//" <<MODULE>>
endif
--> ==P==
--> if "Sequence PLACED ?" then
-->[yes] "Decrease quota()" <<MODULE>>
-->"<b>Save Schedule</b>
//set the sequence status to PLANNED//
//and save the new schedule//
saveSchedule()"<<MODULE>>
else
-->[no] "<b>Reject Sequence</b>"
endif
@enduml