diff --git a/Constants/classroom_tt.py b/Constants/classroom_tt.py index 262c3fe..6109e54 100644 --- a/Constants/classroom_tt.py +++ b/Constants/classroom_tt.py @@ -5,7 +5,7 @@ class ClassroomTimetable: def __init__(self): # Dictionary to hold timetables for each classroom self.classroom_timetable = {} - + def generate_classroom_timetable(self, chromosome): for week, days in chromosome.items(): for day, sections in days.items(): @@ -35,14 +35,14 @@ def save_timetable_to_json(self, file_path="Constants/classroom_timetable.json") except Exception as e: print(f"Error saving timetable to '{file_path}': {e}") -if __name__ == "__main__": - # Generate classroom-wise timetable - classroom_timetable = ClassroomTimetable() - w = { - "Week 2": SampleChromosome.schedule2, - "Week 1": SampleChromosome.schedule1 - } - classroom_tt = classroom_timetable.generate_classroom_timetable(w) - print(classroom_tt) - # Save as JSON - classroom_timetable.save_timetable_to_json() +# if __name__ == "__main__": +# # Generate classroom-wise timetable +# classroom_timetable = ClassroomTimetable() +# w = { +# "Week 2": SampleChromosome.schedule2, +# "Week 1": SampleChromosome.schedule1 +# } +# classroom_tt = classroom_timetable.generate_classroom_timetable(w) +# print(classroom_tt) +# # Save as JSON +# classroom_timetable.save_timetable_to_json() diff --git a/Constants/classroom_tt_csv.py b/Constants/classroom_tt_csv.py deleted file mode 100644 index 6b59a1f..0000000 --- a/Constants/classroom_tt_csv.py +++ /dev/null @@ -1,83 +0,0 @@ -import os -import csv -from Samples.samples import (SampleChromosome,WorkingDays) -from Constants.classroom_tt import ClassroomTimetable # Ensure correct import - -# Predefined time slots mapping -time_slots = { - 1: "08:00 - 09:00", - 2: "09:00 - 10:00", - 3: "11:00 - 12:00", - 4: "12:00 - 13:00", - 5: "16:50 - 17:50", -} - -# Reverse lookup to get slot number from time string -time_slot_order = {v: k for k, v in time_slots.items()} - -# List of days in the correct order -days_of_week_order =WorkingDays.days - -def extract_time_slots(timetable): - """Extract and sort time slots from timetable.""" - unique_slots = set() - - # Collect all unique time slots - for day_data in timetable.values(): - for slots in day_data.values(): - for entry in slots: - if isinstance(entry, dict) and "time_slot" in entry: # ✅ Ensure correct structure - unique_slots.add(entry["time_slot"]) - else: - print(f"⚠️ ERROR: Unexpected entry format -> {entry}") - - # Sort slots based on predefined order - sorted_slots = sorted(unique_slots, key=lambda slot: time_slot_order.get(slot, float('inf'))) - - return [("CLASS", slot) for slot in sorted_slots] # Only include class slots - -def classroom_json_to_csv(classroom_timetable, output_folder): - """Convert classroom timetable JSON to CSV.""" - os.makedirs(output_folder, exist_ok=True) - - for classroom_id, schedule in classroom_timetable.items(): - final_slots = extract_time_slots(schedule) - csv_file = os.path.join(output_folder, f"{classroom_id}.csv") - header = ["DAY"] + [slot[1] for slot in final_slots] - rows = [] - - # Sort days correctly - sorted_days = sorted(schedule.items(), key=lambda x: days_of_week_order.index(x[0])) - - for day, day_data in sorted_days: - row = [day] + ["" for _ in final_slots] # Empty slots initially - - for section, classes in day_data.items(): - for entry in classes: - for i, slot in enumerate(final_slots): - if entry["time_slot"] == slot[1]: - row[i + 1] = f"{entry['subject_id']} ({section}, {entry['teacher_id']})" - - rows.append(row) - - # Write to CSV - with open(csv_file, mode="w", newline="", encoding="utf-8") as file: - writer = csv.writer(file) - writer.writerow(header) - writer.writerows(rows) - -if __name__ == "__main__": - # Generate classroom-wise timetable - classroom_timetable = ClassroomTimetable() - weekly_schedule = { - "Week 2": SampleChromosome.schedule2, - "Week 1": SampleChromosome.schedule1 - } - - classroom_tt = classroom_timetable.generate_classroom_timetable(weekly_schedule) - - # Output folder for CSV files - output_folder = "output_csvs" - - # Convert the generated timetable to CSV - classroom_json_to_csv(classroom_tt, output_folder) diff --git a/Constants/constant.py b/Constants/constant.py index 2e611fa..225fd0d 100644 --- a/Constants/constant.py +++ b/Constants/constant.py @@ -4,7 +4,7 @@ class Defaults: starting_section_fitness = 1000 max_class_capacity = 250 initial_no_of_chromosomes = 1000 - total_no_of_generations = 100 + total_no_of_generations = 10 class_strength = 50 diff --git a/Constants/helper_routines.py b/Constants/helper_routines.py index 7b8a685..e5c1ae6 100644 --- a/Constants/helper_routines.py +++ b/Constants/helper_routines.py @@ -25,9 +25,8 @@ def update_matrix_for_best( slot_index = time_slot_map[time_slot_str] # Now set availability to False - teacher_availability_matrix[teacher_id][day_index][ - slot_index - 1 - ] = False + if(teacher_id!=None): + teacher_availability_matrix[teacher_id][day_index][slot_index - 1] = False return teacher_availability_matrix diff --git a/Constants/teacher_tt_csv.py b/Constants/teacher_tt_csv.py deleted file mode 100644 index 9f5418f..0000000 --- a/Constants/teacher_tt_csv.py +++ /dev/null @@ -1,81 +0,0 @@ -import os -import json -import csv -from Samples.samples import (WorkingDays, SampleChromosome) -from Constants.teachers_tt import TeacherTimetable - -# Predefined time slots mapping -time_slots = { - 1: "08:00 - 09:00", - 2: "09:00 - 10:00", - 3: "11:00 - 12:00", - 4: "12:00 - 13:00", - 5: "16:50 - 17:50", -} - -# Reverse lookup to get slot number from time string -time_slot_order = {v: k for k, v in time_slots.items()} - -# List of days in the correct order -days_of_week_order = WorkingDays.days - -def extract_time_slots(timetable): - """Extract and sort time slots without inserting breaks or lunch.""" - unique_slots = set() - - # Collect all unique time slots from timetable - for day_data in timetable.values(): - for slots in day_data.values(): - for entry in slots: - unique_slots.add(entry["time_slot"]) - - # Sort slots based on predefined order - sorted_slots = sorted(unique_slots, key=lambda slot: time_slot_order.get(slot, float('inf'))) - - # Only include class slots - final_slots = [("CLASS", slot) for slot in sorted_slots] - - return final_slots - -def teacher_json_to_csv(teacher_timetable, output_folder): - """Convert teacher timetable dictionary to CSV.""" - os.makedirs(output_folder, exist_ok=True) - - for teacher_id, schedule in teacher_timetable.items(): - final_slots = extract_time_slots(schedule) - csv_file = os.path.join(output_folder, f"{teacher_id}.csv") - header = ["DAY"] + [slot[1] for slot in final_slots] - rows = [] - - # Sort days correctly - sorted_days = sorted(schedule.items(), key=lambda x: days_of_week_order.index(x[0])) - - for day, day_data in sorted_days: - row = [day] + ["" for _ in final_slots] # Empty slots initially - - for section, classes in day_data.items(): - for entry in classes: - for i, slot in enumerate(final_slots): - if entry["time_slot"] == slot[1]: - row[i + 1] = f"{entry['subject_id']} ({section}, {entry['classroom_id']})" - - rows.append(row) - - with open(csv_file, mode="w", newline="", encoding="utf-8") as file: - writer = csv.writer(file) - writer.writerow(header) - writer.writerows(rows) - -if __name__ == "__main__": - # Generate teacher-wise timetable - teacher_timetable = TeacherTimetable() - w = { - "Week 2": SampleChromosome.schedule2, - "Week 1": SampleChromosome.schedule1 - } - teacher_tt = teacher_timetable.generate_teacher_timetable(w) - - # Convert generated timetable to CSVs - output_folder = "tt_csvs" # Folder to save CSVs - teacher_json_to_csv(teacher_tt, output_folder) -w \ No newline at end of file diff --git a/GA/__init__.py b/GA/__init__.py index fd7f346..647e70f 100644 --- a/GA/__init__.py +++ b/GA/__init__.py @@ -41,6 +41,13 @@ def __init__(self, config: TimetableConfig): self.teacher_availability = copy.deepcopy(config.teacher_availability_matrix) self.lab_availability = copy.deepcopy(config.lab_availability_matrix) + def update_teacher_workload(self, best_teacher_matrix): + teacher_workload = { + teacher: sum(sum(1 for slot in day if not slot) for day in availability) + for teacher, availability in best_teacher_matrix.items() + } + return teacher_workload + def _update_lab_availability(self, best_timetable): updated_lab = copy.deepcopy(self.config.lab_availability_matrix) for weekday, daily_schedule in best_timetable.items(): @@ -54,7 +61,7 @@ def _update_lab_availability(self, best_timetable): if lab in updated_lab and ts_index is not None: updated_lab[lab][day_index][ts_index - 1] = False return updated_lab - + def _generate_timetable(self, teacher_matrix): tg = TimeTableGeneration( teacher_subject_mapping=self.config.teacher_subject_mapping, @@ -104,7 +111,6 @@ def _generate_timetable(self, teacher_matrix): mutated = [TimeTableMutation().mutate_schedule_for_week(ch) for ch in crossover_chromosomes] if self.config.prev_mutated: mutated.extend(self.config.prev_mutated) - best_chromosome, best_score = None, -1 for key, score in selected.items(): score = int(score) @@ -125,12 +131,9 @@ def run(self): self.config.prev_mutated = None for _ in range(self.config.total_generations): - teacher_copy = copy.deepcopy(initial_teacher) - best, updated_teacher, selected, mutated = self._generate_timetable(teacher_copy) + best, updated_teacher, selected, mutated = self._generate_timetable(copy.deepcopy(initial_teacher)) best_chromosome = best - - self.config.prev_selected = selected - self.config.prev_mutated = mutated + self.config.prev_selected, self.config.prev_mutated = selected, mutated updated_teacher = update_matrix_for_best( best_chromosome, @@ -140,7 +143,10 @@ def run(self): ) updated_lab = self._update_lab_availability(best_chromosome) - return best_chromosome, updated_teacher, updated_lab + teacher_workload = self.update_teacher_workload(updated_teacher) + + return best_chromosome, updated_teacher, updated_lab, teacher_workload + def run_timetable_generation( @@ -207,7 +213,7 @@ def run_timetable_generation( TeacherWorkload.Weekly_workLoad.keys(), 5, 7 ) - best_tt, final_teacher, final_lab = run_timetable_generation( + best_tt, final_teacher, final_lab,weekly_workload = run_timetable_generation( teacher_subject_mapping=SubjectTeacherMap.subject_teacher_map, total_sections={"A": 70, "B": 100, "C": 75, "D": 100}, total_classrooms={"R1": 200, "R2": 230, "R3": 240, "R4": 250, "R5": 250}, @@ -255,4 +261,4 @@ def run_timetable_generation( ) from icecream import ic - ic(best_tt, final_teacher, final_lab) + ic(best_tt, final_teacher, final_lab,weekly_workload) diff --git a/GA/chromosome.py b/GA/chromosome.py index 69c7daf..bca52d5 100644 --- a/GA/chromosome.py +++ b/GA/chromosome.py @@ -129,9 +129,10 @@ def _assign_subject_and_teacher( teacher_availability_matrix[teacher][day_index][slot_index - 1] ): assigned_teacher = teacher - teacher_workload_tracker[teacher] += 1 selected_subject = subject + teacher_workload_tracker[teacher] += 1 subjects_scheduled_today.add(subject) + break if assigned_teacher: @@ -139,10 +140,24 @@ def _assign_subject_and_teacher( if not assigned_teacher: selected_subject = "Library" - assigned_teacher = "None" + assigned_teacher = None + assigned_room = assigned_classroom + return assigned_teacher, selected_subject, assigned_room + def _initialize_teacher_workload_tracker(self): + return { + teacher: 0 + for teacher in self.weekly_workload + } + + def _get_available_subjects(self, section, subject_usage_tracker): + return [ + subject + for subject in self.subject_teacher_mapping + if subject_usage_tracker[section][subject] < self.subject_quota_limits.get(subject, 0) + ] def _allocate_lab( self, teacher: str, @@ -150,11 +165,19 @@ def _allocate_lab( day_index: int, slot_index: int, section_strength: int, + teacher_workload_tracker: dict, ) -> tuple: + """ + Allocates labs for a subject. + If a single lab can accommodate the entire section, only one lab is used. + Otherwise, the section is split into two groups and assigned separate labs. + """ + group1_size = ceil(section_strength / 2) group2_size = section_strength - group1_size labs_list = list(self.lab_availability_matrix.keys()) + for i in range(len(labs_list)): lab1 = labs_list[i] if ( @@ -211,8 +234,10 @@ def _allocate_lab( "group": 2, }, ] - return entries, slot_index + 2 + teacher_workload_tracker[teacher]+=1 + return entries, slot_index + 2, teacher_workload_tracker # Move ahead by two slots + # Fallback: if no lab pair found, return a merged allocation. merged_entry = { "teacher_id": teacher, "subject_id": subject, @@ -221,7 +246,8 @@ def _allocate_lab( "group": "merged", "flagged": False, } - return [merged_entry], slot_index + 1 + teacher_workload_tracker[teacher]+=1 + return merged_entry, slot_index + 1 ,teacher_workload_tracker def _generate_section_schedule( @@ -254,21 +280,47 @@ def _generate_section_schedule( time_slot = self.available_time_slots[slot_index] if subject in self.lab_subject_list or subject == "Placement_Class": if slot_index <= total_slots - 1: - lab_entries, slot_index = self._allocate_lab( - teacher, subject, day_index, slot_index, section_strength - ) - schedule.extend(lab_entries) - subject_usage_tracker[section][subject] += len(lab_entries) + if subject in self.lab_subject_list: + # Allocate lab for lab subjects + entries, new_slot_index,teacher_workload_tracker = self._allocate_lab( + teacher, subject, day_index, slot_index, section_strength,teacher_workload_tracker + ) + elif subject in self.special_subject_list: + # Allocate a normal classroom for special subjects + entries = [ + { + "teacher_id": teacher, + "subject_id": subject, + "classroom_id": assigned_classroom, # Special subjects use normal classrooms + "time_slot": self.available_time_slots[slot_index], + "group": "all", + }, + { + "teacher_id": teacher, + "subject_id": subject, + "classroom_id": assigned_classroom, + "time_slot": self.available_time_slots[slot_index + 1], + "group": "all", + }, + ] + new_slot_index = slot_index + 2 # Move ahead by two slots + + schedule.extend(entries) + subject_usage_tracker[section][subject] += len(entries) + + # ✅ Increase teacher workload by **1 more** since it's a double slot subject + teacher_workload_tracker[teacher] += 1 + + slot_index = new_slot_index else: - schedule.append( - { - "teacher_id": teacher, - "subject_id": subject, - "classroom_id": assigned_classroom, - "time_slot": time_slot, - "group": "fallback", - } - ) + # If at the end of the day and no space for 2 slots, fallback to single-slot assignment + schedule.append({ + "teacher_id": teacher, + "subject_id": subject, + "classroom_id": assigned_classroom, + "time_slot": time_slot, + "group": "fallback" + }) subject_usage_tracker[section][subject] += 1 slot_index += 1 else: @@ -285,7 +337,9 @@ def _generate_section_schedule( subject_usage_tracker[section][subject] += 1 slot_index += 1 - return schedule, teacher_availability_matrix + return schedule, teacher_availability_matrix,teacher_workload_tracker + + def generate_daily_schedule( @@ -294,58 +348,46 @@ def generate_daily_schedule( half_day_sections: list, subject_usage_tracker: dict, day_index: int, + teacher_workload_tracker:dict, ) -> tuple: daily_schedule = {} - teacher_workload = self._initialize_teacher_workload_tracker() for section in sections: section_strength = self.sections_manager[section] - ( - schedule, - self.teacher_availability_matrix, - ) = self._generate_section_schedule( + labs_capacity = self.lab_capacity_manager + section_schedule, self.teacher_availability_matrix ,teacher_workload_tracker= self._generate_section_schedule( section, half_day_sections, subject_usage_tracker, - teacher_workload, + teacher_workload_tracker, self.teacher_availability_matrix, day_index, section_strength, ) - daily_schedule[section] = schedule - return daily_schedule, subject_usage_tracker, self.teacher_availability_matrix + daily_schedule[section] = section_schedule + return daily_schedule, subject_usage_tracker, self.teacher_availability_matrix,teacher_workload_tracker - def _generate_weekly_schedule(self) -> tuple: + def _generate_weekly_schedule(self,teacher_workload_tracker): weekly_schedule = {} - subject_usage = { + section_subject_usage_tracker = { section: {subject: 0 for subject in self.subject_teacher_mapping.keys()} for section in self.sections_manager.keys() } sections = list(self.sections_manager.keys()) for day_index, weekday in enumerate(self.weekdays): random.shuffle(sections) - half_day = sections[: len(sections) // 2] - ( - daily_sched, - subject_usage, - self.teacher_availability_matrix, - ) = self.generate_daily_schedule( - sections, half_day, subject_usage, day_index + half_day_sections = sections[: len(sections) // 2] + daily_schedule, section_subject_usage_tracker, self.teacher_availability_matrix,teacher_workload_tracker = self.generate_daily_schedule( + sections, half_day_sections, section_subject_usage_tracker, day_index,teacher_workload_tracker ) - weekly_schedule[weekday] = daily_sched - return weekly_schedule, subject_usage, self.teacher_availability_matrix - + weekly_schedule[weekday] = daily_schedule + return weekly_schedule, section_subject_usage_tracker, self.teacher_availability_matrix,teacher_workload_tracker - def create_timetable(self, num_weeks: int) -> tuple: + def create_timetable(self, num_weeks): timetable = {} for week in range(1, num_weeks + 1): - self.lab_availability_matrix = copy.deepcopy( - self.initial_lab_availability_matrix - ) - ( - weekly_schedule, - _, - self.teacher_availability_matrix, - ) = self._generate_weekly_schedule() + self.lab_availability_matrix = copy.deepcopy(self.initial_lab_availability_matrix) + teacher_workload_tracker = self._initialize_teacher_workload_tracker() + weekly_schedule, _, self.teacher_availability_matrix,teacher_workload_tracker = self._generate_weekly_schedule(teacher_workload_tracker) timetable[f"Week {week}"] = weekly_schedule return timetable, self.teacher_availability_matrix, self.lab_availability_matrix diff --git a/GA/fitness.py b/GA/fitness.py index d88237e..0d302c6 100644 --- a/GA/fitness.py +++ b/GA/fitness.py @@ -56,12 +56,13 @@ def evaluate_timetable_fitness(self): classroom_time_slot_tracking = {} for schedule_item in section_schedule: - assigned_teacher = schedule_item["teacher_id"] - assigned_classroom = schedule_item["classroom_id"] - assigned_time_slot = self.time_slots.get( - schedule_item["time_slot"] - ) - section_strength = self.section_student_strength.get(section, 0) + if isinstance(schedule_item, dict): + assigned_teacher = schedule_item['teacher_id'] + assigned_classroom = schedule_item['classroom_id'] + assigned_time_slot = self.time_slots.get( + schedule_item['time_slot'] + ) + section_strength = self.section_student_strength.get(section, 0) # Penalty 1: Double booking a teacher in the same time slot if ( diff --git a/GA/mutation.py b/GA/mutation.py index 9416ff4..666ee0e 100644 --- a/GA/mutation.py +++ b/GA/mutation.py @@ -13,12 +13,21 @@ def mutate_time_slots_in_section(self, schedule: dict, section: str) -> bool: return False section_slots = schedule[section] + + # Ensure section_slots only contains dictionaries + if not all(isinstance(entry, dict) for entry in section_slots): + print(f"ERROR: section_slots contains invalid data -> {section_slots}") + return False # Handle error or clean the data + time_slots = [entry["time_slot"] for entry in section_slots] random.shuffle(time_slots) + for i, entry in enumerate(section_slots): entry["time_slot"] = time_slots[i] + return True + def mutate_schedule_for_week(self, weekly_schedule: dict) -> dict: mutated_schedule = copy.deepcopy(weekly_schedule) for day, day_schedule in mutated_schedule.items(): diff --git a/Samples/samples.py b/Samples/samples.py index ae5227a..edc2be8 100644 --- a/Samples/samples.py +++ b/Samples/samples.py @@ -395,1427 +395,1564 @@ class Lab_availability: class SampleChromosome: - schedule1 = { - "Monday": { - "A": [ - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "SP06", - "subject_id": "TCS-503", - "classroom_id": "R1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R1", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R1", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "BJ10", - "subject_id": "TMA-502", - "classroom_id": "R1", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "SJ16", - "subject_id": "TCS-509", - "classroom_id": "R1", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R1", - "time_slot": "3:30 - 4:25", - }, - ], - "B": [ - { - "teacher_id": "RS11", - "subject_id": "TMA-502", - "classroom_id": "R2", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AB17", - "subject_id": "TCS-509", - "classroom_id": "R2", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "PM14", - "subject_id": "PMA-502", - "classroom_id": "L4", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "PM14", - "subject_id": "PMA-502", - "classroom_id": "L4", - "time_slot": "11:10 - 12:05", - }, - ], - "C": [ - { - "teacher_id": "DP07", - "subject_id": "TCS-503", - "classroom_id": "R3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "HP18", - "subject_id": "TCS-509", - "classroom_id": "R3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R3", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "PK02", - "subject_id": "TCS-531", - "classroom_id": "R3", - "time_slot": "12:05 - 1:00", - }, - ], - "D": [ - { - "teacher_id": "AA04", - "subject_id": "TCS-502", - "classroom_id": "R4", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AC05", - "subject_id": "TCS-503", - "classroom_id": "R4", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L2", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R4", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "SG19", - "subject_id": "TCS-509", - "classroom_id": "R4", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R4", - "time_slot": "3:30 - 4:25", - }, - ], - }, - "Tuesday": { - "A": [ - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "SJ16", - "subject_id": "TCS-509", - "classroom_id": "R1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L3", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L3", - "time_slot": "11:10 - 12:05", - }, - ], - "B": [ - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R2", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R2", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AB17", - "subject_id": "TCS-509", - "classroom_id": "R2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R2", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "BJ10", - "subject_id": "TMA-502", - "classroom_id": "R2", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R2", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "PA21", - "subject_id": "XCS-501", - "classroom_id": "R2", - "time_slot": "3:30 - 4:25", - }, - ], - "C": [ - { - "teacher_id": "AA04", - "subject_id": "TCS-502", - "classroom_id": "R3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "NB22", - "subject_id": "XCS-501", - "classroom_id": "R3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "DP07", - "subject_id": "PCS-503", - "classroom_id": "L2", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "DP07", - "subject_id": "PCS-503", - "classroom_id": "L2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "PK02", - "subject_id": "TCS-531", - "classroom_id": "R3", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "SP06", - "subject_id": "TCS-503", - "classroom_id": "R3", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "HP18", - "subject_id": "TCS-509", - "classroom_id": "R3", - "time_slot": "3:30 - 4:25", - }, - ], - "D": [ - { - "teacher_id": "SG19", - "subject_id": "TCS-509", - "classroom_id": "R4", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R4", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R4", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R4", - "time_slot": "12:05 - 1:00", - }, - ], - }, - "Wednesday": { - "A": [ - { - "teacher_id": "SJ16", - "subject_id": "TCS-509", - "classroom_id": "R1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L5", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L5", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "SP06", - "subject_id": "TCS-503", - "classroom_id": "R1", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "BJ10", - "subject_id": "TMA-502", - "classroom_id": "R1", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R1", - "time_slot": "3:30 - 4:25", - }, - ], - "B": [ - { - "teacher_id": "AB17", - "subject_id": "TCS-509", - "classroom_id": "R2", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R2", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "RS11", - "subject_id": "TMA-502", - "classroom_id": "R2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R2", - "time_slot": "12:05 - 1:00", - }, - ], - "C": [ - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R3", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R3", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "DP07", - "subject_id": "TCS-503", - "classroom_id": "L2", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "DP07", - "subject_id": "TCS-503", - "classroom_id": "L2", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R3", - "time_slot": "3:30 - 4:25", - }, - ], - "D": [ - { - "teacher_id": "RD09", - "subject_id": "PCS-506", - "classroom_id": "L1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "RD09", - "subject_id": "PCS-506", - "classroom_id": "L1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AC05", - "subject_id": "TCS-503", - "classroom_id": "R4", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "JM12", - "subject_id": "TMA-502", - "classroom_id": "R4", - "time_slot": "12:05 - 1:00", - }, - ], - }, - "Thursday": { - "A": [ - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "SP06", - "subject_id": "TCS-503", - "classroom_id": "R1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R1", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "BJ10", - "subject_id": "TMA-502", - "classroom_id": "R1", - "time_slot": "12:05 - 1:00", - }, - ], - "B": [ - { - "teacher_id": "DP07", - "subject_id": "TCS-503", - "classroom_id": "R2", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R2", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "PA21", - "subject_id": "XCS-501", - "classroom_id": "R2", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "RS11", - "subject_id": "TMA-502", - "classroom_id": "R2", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R2", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R2", - "time_slot": "3:30 - 4:25", - }, - ], - "C": [ - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L4", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L4", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "PM14", - "subject_id": "PMA-502", - "classroom_id": "L1", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "PM14", - "subject_id": "PMA-502", - "classroom_id": "L1", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "L5", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "L5", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "SJ16", - "subject_id": "TCS-509", - "classroom_id": "R3", - "time_slot": "3:30 - 4:25", - }, - ], - "D": [ - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R4", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "PK02", - "subject_id": "TCS-531", - "classroom_id": "R4", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "JM12", - "subject_id": "TMA-502", - "classroom_id": "R4", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AB17", - "subject_id": "TCS-509", - "classroom_id": "R4", - "time_slot": "12:05 - 1:00", - }, - ], - }, - "Friday": { - "A": [ - { - "teacher_id": "SJ16", - "subject_id": "TCS-509", - "classroom_id": "R1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R1", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R1", - "time_slot": "12:05 - 1:00", - }, - ], - "B": [ - { - "teacher_id": "BJ10", - "subject_id": "TMA-502", - "classroom_id": "R2", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R2", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AA04", - "subject_id": "TCS-502", - "classroom_id": "R2", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L3", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L3", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R2", - "time_slot": "3:30 - 4:25", - }, - ], - "C": [ - { - "teacher_id": "RS11", - "subject_id": "TMA-502", - "classroom_id": "R3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AC05", - "subject_id": "TCS-502", - "classroom_id": "R3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R3", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "SP06", - "subject_id": "TCS-503", - "classroom_id": "R3", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "PM14", - "subject_id": "PMA-502", - "classroom_id": "L5", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "PM14", - "subject_id": "PMA-502", - "classroom_id": "L5", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AB17", - "subject_id": "TCS-509", - "classroom_id": "R3", - "time_slot": "3:30 - 4:25", - }, - ], - "D": [ - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R4", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R4", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R4", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "HP18", - "subject_id": "TCS-509", - "classroom_id": "R4", - "time_slot": "12:05 - 1:00", - }, - ], - }, - } - schedule2 = { - "Monday": { - "A": [ - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "SJ16", - "subject_id": "TCS-509", - "classroom_id": "R1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L5", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L5", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R1", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R1", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R1", - "time_slot": "3:30 - 4:25", - }, - ], - "B": [ - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AB17", - "subject_id": "TCS-509", - "classroom_id": "R2", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "SP06", - "subject_id": "TCS-503", - "classroom_id": "R2", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R2", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "PA21", - "subject_id": "XCS-501", - "classroom_id": "R2", - "time_slot": "3:30 - 4:25", - }, - ], - "C": [ - { - "teacher_id": "RD09", - "subject_id": "PCS-506", - "classroom_id": "L5", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "RD09", - "subject_id": "PCS-506", - "classroom_id": "L5", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "DP07", - "subject_id": "PCS-503", - "classroom_id": "L4", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "DP07", - "subject_id": "PCS-503", - "classroom_id": "L4", - "time_slot": "11:10 - 12:05", - }, - ], - "D": [ - { - "teacher_id": "PM14", - "subject_id": "PMA-502", - "classroom_id": "L1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "PM14", - "subject_id": "PMA-502", - "classroom_id": "L1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "NB22", - "subject_id": "XCS-501", - "classroom_id": "R4", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "DP07", - "subject_id": "TCS-503", - "classroom_id": "R4", - "time_slot": "12:05 - 1:00", - }, - ], - }, - "Tuesday": { - "A": [ - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "SP06", - "subject_id": "TCS-503", - "classroom_id": "R1", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R1", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R1", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AK26", - "subject_id": "Placement_Class", - "classroom_id": "R1", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "SJ16", - "subject_id": "TCS-509", - "classroom_id": "R1", - "time_slot": "3:30 - 4:25", - }, - ], - "B": [ - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R2", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "PA21", - "subject_id": "XCS-501", - "classroom_id": "R2", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "DP07", - "subject_id": "TCS-503", - "classroom_id": "R2", - "time_slot": "12:05 - 1:00", - }, - ], - "C": [ - { - "teacher_id": "NB22", - "subject_id": "XCS-501", - "classroom_id": "R3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AC05", - "subject_id": "TCS-503", - "classroom_id": "R3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R3", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "PK02", - "subject_id": "TCS-531", - "classroom_id": "R3", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R3", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "BJ10", - "subject_id": "TMA-502", - "classroom_id": "R3", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "AA04", - "subject_id": "TCS-502", - "classroom_id": "R3", - "time_slot": "3:30 - 4:25", - }, - ], - "D": [ - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R4", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AC05", - "subject_id": "TCS-502", - "classroom_id": "R4", - "time_slot": "12:05 - 1:00", - }, - ], - }, - "Wednesday": { - "A": [ - { - "teacher_id": "SJ16", - "subject_id": "TCS-509", - "classroom_id": "R1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L3", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L3", - "time_slot": "11:10 - 12:05", - }, - ], - "B": [ - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R2", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R2", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AB17", - "subject_id": "TCS-509", - "classroom_id": "R2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "BJ10", - "subject_id": "TMA-502", - "classroom_id": "R2", - "time_slot": "12:05 - 1:00", - }, - ], - "C": [ - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "RS11", - "subject_id": "TMA-502", - "classroom_id": "R3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R3", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "PA21", - "subject_id": "XCS-501", - "classroom_id": "R3", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "DP07", - "subject_id": "PCS-503", - "classroom_id": "L1", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "DP07", - "subject_id": "PCS-503", - "classroom_id": "L1", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AA04", - "subject_id": "TCS-502", - "classroom_id": "R3", - "time_slot": "3:30 - 4:25", - }, - ], - "D": [ - { - "teacher_id": "SP06", - "subject_id": "PCS-503", - "classroom_id": "L4", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "SP06", - "subject_id": "PCS-503", - "classroom_id": "L4", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R4", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "NB22", - "subject_id": "XCS-501", - "classroom_id": "R4", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "SP06", - "subject_id": "TCS-503", - "classroom_id": "R4", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "PK02", - "subject_id": "TCS-531", - "classroom_id": "R4", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "HP18", - "subject_id": "TCS-509", - "classroom_id": "R4", - "time_slot": "3:30 - 4:25", - }, - ], - }, - "Thursday": { - "A": [ - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "BJ10", - "subject_id": "TMA-502", - "classroom_id": "R1", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "SJ16", - "subject_id": "TCS-509", - "classroom_id": "R1", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R1", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R1", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "SP06", - "subject_id": "TCS-503", - "classroom_id": "R1", - "time_slot": "3:30 - 4:25", - }, - ], - "B": [ - { - "teacher_id": "AA04", - "subject_id": "TCS-502", - "classroom_id": "R2", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "DP07", - "subject_id": "TCS-503", - "classroom_id": "R2", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "RS11", - "subject_id": "TMA-502", - "classroom_id": "R2", - "time_slot": "12:05 - 1:00", - }, - ], - "C": [ - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "JM12", - "subject_id": "TMA-502", - "classroom_id": "R3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L5", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L5", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AC05", - "subject_id": "TCS-503", - "classroom_id": "R3", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R3", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R3", - "time_slot": "3:30 - 4:25", - }, - ], - "D": [ - { - "teacher_id": "NJ13", - "subject_id": "TMA-502", - "classroom_id": "R4", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AP24", - "subject_id": "SCS-501", - "classroom_id": "R4", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "PA21", - "subject_id": "XCS-501", - "classroom_id": "R4", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R4", - "time_slot": "12:05 - 1:00", - }, - ], - }, - "Friday": { - "A": [ - { - "teacher_id": "SJ16", - "subject_id": "TCS-509", - "classroom_id": "R1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R1", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "SP06", - "subject_id": "TCS-503", - "classroom_id": "R1", - "time_slot": "12:05 - 1:00", - }, - ], - "B": [ - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L1", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "RS11", - "subject_id": "PCS-503", - "classroom_id": "L1", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "BJ10", - "subject_id": "TMA-502", - "classroom_id": "R2", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "PK02", - "subject_id": "TCS-531", - "classroom_id": "R2", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "DP07", - "subject_id": "TCS-503", - "classroom_id": "R2", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R2", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "SS03", - "subject_id": "TCS-502", - "classroom_id": "R2", - "time_slot": "3:30 - 4:25", - }, - ], - "C": [ - { - "teacher_id": "AC05", - "subject_id": "TCS-503", - "classroom_id": "R3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "AK23", - "subject_id": "CSP-501", - "classroom_id": "R3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "AB17", - "subject_id": "TCS-509", - "classroom_id": "R3", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AB01", - "subject_id": "TCS-531", - "classroom_id": "R3", - "time_slot": "12:05 - 1:00", - }, - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L5", - "time_slot": "2:15 - 3:10", - }, - { - "teacher_id": "AD08", - "subject_id": "PCS-506", - "classroom_id": "L5", - "time_slot": "1:20 - 2:15", - }, - { - "teacher_id": "DT20", - "subject_id": "XCS-501", - "classroom_id": "R3", - "time_slot": "3:30 - 4:25", - }, - ], - "D": [ - { - "teacher_id": "PM14", - "subject_id": "PMA-502", - "classroom_id": "L3", - "time_slot": "9:55 - 10:50", - }, - { - "teacher_id": "PM14", - "subject_id": "PMA-502", - "classroom_id": "L3", - "time_slot": "9:00 - 9:55", - }, - { - "teacher_id": "HP18", - "subject_id": "TCS-509", - "classroom_id": "R4", - "time_slot": "11:10 - 12:05", - }, - { - "teacher_id": "AA04", - "subject_id": "TCS-502", - "classroom_id": "R4", - "time_slot": "12:05 - 1:00", - }, - ], - }, - } + schedule1={'Friday': {'A': [{'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'BJ10', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'SJ16', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '12:05 - 1:00'}], + 'B': [{'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AA04', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'PK02', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L3', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L3', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L4', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L4', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'DP07', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'DT20', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'HP18', + 'time_slot': '3:30 - 4:25'}], + 'C': [{'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'SS03', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'AB17', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '12:05 - 1:00'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AC05', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R5', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R5', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '3:30 - 4:25'}]}, + 'Monday': {'A': [{'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'SS03', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'DP07', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'DT20', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R2', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R2', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'JM12', + 'time_slot': '3:30 - 4:25'}], + 'B': [{'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'BJ10', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'SJ16', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'CSP-501', + 'teacher_id': 'AK23', + 'time_slot': '12:05 - 1:00'}], + 'C': [{'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '12:05 - 1:00'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'NJ13', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'AC05', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'PA21', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'PK02', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'AB17', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AA04', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'SCS-501', + 'teacher_id': 'AP24', + 'time_slot': '3:30 - 4:25'}]}, + 'Saturday': {'A': [{'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '3:30 - 4:25'}], + 'B': [{'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '3:30 - 4:25'}], + 'C': [{'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}]}, + 'Thursday': {'A': [{'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AA04', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'SJ16', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'JM12', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'PK02', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '3:30 - 4:25'}], + 'B': [{'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'BJ10', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'SS03', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'SCS-501', + 'teacher_id': 'AP24', + 'time_slot': '12:05 - 1:00'}], + 'C': [{'classroom_id': 'L3', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'AD08', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L3', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'AD08', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L4', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'AD08', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L4', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'AD08', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'NJ13', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'AB17', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AC05', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'DP07', + 'time_slot': '3:30 - 4:25'}], + 'D': [{'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '12:05 - 1:00'}]}, + 'Tuesday': {'A': [{'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'SCS-501', + 'teacher_id': 'AP24', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'PA21', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'CSP-501', + 'teacher_id': 'AK23', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'AB17', + 'time_slot': '3:30 - 4:25'}], + 'B': [{'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R4', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R4', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '12:05 - 1:00'}], + 'C': [{'classroom_id': 'R3', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R3', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'CSP-501', + 'teacher_id': 'AK23', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'DT20', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'RS11', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AA04', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '3:30 - 4:25'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'SJ16', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'BJ10', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'SS03', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'CSP-501', + 'teacher_id': 'AK23', + 'time_slot': '12:05 - 1:00'}]}, + 'Wednesday': {'A': [{'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'SS03', + 'time_slot': '12:05 - 1:00'}], + 'B': [{'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'NJ13', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'AB17', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'RD09', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'RD09', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'RD09', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'RD09', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'NB22', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'AC05', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AA04', + 'time_slot': '3:30 - 4:25'}], + 'C': [{'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'SCS-501', + 'teacher_id': 'AP24', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'BJ10', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'DT20', + 'time_slot': '12:05 - 1:00'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'JM12', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'SJ16', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'DP07', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'PA21', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'PK02', + 'time_slot': '3:30 - 4:25'}]} + } + schedule2={'Friday': {'A': [{'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'SJ16', + 'time_slot': '12:05 - 1:00'}], + 'B': [{'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'AB17', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'PK02', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'JM12', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'VD25', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'VD25', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'VD25', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'VD25', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '3:30 - 4:25'}], + 'C': [{'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'AC05', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R3', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R3', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '3:30 - 4:25'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'BJ10', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'DP07', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}]}, + 'Monday': {'A': [{'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'BJ10', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'SS03', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'SCS-501', + 'teacher_id': 'AP24', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'DT20', + 'time_slot': '12:05 - 1:00'}], + 'B': [{'classroom_id': 'R4', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R4', + 'group': 'special_subject', + 'subject_id': 'Placement_Class', + 'teacher_id': 'AK26', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AC05', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'DP07', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'CSP-501', + 'teacher_id': 'AK23', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'NB22', + 'time_slot': '3:30 - 4:25'}], + 'C': [{'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'AB17', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'DT20', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'JM12', + 'time_slot': '3:30 - 4:25'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'SJ16', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AA04', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'PA21', + 'time_slot': '12:05 - 1:00'}]}, + 'Saturday': {'A': [{'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}], + 'B': [{'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '3:30 - 4:25'}], + 'C': [{'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '3:30 - 4:25'}]}, + 'Thursday': {'A': [{'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'HP18', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AC05', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'JM12', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'PK02', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'DP07', + 'time_slot': '3:30 - 4:25'}], + 'B': [{'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'AB17', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'BJ10', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'SCS-501', + 'teacher_id': 'AP24', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AA04', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '3:30 - 4:25'}], + 'C': [{'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'PK02', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'SS03', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'Library', + 'teacher_id': 'None', + 'time_slot': '12:05 - 1:00'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'SJ16', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-503', + 'teacher_id': 'RS11', + 'time_slot': '12:05 - 1:00'}]}, + 'Tuesday': {'A': [{'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'CSP-501', + 'teacher_id': 'AK23', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '12:05 - 1:00'}], + 'B': [{'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'AD08', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'DT20', + 'time_slot': '12:05 - 1:00'}], + 'C': [{'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'PA21', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'PK02', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'CSP-501', + 'teacher_id': 'AK23', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'RS11', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'SCS-501', + 'teacher_id': 'AP24', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AA04', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'SJ16', + 'time_slot': '3:30 - 4:25'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'SS03', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'BJ10', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L3', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'AA15', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L3', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'AA15', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L4', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'AA15', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L4', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'AA15', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'RD09', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PCS-506', + 'teacher_id': 'RD09', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'RD09', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PCS-506', + 'teacher_id': 'RD09', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'SCS-501', + 'teacher_id': 'AP24', + 'time_slot': '3:30 - 4:25'}]}, + 'Wednesday': {'A': [{'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'BJ10', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'DT20', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R2', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AA04', + 'time_slot': '12:05 - 1:00'}], + 'B': [{'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R4', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'SS03', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'PM14', + 'time_slot': '12:05 - 1:00'}], + 'C': [{'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'AD08', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L1', + 'group': 1, + 'subject_id': 'PMA-502', + 'teacher_id': 'AD08', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'AD08', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'L2', + 'group': 2, + 'subject_id': 'PMA-502', + 'teacher_id': 'AD08', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'SP06', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'AB17', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'SS03', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'AB01', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R3', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'JM12', + 'time_slot': '3:30 - 4:25'}], + 'D': [{'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-509', + 'teacher_id': 'SJ16', + 'time_slot': '9:00 - 9:55'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TMA-502', + 'teacher_id': 'RS11', + 'time_slot': '9:55 - 10:50'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-502', + 'teacher_id': 'AC05', + 'time_slot': '11:10 - 12:05'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'CSP-501', + 'teacher_id': 'AK23', + 'time_slot': '12:05 - 1:00'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-503', + 'teacher_id': 'DP07', + 'time_slot': '1:20 - 2:15'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'XCS-501', + 'teacher_id': 'PA21', + 'time_slot': '2:15 - 3:10'}, + {'classroom_id': 'R5', + 'group': 'all', + 'subject_id': 'TCS-531', + 'teacher_id': 'PK02', + 'time_slot': '3:30 - 4:25'}]}} \ No newline at end of file diff --git a/__init__.py b/__init__.py index 4ce37f4..47b4b1d 100644 --- a/__init__.py +++ b/__init__.py @@ -1,4 +1,6 @@ -from Constants.constant import Defaults +import copy +from dataclasses import dataclass + from Constants.helper_routines import ( initialize_teacher_availability, update_matrix_for_best, @@ -8,34 +10,159 @@ from GA.fitness import TimetableFitnessEvaluator from GA.mutation import TimeTableCrossOver, TimeTableMutation from GA.selection import TimeTableSelection -from Samples.samples import ( - InterDepartment, - RoomCapacity, - SpecialSubjects, - SubjectTeacherMap, - SubjectWeeklyQuota, - TeacherWorkload, - TimeSlots, -) -def timetable_generation( - teacher_subject_mapping, - total_sections, - total_classrooms, - total_labs, - teacher_preferences, - teacher_weekly_workload, - special_subjects, - labs, - subject_quota_limits, - teacher_duty_days, - teacher_availability_matrix, - time_slots, - prev_selected_chromosomes=None, - prev_mutated_chromosomes=None, +@dataclass +class TimetableConfig: + teacher_subject_mapping: dict + total_sections: dict + total_classrooms: dict + total_labs: dict + teacher_preferences: dict + teacher_weekly_workload: dict + special_subjects: dict + labs: dict + subject_quota_limits: dict + teacher_duty_days: dict + teacher_availability_matrix: dict + lab_availability_matrix: dict + total_generations: int + time_slots: dict + day_map: dict + time_slot_map: dict + prev_selected: dict = None + prev_mutated: list = None + fixed_teacher_assignment: dict = None + + +class TimetableEngine: + def __init__(self, config: TimetableConfig): + self.config = config + self.teacher_availability = copy.deepcopy(config.teacher_availability_matrix) + self.lab_availability = copy.deepcopy(config.lab_availability_matrix) + + def _update_lab_availability(self, best_timetable): + updated_lab = copy.deepcopy(self.config.lab_availability_matrix) + for weekday, daily_schedule in best_timetable.items(): + day_index = self.config.day_map.get(weekday) + if day_index is None: + continue + for allocations in daily_schedule.values(): + for alloc in allocations: + lab = alloc.get("classroom_id") + ts_index = self.config.time_slot_map.get(alloc.get("time_slot")) + if lab in updated_lab and ts_index is not None: + updated_lab[lab][day_index][ts_index - 1] = False + return updated_lab + + def _generate_timetable(self, teacher_matrix): + tg = TimeTableGeneration( + teacher_subject_mapping=self.config.teacher_subject_mapping, + total_sections=self.config.total_sections, + total_classrooms=self.config.total_classrooms, + total_labs=self.config.total_labs, + teacher_preferences=self.config.teacher_preferences, + teacher_weekly_workload=self.config.teacher_weekly_workload, + special_subjects=self.config.special_subjects, + labs=self.config.labs, + subject_quota_limits=self.config.subject_quota_limits, + teacher_duty_days=self.config.teacher_duty_days, + teacher_availability_matrix=teacher_matrix, + lab_availability_matrix=self.lab_availability, + time_slots=self.config.time_slots, + fixed_teacher_assignment=self.config.fixed_teacher_assignment or {} + ) + timetable, updated_teacher = tg.create_timetable(self.config.total_generations)[:2] + fitness = TimetableFitnessEvaluator( + timetable=timetable, + all_sections=list(tg.sections_manager.keys()), + subject_teacher_mapping=tg.subject_teacher_mapping, + available_classrooms=list(tg.classrooms_manager.keys()), + available_labs=list(tg.lab_capacity_manager.keys()), + classroom_capacity=tg.classrooms_manager, + section_student_strength=tg.sections_manager, + subject_quota_data=tg.subject_quota_limits, + teacher_time_preferences=tg.teacher_availability_preferences, + teacher_daily_workload=tg.weekly_workload, + time_slots=self.config.time_slots, + ).evaluate_timetable_fitness() + + selected = TimeTableSelection().select_chromosomes(fitness[1]) + if self.config.prev_selected: + selected.update(self.config.prev_selected) + + crossover = TimeTableCrossOver() + crossover_chromosomes = [] + selected_keys = list(selected.keys()) + for i in range(0, len(selected_keys), 2): + if i + 1 < len(selected_keys): + c1, c2 = crossover.perform_crossover( + timetable[selected_keys[i]], timetable[selected_keys[i + 1]] + ) + crossover_chromosomes.extend([c1, c2]) + + mutated = [TimeTableMutation().mutate_schedule_for_week(ch) for ch in crossover_chromosomes] + if self.config.prev_mutated: + mutated.extend(self.config.prev_mutated) + + best_chromosome, best_score = None, -1 + for key, score in selected.items(): + score = int(score) + if score > best_score and key in timetable: + best_score = score + best_chromosome = timetable[key] + + if best_chromosome: + updated_teacher = update_teacher_availability_matrix(teacher_matrix, best_chromosome) + return best_chromosome, updated_teacher, selected, mutated + + def run(self): + initial_teacher = copy.deepcopy(self.teacher_availability) + updated_teacher = copy.deepcopy(initial_teacher) + best_chromosome = None + + self.config.prev_selected = None + self.config.prev_mutated = None + + for _ in range(self.config.total_generations): + teacher_copy = copy.deepcopy(initial_teacher) + best, updated_teacher, selected, mutated = self._generate_timetable(teacher_copy) + best_chromosome = best + + self.config.prev_selected = selected + self.config.prev_mutated = mutated + + updated_teacher = update_matrix_for_best( + best_chromosome, + updated_teacher, + self.config.day_map, + self.config.time_slot_map, + ) + + updated_lab = self._update_lab_availability(best_chromosome) + return best_chromosome, updated_teacher, updated_lab + + +def run_timetable_generation( + teacher_subject_mapping: dict, + total_sections: dict, + total_classrooms: dict, + total_labs: dict, + teacher_preferences: dict, + teacher_weekly_workload: dict, + special_subjects: dict, + labs: dict, + subject_quota_limits: dict, + teacher_duty_days: dict, + teacher_availability_matrix: dict, + lab_availability_matrix: dict, + total_generations: int, + time_slots: dict, + day_map: dict, + time_slot_map: dict, + fixed_teacher_assignment: dict = None ): - timetable_generator = TimeTableGeneration( + config = TimetableConfig( teacher_subject_mapping=teacher_subject_mapping, total_sections=total_sections, total_classrooms=total_classrooms, @@ -47,148 +174,63 @@ def timetable_generation( subject_quota_limits=subject_quota_limits, teacher_duty_days=teacher_duty_days, teacher_availability_matrix=teacher_availability_matrix, + lab_availability_matrix=lab_availability_matrix, + total_generations=total_generations, time_slots=time_slots, + day_map=day_map, + time_slot_map=time_slot_map, + fixed_teacher_assignment=fixed_teacher_assignment or {} ) - timetable, teacher_availability_matrix = timetable_generator.create_timetable( - Defaults.initial_no_of_chromosomes - ) + engine = TimetableEngine(config) + return engine.run() - fitness_calculator = TimetableFitnessEvaluator( - timetable, - timetable_generator.sections_manager.keys(), - SubjectTeacherMap.subject_teacher_map, - timetable_generator.classrooms_manager.keys(), - timetable_generator.lab_capacity_manager.keys(), - timetable_generator.classrooms_manager, - timetable_generator.sections_manager, - timetable_generator.subject_quota_limits, - timetable_generator.teacher_availability_preferences, - timetable_generator.weekly_workload, - time_slots, - ) - fitness_scores = fitness_calculator.evaluate_timetable_fitness() - - selection_object = TimeTableSelection() - selected_chromosomes = selection_object.select_chromosomes(fitness_scores[1]) - - if prev_selected_chromosomes: - selected_chromosomes.update(prev_selected_chromosomes) - - crossover_object = TimeTableCrossOver() - crossover_chromosomes = [] - selected_keys = list(selected_chromosomes.keys()) - - for i in range(0, len(selected_keys), 2): - if i + 1 < len(selected_keys): - parent1 = selected_keys[i] - parent2 = selected_keys[i + 1] - c1, c2 = crossover_object.perform_crossover( - timetable[parent1], timetable[parent2] - ) - crossover_chromosomes.append(c1) - crossover_chromosomes.append(c2) - - mutation_object = TimeTableMutation() - mutated_chromosomes = [ - mutation_object.mutate_schedule_for_week(ch) for ch in crossover_chromosomes - ] - if prev_mutated_chromosomes: - mutated_chromosomes.extend(prev_mutated_chromosomes) - - best_chromosome_score = -1 - best_chromosome = None - - for w_no, w_score in selected_chromosomes.items(): - score = int(w_score) - if score > best_chromosome_score and w_no in timetable: - best_chromosome_score = score - best_chromosome = timetable[w_no] - - if best_chromosome: - teacher_availability_matrix = update_teacher_availability_matrix( - teacher_availability_matrix, best_chromosome - ) - return ( - best_chromosome, - teacher_availability_matrix, - selected_chromosomes, - mutated_chromosomes, +if __name__ == "__main__": + from Constants.constant import Defaults + from Samples.samples import ( + SpecialSubjects, + SubjectTeacherMap, + SubjectWeeklyQuota, + TeacherWorkload, ) + lab_matrix = { + "L1": [[True] * 7 for _ in range(5)], + "L2": [[True] * 7 for _ in range(5)], + "L3": [[True] * 7 for _ in range(5)], + "L4": [[True] * 7 for _ in range(5)], + "L5": [[True] * 7 for _ in range(5)], + "L6": [[True] * 7 for _ in range(5)], + } -def run_timetable_generation( - teacher_subject_mapping, - total_sections, - total_classrooms, - total_labs, - teacher_preferences, - teacher_weekly_workload, - special_subjects, - labs, - subject_quota_limits, - teacher_duty_days, - teacher_availability_matrix, - total_generations, - time_slots, -): - prev_selected = None - prev_mutated = None - best_chromosome = None - - for _ in range(total_generations): - ( - best_chromosome, - teacher_availability_matrix, - selected, - mutated, - ) = timetable_generation( - teacher_subject_mapping=teacher_subject_mapping, - total_sections=total_sections, - total_classrooms=total_classrooms, - total_labs=total_labs, - teacher_preferences=teacher_preferences, - teacher_weekly_workload=teacher_weekly_workload, - special_subjects=special_subjects, - labs=labs, - subject_quota_limits=subject_quota_limits, - teacher_duty_days=teacher_duty_days, - teacher_availability_matrix=teacher_availability_matrix, - time_slots=time_slots, - prev_selected_chromosomes=prev_selected, - prev_mutated_chromosomes=prev_mutated, - ) - prev_selected = selected - prev_mutated = mutated - - return best_chromosome, teacher_availability_matrix - + teacher_availability = initialize_teacher_availability( + TeacherWorkload.Weekly_workLoad.keys(), 5, 7 + ) -if __name__ == "__main__": - best, correct_teacher_availability_matrix = run_timetable_generation( + best_tt, final_teacher, final_lab = run_timetable_generation( teacher_subject_mapping=SubjectTeacherMap.subject_teacher_map, - total_sections=RoomCapacity.section_strength, - total_classrooms=RoomCapacity.room_capacity, - total_labs=RoomCapacity.lab_capacity, + total_sections={"A": 70, "B": 100, "C": 75, "D": 100}, + total_classrooms={"R1": 200, "R2": 230, "R3": 240, "R4": 250, "R5": 250}, + total_labs={"L1": 70, "L2": 50, "L3": 70, "L4": 50, "L5": 70, "L6": 50}, teacher_preferences=TeacherWorkload.teacher_preferences, teacher_weekly_workload=TeacherWorkload.Weekly_workLoad, special_subjects=SpecialSubjects.special_subjects, labs=SpecialSubjects.Labs, subject_quota_limits=SubjectWeeklyQuota.subject_quota, teacher_duty_days=TeacherWorkload.teacher_duty_days, - teacher_availability_matrix=initialize_teacher_availability( - TeacherWorkload.Weekly_workLoad.keys(), 5, 7 - ), + teacher_availability_matrix=teacher_availability, + lab_availability_matrix=lab_matrix, total_generations=Defaults.total_no_of_generations, - time_slots=TimeSlots.time_slots, - ) - from icecream import ic - - ic(best) - correct_teacher_availability_matrix = update_matrix_for_best( - best, - correct_teacher_availability_matrix, - { + time_slots={ + 1: "9:00 - 9:55", + 2: "9:55 - 10:50", + 3: "11:10 - 12:05", + 4: "12:05 - 1:00", + 5: "1:20 - 2:15", + 6: "2:15 - 3:10", + 7: "3:30 - 4:25", + }, + day_map={ "Monday": 0, "Tuesday": 1, "Wednesday": 2, @@ -197,13 +239,20 @@ def run_timetable_generation( "Saturday": 5, "Sunday": 6, }, - { - "08:00 - 09:00": 1, - "09:00 - 10:00": 2, - "10:00 - 11:00": 3, - "11:00 - 12:00": 4, - "12:00 - 13:00": 5, - "13:50 - 14:50": 6, - "14:50 - 15:50": 7, + time_slot_map={ + "9:00 - 9:55": 1, + "9:55 - 10:50": 2, + "11:10 - 12:05": 3, + "12:05 - 1:00": 4, + "1:20 - 2:15": 5, + "2:15 - 3:10": 6, + "3:30 - 4:25": 7, }, + fixed_teacher_assignment={ + "A": {"TCS-531": "AB01", "TMA-502": "HP18"}, # section: {"subject": teacher} + "B": {"TCS-503": "BJ10"} + } ) + + # from icecream import ic + # ic(best_tt, final_teacher, final_lab)