Simsttab: A timetabling engine for schools
Simsttab stands for Simplistic School Time-Tabler. It is a
timetabling engine that can generate timetables satisfying
requirements typical for secondary schools in Austria
("Gymnasium"-type), Germany and maybe other European countries.
Source code: simsttab.pl
The code is also available from a public git repository:
Simsttab requires a Prolog system that supports CLP(ℤ) and library(reif).
Simsttab uses constraint logic programming
over integers to compute solutions.
Try the demo: https://www.metalevel.at/prolog/timetabling/
More about Prolog: The Power of Prolog
Prolog facts are
used to specify the requirements of the timetable.
An example based on sample requirements that ship with Tablix is
available as reqs.pl.
Depending on your Prolog system, you obtain a timetable
like timetable.txt within a
few seconds or minutes.
The input is a sequence of
Prolog facts that describe
what we want from a solution.
The dimensions of the timetable are specified by:
The main requirements are specified by:
Each week has W time slots.
Each day has D time slots.
Additional requirements are specified by:
- class_subject_teacher_times(C, S, P, T)
Class C must have subject S, taught
by person P, exactly T times
- class_freeslot(C, F)
No lesson must be scheduled at time F for
- coupling(C, S, L1, L2)
For class C, lessons L1
and L2 of subject S are to be
scheduled in direct succession.
- teacher_freeday(T, D)
teacher T, day D must be
- room_alloc(R, C, S, L)
is to be used for class C and
lesson L of subject S