Source file sched_t.ml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
[@@@ocaml.warning "-27-32-33-35-39"]
type user_id = Task_t.user_id
type time_slot = Time_slot_t.time_slot
type task_type = Task_t.task_type
type task_seg_size = Task_t.task_seg_size
type task_seg_place = Task_t.task_seg_place
type int64 = Int64_t.int64
type task_seg_part_sub = (int64 * int64 option)
type task_seg_id = Task_t.task_seg_id
type task_seg_alloc_req = Task_t.task_seg_alloc_req
type task_seg = Task_t.task_seg
type task_inst_type = Task_t.task_inst_type
type task_inst_id = Task_t.task_inst_id
type task_inst_data = Task_t.task_inst_data
type task_inst = Task_t.task_inst
type task_id = Task_t.task_id
type task_data = Task_t.task_data
type task = Task_t.task
type 'a set_diff = 'a Set_utils_t.diff
type sched_req_record_data = Sched_req_t.sched_req_record_data
type sched_req_id = Sched_req_t.sched_req_id
type sched_req_data = Sched_req_t.sched_req_data
type progress = Task_t.progress
type ('k, 'v) diff_bucketed = ('k, 'v) Map_utils_t.diff_bucketed
type ('k, 'v) diff = ('k, 'v) Map_utils_t.diff
type store_diff = {
task_uncompleted_list_diff: (task_id, task_data) diff;
task_completed_list_diff: (task_id, task_data) diff;
task_discarded_list_diff: (task_id, task_data) diff;
task_inst_uncompleted_list_diff: (task_inst_id, task_inst_data) diff;
task_inst_completed_list_diff: (task_inst_id, task_inst_data) diff;
task_inst_discarded_list_diff: (task_inst_id, task_inst_data) diff;
task_seg_uncompleted_list_diff: (task_seg_id, task_seg_size) diff;
task_seg_completed_list_diff: (task_seg_id, task_seg_size) diff;
task_seg_discarded_list_diff: (task_seg_id, task_seg_size) diff;
user_id_to_task_ids_diff: (user_id, int64) diff_bucketed;
task_id_to_task_inst_ids_diff: (task_id, int64) diff_bucketed;
task_inst_id_to_task_seg_ids_diff:
(task_inst_id, task_seg_part_sub) diff_bucketed;
sched_req_ids_diff: int64 set_diff;
sched_req_pending_list_diff: (sched_req_id, sched_req_data) diff;
sched_req_discarded_list_diff: (sched_req_id, sched_req_data) diff;
sched_req_record_list_diff: (sched_req_id, sched_req_record_data) diff;
quota_diff: (task_inst_id, int64) diff;
task_seg_id_to_progress_diff: (task_seg_id, progress) diff;
task_inst_id_to_progress_diff: (task_inst_id, progress) diff
}
type sched_req_record = Sched_req_t.sched_req_record
type sched_req = Sched_req_t.sched_req
type store = {
task_uncompleted_list: task list;
task_completed_list: task list;
task_discarded_list: task list;
task_inst_uncompleted_list: task_inst list;
task_inst_completed_list: task_inst list;
task_inst_discarded_list: task_inst list;
task_seg_uncompleted_list: task_seg list;
task_seg_completed_list: task_seg list;
task_seg_discarded_list: task_seg list;
user_id_to_task_ids: (user_id * int64 list) list;
task_id_to_task_inst_ids: (task_id * int64 list) list;
task_inst_id_to_task_seg_ids: (task_inst_id * task_seg_part_sub list) list;
sched_req_ids: sched_req_id list;
sched_req_pending_list: sched_req list;
sched_req_discarded_list: sched_req list;
sched_req_record_list: sched_req_record list;
quota: (task_inst_id * int64) list;
task_seg_id_to_progress: (task_seg_id * progress) list;
task_inst_id_to_progress: (task_inst_id * progress) list
}
type ('a, 'b) split_even = ('a, 'b) Sched_req_data_unit_skeleton_t.split_even
type sched_req_template = Task_t.sched_req_template
type sched_req_record_data_unit = Sched_req_t.sched_req_record_data_unit
type ('a, 'b, 'c) sched_req_data_unit_skeleton =
('a, 'b, 'c) Sched_req_data_unit_skeleton_t.sched_req_data_unit_skeleton
type sched_req_data_unit = Sched_req_t.sched_req_data_unit
type sched_id = int
type agenda_diff = {
indexed_by_task_seg_id_diff: (task_seg_id, time_slot) diff;
indexed_by_start_diff: (int64, task_seg_id) diff_bucketed;
indexed_by_end_exc_diff: (int64, task_seg_id) diff_bucketed
}
type sched_data_diff = { store_diff: store_diff; agenda_diff: agenda_diff }
type sched_diff = (sched_id * sched_id * sched_data_diff)
type agenda = {
indexed_by_task_seg_id: (task_seg_id * (int64 * int64)) list;
indexed_by_start: (int64 * task_seg_id list) list;
indexed_by_end_exc: (int64 * task_seg_id list) list
}
type sched_data = { store: store; agenda: agenda }
type sched = (sched_id * sched_data)
type recur_data = Task_t.recur_data
type recur = Task_t.recur
type ('a, 'b) fixed = ('a, 'b) Sched_req_data_unit_skeleton_t.fixed
type arith_seq = Task_t.arith_seq