Skip to content

He-Is-HaZaRdOuS/go-schedule

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Course scheduling tool

License Go Report Card

Input

  • Courses: (Required) CSV data with following headers
Section;Course_Code;Course_Name;Number_of_Students;Course_Environment;T+U;AKTS;Class;Depertmant;Lecturer
  • Classroom: (Required) CSV data with following headers
floor_number;classroom_id;capacity;available_days
  • Busy: (Required) CSV data with following headers
Lecturer;Busy_Day
  • Conflict: (Required) CSV data with following headers
Department1;Course_Code1;Department2;Course_Code2
  • Mandatory: (Required) CSV data with following headers
Course_Code
  • Reserved: (Required) CSV data with following headers
Department;Course_Code;Day;Starting_Time
  • Split: (Required) CSV data with following headers
Department;Course_Code;Half_Duration
  • External: (Required) CSV data with following headers
Section;Course_Code;Course_Name;Number_of_Students;Course_Environment;T+U;AKTS;Class;Department;Lecturer;Starting_Time;Day

Output

  • Schedule: CSV data with following headers
course_code,day,time,duration,classrooms,class,department,course_name

Malleable Runtime Constraints

Assume we have two states, the soft iteration limit defined as iterSoftLimit and the upper iteration limit defined as iterUpperLimit.
stateCount = 2
iterSoftLimit = 2000
iterUpperLimit = iterSoftLimit + 4999

  • 0 - iterSoftLimit: Neighbouring compulsory courses conflict probabilistically (State:0) (Ideal case)
  • iterSoftLimit - iterUpperLimit: Neighbouring compulsory courses conflict (State:1) (Worst case)

Starting Slot of the week day is 9:30.

If a department has 11 or more 4th class elective courses active, then that department is marked as congested and some special treatments are applied...
If a course belongs to a congested department and is of 4th class, then that course is placed at 8:30.

If a course already exists in the morning hours, then we try to place the remaining courses in the afternoon...
If the course's duration is 3 hours, then it is placed at 14:30; Otherwise 13:30 and 15:30 if necessary.

Error Codes

  • Err00 - Failed to open file - File not found
  • Err01 - Failed to read from file
  • Err02 - Failed to open file - File not found - Could not create file
  • Err03 - Failed to write to file
  • Err04 - Invalid input String formatting error in Reserved data
  • Err05 - Invalid input data error in Reserved data
  • Err06 - Err04 or Err05 or both
  • Err07 - Invalid input String formatting error in T+U Course data
  • Err08 - Invalid iteration state - Malleable Constraints

Special Treatment

Make Activity Day Free Again!

We try to keep One day of the Week free of Compulsory courses whenever possible

  • State 0: Placement Probability starts from 10% and ends at 60% by the next state transition
  • State 1: Placement Probability is always 100% as State 1 is the Worst case

Daily Course Limit

We try to limit the number of courses existing in a day to distribute the load across the week

  • If congested and Compulsory, 4
  • If congested and Elective, 5
  • Otherwise 3

congested means that a department has 11 or more elective courses in its 4th year.

Additionally, we try to spread out the courses across the week evenly by having a soft AKTS limit for each day that is ignored when it is exceeded on all days of the week.

General Program Structure

Directory structure

Data classes are located under pkg/model/
Resource files are located under res/private/
I/O handlers are located under internal/csvio/
Scheduler related source files are located under internal/scheduler/
CLI Main executable is located under cmd/cli/
Server Main executable and realted handlers are located under cmd/server/

Program Pseudo-code

Step - 1: Read classrooms csv
Step - 2: Read courses csv and related restriction csv(s)
Step - 3: Repeat until valid schedule
   Step - 4: Initialize classrooms oriented schedule
   Step - 5: Assign stateful course properties and shuffle around courses vector
   Step - 6: Initialize empty weekly schedule
   Step - 7: Insert reserved courses
   Step - 8: Insert courses
   Step - 9: Check for schedule validity
   Step - 10: Break out if schedule is valid
   Step - 11: Update optimal schedule
Step - 11: Export schedule to disk

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.8%
  • Makefile 0.2%