Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.
/ timetable-generator Public archive

Ultimate flexible agile timetable generator

Notifications You must be signed in to change notification settings

x127f/timetable-generator

Repository files navigation

Resources (for a lecture):

  • Room
  • Teacher
  • Class
  • Student
  • Time
  • Subject

Room:

  • ID
  • Name/description
  • Room types (generic, laboratory, kitchen, office)
  • Room size/number of places
  • Room occupancy (["xx:xx - xx:xx"])

Time:

  • Additional time between the hours (switching room, break, ventilation, discussions)
  • Teachers/students need breaks when it is convenient (or at a fixed time)

Teacher:

  • Name
  • Type (teacher, professor, external employee)
  • Subjects
  • Availability

Students:

  • Name
  • classes/courses

Action/query:

  • Is the resource available? (Teacher, room, class) for a period
  • Set/give priority
  • Set hard/soft constraint

Example rules:

  • Teacher + class + student can only be in one room at the same time
  • Subject can only take place in a certain room
  • Subjects should be in a certain order during the week
  • Minimize time between the hours
  • Reduce walking time between different rooms/facilities

Algorithm

A metaheuristic evolutionary algorithm for creating timetables

Variables (G = Generations, P = Population, T = Stop Threshold, S = Selection percentage, M = Mutation probability)

  • Loads all resources
  • Loads all rules and sorts them by priority
  • Repeat until no improvement in performance is found after T runs or the user manually stops
    • Repeat G times:
      • Repeat P times:
        • Starts with a random table or takes the one of the previous run
        • Assigns performance 0 to this run
        • Execute every rule for every resource
          • If the rule is fulfilled, its priority is added to the performance
          • If the rule is violated, its priority is subtracted from the service
          • If the rule is violated and it is absolutely necessary, the service is set to 0 and this cycle is ended
    • Saves and sorts the results according to the performance of the runs
    • Selection (S percent of the best runs are selected)
    • Recombination (some entries are swapped for two of the selected runs)
    • Mutation (some entries are swapped with a probability of M)
    • Population (100% - S are also filled in randomly generated tables)

Schema:

[
	{
		"and": [
			{
				"or": [
					{
						"equals": "1==1"
					},
					{
						"equals": "1==0"
					}
				]
			},
			{
				"equals": "1==1"
			}
		]
	}
]
{
	"ressources": {
		"lehrer": {}
	}
}

About

Ultimate flexible agile timetable generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published