Commit 3df580ab authored by Richard's avatar Richard

Merge branch 'dev' of into merge_dev_master

parents fdb2cde5 09cb049a
......@@ -35,30 +35,6 @@ class MyTTModel(TTModel):
# Minimize the number of busy days for tutors
# (if it does not overcome the bound expressed in pref_slots_per_day)
# It should be stored in the database
for i in self.wdb.instructors:
slot_by_day_cost = 0
# need to be sorted
frontier_pref_busy_days = [i.pref_slots_per_day * d for d in range(4, 0, -1)]
nb_courses = len(self.wdb.courses_for_tutor[i])
nb_days = 5
for fr in frontier_pref_busy_days:
if nb_courses <= fr:
slot_by_day_cost += self.IBD_GTE[nb_days][i]
nb_days -= 1
self.add_to_inst_cost(i, self.min_bd_i * slot_by_day_cost)
# Minimize students' half days
# It should be stored in the database
for g in self.wdb.basic_groups:
MinHalfDays(group=g, weight=max_weight).enrich_model(self)
def solve(self, time_limit=3600, solver='CBC', target_work_copy=None):
[{"buttxt": "Groupes prem. an.", "row": 0, "promo": "INFO1", "name": "CE", "children": [{"name": "1", "children": [{"name": "1A", "parent": "1"}, {"name": "1B", "parent": "1"}], "parent": "CE"}, {"name": "2", "children": [{"name": "2A", "parent": "2"}, {"name": "2B", "parent": "2"}], "parent": "CE"}, {"name": "3", "children": [{"name": "3A", "parent": "3"}, {"name": "3B", "parent": "3"}], "parent": "CE"}, {"name": "4", "children": [{"name": "4A", "parent": "4"}, {"name": "4B", "parent": "4"}], "parent": "CE"}], "parent": "null", "promotxt": "1A"}, {"buttxt": "Groupes deux. an.", "row": 1, "promo": "INFO2", "name": "CE", "children": [{"name": "1", "children": [{"name": "1A", "parent": "1"}, {"name": "1B", "parent": "1"}], "parent": "CE"}, {"buttxt": "2&3&4", "name": "234", "children": [{"name": "2", "children": [{"name": "2A", "parent": "2"}, {"name": "2B", "parent": "2"}], "parent": "234"}, {"name": "3", "children": [{"name": "3A", "parent": "3"}, {"name": "3B", "parent": "3"}], "parent": "234"}, {"name": "4", "parent": "234"}], "parent": "CE"}], "parent": "null", "promotxt": "2A"}, {"promo": "APSIO", "row": 1, "parent": "null", "promotxt": "LP", "name": "LP"}]
\ No newline at end of file
{"B219": ["B219"], "B113": ["B113"], "M": ["B101", "B102", "B103", "B104", "B105", "B106"], "E": ["B008", "B009", "B010", "B115"], "MP": ["B101", "B106"], "MM": ["B219"], "L": ["Labo"], "M+": ["B004", "B007", "B219"], "6M": [], "A": ["Amphi1", "Amphi2", "Amphi3"], "LRT": ["LRT"], "CTRL": ["Exam"], "B": ["B004", "B007", "B008", "B009", "B010"]}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment