The input is a sequence of
Prolog
facts that describe
what we want from a solution.
The
dimensions of the timetable are specified by:
- slots_per_week(W)
Each week has W time slots.
- slots_per_day(D)
Each day has D time slots.
The main
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
per week.
Additional requirements are specified by:
- class_freeslot(C, F)
No lesson must be scheduled at time F for
class C.
- 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)
For
teacher T, day D must be
kept free.
- room_alloc(R, C, S, L)
Room R
is to be used for class C and
lesson L of subject S