FET Manual

Version 0.7c
last modified 12.06.2009

FET written by Liviu Lalescu
http://www.lalescu.ro/liviu/

Manual written by Volker Dirr
http://www.timetabling.de/

FET Homepage
http://www.lalescu.ro/liviu/fet/

Table of contents

Table of contents

Preamble

FET is free software for automatically scheduling the timetable of a school, high-school or university. It uses a fast and efficient timetabling algorithm. It is free software, open source, licensed under GNU/GPL. Get the latest news and version from the official FET homepage (http://www.lalescu.ro/liviu/fet/).

This is a small manual with hopefully a lot of useful examples.

Important definitions are marked blue.

Useful hints are marked green.

Critical warnings are marked red.

Wise examples are marked yellow.

Liviu Lalescu (http://www.lalescu.ro/liviu/) started his project at the end of year 2002 as he was working on his diploma. He got his examination in computer programming (software specialization) in June 2003. FET had a very large palette of constraints, but sadly the evolutionary algorithm was only able to solve easy timetables. Even great efforts during the following years in research the genetic algorithm was never good enough to solve complex timetables. In summer 2007 the big breakthrough was done. A new heuristic algorithm (based on recursive swapping of activities) was able to solve difficult timetables in a few minutes.

Table of contents

Features

There are a lot of nice features. FET is able to automatically care about all groups (classes/courses/students), has a very large palette of constraints and of course nice styleable xhtml timetables.

  • Time constraints (misc)
    • Basic compulsory time constraints
    • Break (all teachers+all students not available)
  • Time constraints (teachers)
    • A teacher is not available
    • Max days per week for a teacher
    • Max gaps per week for a teacher
    • Max gaps per week for all teachers
    • Max gaps per day for a teacher
    • Max gaps per day for all teachers
    • Max hours daily for a teacher
    • Max hours daily for all teachers
    • Min hours daily for a teacher
    • Min hours daily for all teachers
    • Max hours continuously for a teacher
    • Max hours continuously for all teachers
    • A teacher works in an hourly interval max days per week
    • All teachers works in an hourly interval max days per week
  • Time constraints (students)
    • A students set is not available
    • Max gaps per week for a students set
    • Max gaps per week for all students
    • A students set begins early
    • All students begin early
    • Max hours daily for a students set
    • Max hours daily for all students
    • Min hours daily for a students set
    • Min hours daily for all students
    • Max hours continuously for a students set
    • Max hours continuously for all students
  • Time constraints (activities)
    • An activity has a preferred starting time
    • An activity has a set of preferred time slots
    • A set of activities has a set of preferred time slots
    • A set of subactivities has a set of preferred time slots
    • An activity has a set of preferred starting times
    • A set of activities has a set of preferred starting times
    • A set of subactivities has a set of preferred starting times
    • Min n days between a set of activities
    • An activity ends students day
    • A set of activities ends students day
    • A set of activities has same starting time (day+hour)
    • A set of activities has same starting day (any hours)
    • A set of activities has same starting hour (any days)
    • 2 activities are ordered
    • 2 activities are consecutive
    • A set of activities are not overlapping
    • Min gaps (hours) between a set of activities
  • Space constraints (misc)
    • Basic compulsory space constraints
  • Space constraints (rooms)
    • A room is not available
  • Space constraints (teachers)
    • A teacher has a home room
    • A teacher has a set of home rooms
    • Max building changes per day for a teacher
    • Max building changes per day for all teachers
    • Max building changes per week for a teacher
    • Max building changes per week for all teachers
    • Min gaps between building changes for a teacher
    • Min gaps between building changes for all teachers
  • Space constraints (students)
    • A set of students has a home room
    • A set of students has a set of home rooms
    • Max building changes per day for a set of students
    • Max building changes per day for all students
    • Max building changes per week for a set of students
    • Max building changes per week for all students
    • Min gaps between building changes for a set of students
    • Min gaps between building changes for all students
  • Space constraints (subjects)
    • A subject has a preferred room
    • A subject has a set of preferred rooms
  • Space constraints (subjects and activity tags)
    • A subject + an activity tag have a preferred room
    • A subject + an activity tag have a set of preferred rooms
  • Space constraints (activities)
    • An activity has a preferred room
    • An activity has a set of preferred rooms
Table of contents

Installing FET

TODO: requirements TODO: same like readme. (really write it twice? Maybe short the readme and write long version here?) TODO: command line using FET

Table of contents

Using FET

Even FET is a tidy Qt-application, you should read this manual carefully, because it includes many hints and warnings how to use it correct.

Table of contents

File

Of course it's possible to open and save a file.

FET doesn't have a option to print in this menu. The timetables will be written into the results directory after a timetable is generated. Please read chapter Print timetables if you want to know how to print a timetable.

Save your dataset regularly. Especially if you add or modify constraints. FET doesn't have a undo option right now. Sometimes it's very difficult to undo the last modification. Also if FET didn't find a solution after several hours you maybe want to undo but already forgot last changes.

The saved dataset contain only the Basic settings, Activities and Constraints. It doesn't include the generated timetable solution.
You need to do TimetableSave data+timetable as ... if you want to save the generated timetable. The generated timetable is also saved by default into the results directory if you use TimetableGenerate multible variants.

Table of contents

Data

The data contain the Basic settings, Activities and Constraints. It doesn't include the generated timetable solution.

Table of contents

Basic setting

Table of contents

Institution name & comments

Institution name and comments are optional data.
The institution name will be printed as caption to all small timetables (but you can still style and hide it easily later).
Comments will be printed at the beginning of the timetables (before table of content).

Use the comment to write about problems, latest added constraint, missing constraint or constraints that should be modified. Don't forget to update regularly the comments. An old comment is as bad as a missing or wrong comment.

Table of contents

Days per week & Periods per day

Most schools just need days from Monday to Friday.

This terms are printed into the timetable head. Use short cuts to get smaller tables. (MON instead of Monday, TUE ...).

Example 1Example 2Example 3Example 4Example 5
1st Period
2nd Period
3th Period
4th Period
5th Period
6th Period
Period 1
Period 2
Period 3
Period 4
Period 5
Period 6
1
2
3
4
5
6
08.05 – 08.50
08.50 – 09.35
10.00 – 10.45
10.50 – 11.35
11.50 – 12.35
12.35 – 13.20
08.05
08.50
10.00
10.50
11.50
12.35

A Period is a distance in time.

The periods are printed into the timetable. So use short cuts to get smaller timetables. You can use any phrase as period name.

You have to care about that every period has the same distance (is as long as every other period), because FET take always duration 1 per period.

(Except if you add a period that always get special activities or a break. In example 4 a period 09.35-10.00 can be added and this period always get the constraint break. But that is only a cosmetic intrusion.)

So by this example an activity with duration 1 take 45 minutes and an activity with duration 2 take 90 minutes.

Activities can not get non-integer duration like 1.5.

Your institution has activities with 90 minutes duration on Monday, Wednesday and Friday but only 60 minutes duration on Tuesday and Thursday.
Make periods that take 30 minutes. So activities that take 60 minutes must get duration 2 and activities that take 90 minutes must get duration 3.

If FET cannot find a solution you should think about increasing the number of periods or the number of days. If FET is able to solve your dataset easily and you don't know other constraints to add you should maybe think about decreasing number of periods or number of days. But you should rethink about all constraints again! (Especially Not available teachers, students or rooms constraints.)

Table of contents

*Teachers, subjects, activity tags & rooms

Add teachers, subject, activity tags, rooms and buildings.

Also these names are printed into the timetable. So use short cuts to get smaller timetables.

An activity tag is an optional information to an activity.

Activity tags are for example lecture (reading), exercise or laboratory.

If activities with duration 2 must start in odd periods (1st, 3th, 5th, ...) the activity tag might be odd.
If some activities must (or should) be instructed only in the morning the activity tag might be morning.

Before using activity tags please read whole chapter Constraints and very carefully section preferred time(s).

Think twice before using activity tags. I recommend to use activity tags only to set constraints. First of all try to set constraints without a activity tags, because it will be easier.

You don't need to add home rooms. Normally every group (class or teacher) has it's own home room. There will never be a room conflict if every group has it's own room. Add only rooms that could have a conflict (arts room, gym, science lab, ...) or if you have more groups than rooms.

Every room has capacity 1. So only one activity can be placed per room. If you have a huge gym (that maybe can be separated into 3 parts by curtains), then enter 3 rooms for the gym.

You don't need to add buildings. Add only buildings if you want to use a buildings constraint (like Max building changes per day or Min gaps between building changes.)

If you need to add different buildings you also need to care about global clear room names. If you have room name 123 in building A, then you can't name a room 123 in building B too. So i recommend to include the building name into the room name. For example room 123 in building A should get the name A-123.

Table of contents

Years, groups and subgroups

It's very important to understand the difference between years, groups, subgroups, classes, courses, divisions and categories. But it's not very easy. Please read definitions and all examples.

Year (form): A set of students at the same stage of their schooling. For example a German primary school has years 1 to 4. A year contain (in most cases) several groups (classes).

Group, Class, course and division: A set of students who visit the same activities. So they meet the same teachers to study the same subjects at the same time.

Category: A set of groups that might have activities simultaneously.

Class (division of the first category): A set of students who meet (nearly always) the same activities.
FET avoid using the term class, because this term is used different in colloquial language. Depending on the context a students say that he visit class A or class 1 or class 1A. In this example FET will call 1 as year, A as division of a category and 1A as group.
Example 1: Primary School
A German primary school has 4 years. But there are different number of groups (classes) (depending on the number of students per year). For example Group 1A, 1B, 1C, 2A, 2B, 2C, 3A, 3B, 4A, 4B.
To enter the first year of this example add year 1. Then divide year automatically by selecting categories. Increase number of divisions up to 3 and call them A, B and C in the first category. Now check the groups to see what happen. To avoid space between year and category name just remove the space of the separator character(s) in the divide year automatically by selecting categories.
coursesubject (duration)
Biology
Chemistry
Physics
Biology (4), chemistry (1), physics (2)
Biology (1), chemistry (4), physics (2)
Biology (2), chemistry (1), physics (4)

Course (division of the second category): A set of students who meet (sometimes) the same activities.

Example 2: Secondary School
A German secondary school has years from 5 to 10. In every year are again several classes (groups). But the students can now choose a course (group category 2). So this students visit several same activities (but the number of activities is normally lower then the number of activities of a class)
splitting a year To enter this example add year 10. Then divide year automatically by selecting categories. Increase number of divisions up to 4 and call them A, B, C and D in the first category. Increase the Number of categories up to 2 and the number of division of this category up to 3. Call them Biology, Chemistry and Physics. Now check the subgroups to see what happen. The most important is to see that you get the groups 10A, 10B, 10C, 10D, 10Biology, 10Chemestry and 10Physics by this. (So in this example the first 4 groups are classes and the last 3 are courses. To FET they are just groups. It doesn't know the duration of the groups (at this moment).

Be careful if you have a (nearly) 100% filled timetable. These activities are necessarily scheduled simultaneously if pupils of these activities have no unused period in their timetable. So if you do the activity planing you have to be sure that the timetable is solvable. In this example the duration of a course is 4+1+2=7. So it's impossible that all physics activities are instructed by the same teacher because physics has total duration 2+2+4=8. But if physics in the physics course is instructed by a different teacher then in the other courses, then this courses are possible.

It doesn't matter in this example if the physics course get only biology duration 1. FET is able to care about that, even the duration is different between the courses.

Your can add a second set of courses by using category 3.

You can add a third set of courses by manually doing the same like divide year automatically by selecting categories, but it's a little bit tricky. In some cases you don't need to add a new category (read next hint).

coursesubject (duration)
christian religion
jewish religion
muslim religion
philosophy
christian religion (2)
jewish religion (2)
muslim religion (2)
philosophy (2)
The students have different religions in the same classes. So they have religion in courses.
If there is only one subject, then it the easiest (and if pupils have no unused period in their table it is the only possible solution) to scheduled all at the same time. There are several possibilities to do it (compare Add an activity and constraint A set of activities has same starting time (day+hour)). In most cases you just add the subject religion. It's clear if the religion is christian, jewish, muslim or philosophy, because you can see this by the teachers name.

Think about needed categories first. The first category should always be the class. The second and third category should be the categories with the longest total duration. Other categories must be done manually or by the hint simultaneous activities.

Maybe you know that (by accident) no students is in Group 10A and 10Bio at the same time. You can delete the corresponding subgroups. You maybe get better timetables by this. But you need to do it only if pupils have unused periods in their timetable. Be careful! This also mean you (maybe) cannot put a students with group 10Bio into 10A later. You maybe get new students (because parents moved house). So I highly don't recommend this!

Example 3: High School
TODO
TODO
Example 4: University
TODO
TODO

Table of contents

Activities

An activity contain normally a subject, a student set, a teacher and a duration.
It can also contain activity tags, more student sets or more teachers. It can be splitted into several (sub)-activities. Also pseudo activities are possible. (They don't have any teacher or student)

Table of contents

Prearrangement

Before adding activities you need to do a planning. Currently FET doesn't help you with this. So you already need to think about all activities (teachers, students and rooms):
Think about students: Has every student the correct number of activities, subjects and duration?
Think about teachers: Has every teacher the correct number of activities, subject, duration and students? (Is the teacher allowed to teach that subject and/or year?)
Think about activities: Is it possible that activities of courses are simultaneously? (Think about teachers and rooms!) Is it possible also with activities that should be simultanous because of other reasons?
Think about rooms: If you will use room constraints than care in your lesson planning about as less room chanhes as possible, because it will be easier to generate a timetable.
Also think about unwritten rules like this:
- Give a teacher as many activities with the same group as possible, because generating the timetable will be easier and also most teacher will like that (because they can swap activities without any problem themselves, they don't need to learn new names, ...).
- Maybe give a teacher as many activities in the same year (because he can compare students better; he don't need to prepare so much different hours and so he can spend more time on prepare his lessons; he can maybe save some meetings; ...) But be carefull sometimes this is a bad rule. For example maybe in the last year must be done final examination in a short time. So maybe the teacher has no time to do all that test in such a short time.
- Students keep a teacher 2 (or 3 years). Example: A class get in year 5 and 6 the same math teacher, but that class get an other math teacher in year 7 and 8 and so one.

Table of contents

Add an activity

Add an activity To add an activity you just need to add (double click with the mouse, or select and press enter) students, subject and teachers. Normally an activity contain 1 teacher, 1 group and 1 subject. You should always enter the number of hours that this activity is instructed. The Min n days between a set of activities constraint is one of the most important constraints. So this constraint is added by default if you add more then one (sub-)activity.

Subject geography is only instructed 1 period per week.
Add the teacher, the group, the subject and press add current activity.

Subject art is instructed 2 periods per week. Both periods must be consecutive.
Add the teacher, the group, the subject, increase duration up to 2 and add the activity.

Subject English is instructed 4 periods per week. But of course this periods should not be consecutive. All 4 periods must be at different days.
Add the teacher, the group, the subject, split this activity into 4 activities per week, modify weight up to 100 and add the activities.

Subject physics is instructed 2 periods per week. It doesn't matter if both periods are on the same day or not.
Add the teacher, the group, the subject, split this activity into 2 sub activities per week, maybe modify weight under 100% and add the activities.

Subject sport is instructed 3 periods per week. One (sub)-activity should have duration 2 and the other (sub)-activity must have duration 1 at an other day.
Add the teacher, the group, the subject, split this activity into 2 activities per week, increase duration of the first sub activity up to 2, modify weight up to 100 and add the activities.

Subject native language is instructed 4 periods per week. The periods should be at different days, but they most not be at different day. If they are at the same day they must be consecutive.
Add the teacher, the group, the subject, split this activity into 4 activities per week, keep weight 95% (or modify like you want), check the force consecutive box and add the activities.

Subject foreign language is instructed 4 periods per week. The periods should be at different days, but they most not be at different day.
Add the teacher, the group, the subject, split this activity into 4 activities per week, keep weight 95% (or modify like you want) and don't check the force consecutive box.

Subject mathematics is instructed 4 periods per week. The periods should be at different days, but they most not be at different day. But they are not allowed to be consecutive if they are scheduled at the same day.
Add the teacher, the group, the subject, split this activity into 4 activities per week, keep weight 95% (or modify like you want) and don't check the force consecutive box. Then you must add a new constraint ***.

Subject religion is instructed 2 periods per week. It should be instructed on different days. Maybe religion is a course of the 4th category (compare section Years, groups and subgroups) and you don't want to add that category manually, or you was to lazy to add an other category or pupils have no unused period in their timetable, so it's clear that these activities must be simultaneously.
If you don't have room problems you can add all religion teachers, the year (you can also add all groups, but that will flood the printed timetable with too much information) and the subject. Split this activity into 2 sub activities per week, keep weight 95% (or modify like you want) and add the activity.
If you have room problems, then you have possible several variants, that doesn't differ in the timetable solution. They just differ in the visual printed timetable.
Variant 1: The sweetest timetables are printed if you add a new category. And add activities like always.
Variant 2: Add "all" activities just as one activity (like without room problems), add as many pseudo activities (without a teacher and room) as rooms are needed and add constraint Same starting time to these activities.
Variant 3: Add several activities. Each activity contain a teacher and one group. Add constraint Same starting time to these activities. If you have more teachers then groups, then one or more teachers don't have a group in their activity. If you have more groups then teachers, then one or more groups don't have a teacher in their group.

Please read section Weights of constraints and Min n days between a set of activities.

It's allowed to add pseudo activities. Pseudo activities doesn't include a students set or a teachers set. Sounds stupid, but they are useful to care about some constraints. Compare sections Not available teachers, students or rooms & breaks, Gaps, Preferred time(s) and Preferred room(s).

Check the statistics after all activities are added.

Table of contents

Add a fortnightly activity

There are two big possibilities to add activities that take place once every two weeks. The recommended one is to use one of the following workarounds. The other one is to do it on a very exact way.
The advantage of the workarounds is a very simple input of the activities. The disadvantage is that you might not get the best timetable and it's not easy to differ fortnightly activities from regular activities in the printed timetable.

Using a workaround

All workarounds based on a simple idea: Just add a fortnightly activity as a regular activity and call the students and teachers that this activity is only instructed every second week.

If students are not allowed to have gaps, then fortnightly activities should get constraint activity ends day or constraint preferred time(s) with first periods as preferd times. If students also need constraint students early, then you should only use constraint activity ends day.

Be careful if you have room problems. In many cases Home room(s) will not care about fortnightly activities. You need to use a Preferred room(s) constraint.

A teacher instruct an activity to group 1A in odd calender week and to group 1B in even calender week.
Variant 1: Add only one activity for this. Just add both groups into one activity. This imply, that "both" activities are scheduled at the same period.
Variant 2: Add two different activities for this. This imply, that both activities are scheduled at different periods. So this is not recommended if you room problems, because a room will be always occupied, even it is not used.

A students set is instructed by different teachers in different calender weeks.
Variant 1: Add only one activity for this. Just add both teachers into one activity. This imply, that "both" activities are scheduled at the same period.
Variant 2: Add two different activities for this. This imply, that both activities are scheduled at different periods. So this is not recommended if you room problems, because a room will be always occupied, even it is not used.

You have two fortnightly activities with different teachers and students.
Variant 1: Add two different activities for this. This will effect the best timetable if you have no room problems.
Variant 2: Add only one activity for this. Just add all teachers and students into one activity. This imply, that "both" activities are scheduled at the same period.

A teacher T1 instruct group G1 and a teacher T2 instruct group G2. In the following week the teachers change the groups. So T1 instruct G2 and T2 instruct G1.
Variant 1: Add just one activity with all teachers and students. This imply, that "all four" activities are scheduled at the same period. But consider that only one room is reserved. So just use this if you have no room problems.
The next two variants should be used if you have room problems. They doesn't differ in the timetable solution. They just differ in the visual printed timetable.
Variant 2: Add two activities and add constraint Same starting time to these activities. Variant 3: Add "both" activities just as one activity (like variant 1), add a pseudo activity (with no teacher and no room) and add constraint Same starting time to these activities.
Variant 3: Add four different activities for this. This will effect that four different periods are needed! So in many cases this is not recommended. Especially if you have room problems.
The exact way
The exact way can maybe find a better solution, but is not recommended, because it's much more work. So entering the dataset and generating a timetable need much more time (at least 2 times).
You need to enter 2 weeks in the basic settings. Enter all activities 2 times. One time with activity tag "odd weeks" and the other time with activity tag "even weeks". The forthrightly activities are just entered one time. Set a constraint preferd time to activities with activity tag "odd week" to periods of the "odd week". Do the same with "even weeks". Be careful many constraints must be added two times!

Table of contents

Add a team teaching activity

Team teaching mean two or more teachers instruct one group in the same period.

Be careful if you have room problems. In many cases Home room(s) will not care about team teaching activities. You need to use a Preferred room(s) constraint.

An activity should have 2 or more teachers for team teaching.
Just add a activity with all needed teachers, the group and subject.

An activity is splitted into 4 activities per week. Only one of these activities should be instructed by two (or more) teachers.
There are two variants that differ only in the visual output.
Variant 1: Add an activity with the group, one teacher and split it into 4 activities. Keep the id of one out of the splitted activities in mind. Add an other activity with no group and the other teacher. Use constraint Same starting time for the other and the memorised activity.
Variant 2: Add an activity with the group, one teacher and split it into 3 activities. Add a second activity with the group and both teacher. Add this activity to the already existing Min n days between a set of activities constraint.

Table of contents

Constraints

Table of contents

Weights of constraints

weightaverage no.
of retries
50%
75%
80%
90%
95%
99%
99.5%
99.75%
99.80%
99.90%
99.99%
100.00%
2
4
5
10
20
100
200
400
500
1000
10000
unlimited

Every constraint has a weight. A weight of 100% mean that this constraint must be respected. A lower value mean it should be respected, it's not necessary. It's pretty difficult to explain the exact function, but a simple illustration is the following: 50% weight mean that in average FET retries two times to place an activity without a conflict. If FET isn't able to place the activity without a conflict after average 2 times it keeps the conflict and tries to place the next activity.
This is not an exact explanation of the algorithm, because the activities might get unallocated or cycle reopened.

Always save the datafile under a different name (just number them) after adding or modifying a constraint.

Check if your timetable is (still) solvable before adding new constraints. It might be impossible to solve the timetable.

Every constraint slows down finding a solution.
So just add needed constraint. For example if teachers/pupils have (nearly) no unused period in their timetable you (maybe) don't need to add constraints like min or max periods per day.

How to do a good and correct weight?
In my opinion nearly all constraints should have weight 100%. Especially constraints that have an other maximum value (like max days/periods/gaps). The Min n days between a set of activities constraint is a little bit tricky. It should be always 100%, only course activities in 100% filled timetables should have sometimes lower values. Read section Years, groups and subgroups and Min n days between a set of activities to understand why.
So of course it's a nice idea to write down a list of all needed constraints and order them by importance. But I do not recommend to set weight to 100% to the most important constraint, maybe 99% to the second important constraint and so on until the last one.
I recommend to add all constraints step by step with weight 100% (except a few Min n days between a set of activities constraints). If you add a constraint with an other value (like max days/periods/gaps) then also use weight 100%, but use a high value. After all constraints are added and if FET is still able to find a solution, begin decreasing the max days/periods/gaps values.

Table of contents

Basic compulsory time and room constraints

The basic constraints are:
Time constraints (misc)Basic compulsory time constraints
Space constraints (misc)Basic compulsory space constraints

This basic constrains must have weight 100% and must always be included in the dataset.

The basic time constraints care about that a teacher never has to instruct two or more activities at the same time. Also students must have maximum one activity per period.

The basic rooms constraints care about that a room will never have included 2 or more activities.

Table of contents

Not available teachers, students or rooms & breaks

The not available and break constraints are:
Time constraints (teachers)A teacher is not available
Time constraints (students)A students set is not available
Space constraints (rooms)A room is not available
Time constraints (misc)Break (all teachers+all students not available)

It might happen that teachers, students or rooms are not available.

This constraints must have weight 100%.

If a teacher or student has constraint Not available, then this "free" period might be a gap. So think twice if you also use constraints that count gaps. Instead of using constraint Not available to a teacher or student you can also add a pseudo activity and use constraint An activity has a preferred starting time. A pseudo activity will not counted as gap.

A teacher is teaching at an other school on Wednesday and Thursday.
Add constraint A teacher is not available.
You can also use a pseudo activity with constraint An activity has a preferred starting time (compare next example).

A students set has industrial placement at an other institution on Monday period 1 and 2.
Variant 1: Add constraint A students set is not available. In the students timetable is only --- displayed.
Variant 2: Add an activity with subject industrial placement, no teacher, duration 2 and the corresponding students set. Add a constraint An activity has a preferred starting time for this activity on Monday 1st period. Now the students timetable looks sweeter, but be careful that all other constraints still can be respected.

The gym is shared with an other school.
Talk with the timetable maker of the other school and come to an arrangement who can use the gym at which period. Add constraint(s) A room is not available.

Constraint break is a easy way to say that all teachers and students are not available.

The activities of a full-time school (all-day school) are in the morning and in the evening. But they must not be at Friday evening.
Add constraint Break (all teachers+all students not available) to define Friday evening periods as break.

Students and teachers always have lunch at period 7.
Add constraint Break (all teachers+all students not available) at every day period 7. But this is only a cosmetic use. Maybe it's better to just not enter period 7 in the data periods per day.

Students and teachers have lunch at period 7 or 8.
Add a activity to every group of the first category with subject lunch, no teacher, duration 1, split this activity into as many activities as the students are working per week and increase weight of constraint Min n days between a set of activities up to 100%. Do it similar to every teacher. Be careful, because a teacher maybe work less days. Add constraint An activity has a set of preferred times and set period 7 and 8 are preferd at every day with weight 100%. Be careful if you use constraint Min hours daily, because activity lunch is a "normal" activity to FET.

Table of contents

Min n days between a set of activities

This constraint is:
Time constraints (activities)Min n days between a set of activities

Read also section Add an activity.

A set of activities should be instructed on different days, but they must not instructed on different days.
Add constraint Min n days between a set of activities with weight under 100%.(This is done automatically if you add an activity). So in favoured case all activities are instructed at different days. In worst case all constraints are instructed at only one day.

A set of activities should be instructed on different days, but they must not instructed on different days. But if they are instructed, then they must be instructed consecutive.
Add constraint Min n days between a set of activities (This is done automatically if you add an activity) and check the force consecutive box. So in favoured case all activities are instructed at different days. Maximum 2 activities can be set consecutive at a single day by this constraint. So it is not possible that 3 splitted activities are instructed at only one day. In worst case you have 2 splitted activities consecutive at 2 different days.

coursesubject (duration)
nature science
industrial art
foreign language
biology (2), chemistry (2), physics (2)
industrial art (6)
French (4), Latin (2)
Be careful if pupils have (nearly) no unused period in their timetable. Timetables might became impossible to solve, because in 100% filled timetables activities of the same courses (category) are scheduled simultaneously.
If the biology teacher want get only 1 activity with duration 2, then the chemistry and physics teacher must both also get only 1 activity with duration 2 or both must get 2 activities with duration 1.
If the industrial art teacher want to have 3 activities with duration 2, but the French teacher want to have 4 activities with duration 1, then the timetable is impossible to solve.
Both teachers have good reasons why they need duration 1 or 2 consecutive. French is a intellectual subject and 4 activities with duration 1 at different days will have a much better learning progress. Industrial art is a technical subject and it is better to work at a project without many interrupts.
So think about conflicts like this as early as possible. Talk to the teachers, explain the problem and find an agreement. A maybe solution is this: The French teacher get 4 activities with duration 1 and 100% weight of constraint Min n days. This mean the the industrial art teacher "only" get a activity that is splited into 4 parts (two with duration 2 and two with duration 1). In the strict sense this activity doesn't need a constraint Min n days between, because the Min n days constraint of the French activity already care about that. FET also care about that Latin is directly instructed before or after French, because industrial art need duration 2. - Also have a look at the nature science now. This also mean it is impossible that all subjects have only 1 activity with duration 2. If physics and Latin is instructed by the same teacher then physics can never have 2 periods consecutive. If physics and French is instructed by the same teacher, then no nature science can have 2 periods consecutive.

If you do your cover planing you must also carefully think about constraint Min n days between a set of activities (Normally not in the classes (category 1), but in the courses (category 2 and above)).

Table of contents

max & min periods per day

The max & min periods per day constraints are:
Time constraints (teachers)Max hours daily for a teacher
Time constraints (teachers)Max hours daily for all teachers
Time constraints (teachers)Min hours daily for a teacher
Time constraints (teachers)Min hours daily for all teachers
Time constraints (students)Max hours daily for a students set
Time constraints (students)Max hours daily for all students
Time constraints (students)Min hours daily for a students set
Time constraints (students)Min hours daily for all students

Constraints max and min periods per day for students are useful if you want a balanced day.

Groupactivities
per week
1A, 1B
2A, 2B
3A, 3B
4A, 4B
20, 19
21, 20
25, 24
30, 29
Your timetable has 5 days per week and 6 hours per day, so there are overall 30 periods per week. The students have different number of activities (periods) per week.
So without any constraint it might happen that group 1B have 6 periods on Monday to Wednesday, 1 period on Thursday and no period on Friday.
Students in year 1 and 2 can't concentrate very long, so it useful to limit max hours daily. Add constraint Max hours daily for a students set with maximum 4 periods and 100% to year 1. You can't add this constraints to the other years, because the timetable will not solvable if you add. (You can maybe add it to the other years with a different weight.)
Add constraint Max hours daily for a students set with maximum 5 periods and 100% to year 2. You can't add this constraints to years 3 and 4.
You don't need to add constraint Max hours daily for all students with maximum 6 periods and 100% to year 3 and 4, because your timetable have only 6 periods per day.
You don't need to add constraint Min hours daily for a students set to group 4A and 4B, because it doesn't make sense.
You can add constraint Min hours daily for a students set with minimum 5 periods periods to group 3A, but maybe this is to difficult. You can't add this constraint to group 3B. So I recommend to add a minimum of 4 periods per day to year 3.
It's maybe useful if year 2 get minimum 4 periods per week.
You can add constraint Min hours daily for a students set with minimum 4 periods periods to group 1A, but maybe this is to difficult. You can't add this constraint to group 1B. So I recommend to add a minimum of 3 periods per day to year 1.

Instead of using max periods per day you can use preferred time(s). It's not the same (it's only the same if you also use constraint no gaps and students early), but very similar, faster and (maybe) a little bit more powerful.

You can do it similar to teachers, but think always twice. In my opinion the max periods per day constraint is only useful if your institutions has many periods per day.

The min periods daily constraint for a teacher is (in my opinion) not always useful. Before using this constraints you should do this: Use constraint max periods per day to get a more balanced timetable. Think about using constraint max days per week for every single teacher. It's maybe much better, because it has a rough effect and the teacher don't need to drive to the institution.

In many schools it is not allowed that activities are omitted. If impeded teachers must be represented by other teachers you might get big trouble if you add to many min periods daily constraint for teachers, because there might be not enough teachers to cover activities. Please read chapter Teachers' Free Periods.

Be careful with Min hours daily for all teachers constraints. The timetable is not solveable, if you set this constraint with value 2 but at the same time you have a teacher that only teachs 1 period in the whole week.
Variant 1: You need to add constraints Min hours daily for a teacher to all other instead of constraint Min hours daily for all teachers.
Variant 2: Add a pseudo activity to the problematic teacher (An activity with the teacher name, but without a students). Be carefull if you have teacher home room constraints.
Table of contents

max days per week

The max days per week constraints is:
Time constraints (teachers)Max days per week for a teacher

Of course if the contract of employment guarantee a max number of days per week, then this is an important constraint.

A timetable is not solvable if you add constraint max days per week with only 3 days and weight 100% if the same teacher instruct a set of 4 or more activities that have constraint Min n days between a set of activities with weight 100%. Be careful! Most activities have this constraint (compare Add an activity).

I recommend to check this constraint again after all other constraint are added, most of them already have weight 100% and FET is still able to find a solution.

Most teacher like a free day. Check the teacher statistics. Check if a teacher is able to (maybe) get free day. So the number of periods per day of the teacher must be lower or equal then the number of periods per week of the timetable minus the number of periods per day. Also check if a lower number of working days doesn't controvert to a constraint (especially a constraint Min n days between a set of activities). Add constraint Max days per week for a teacher with weight 100% if nothing argue against it. Don't add to many constraint at one time. Maybe begin with the teacher that instruct the lowest number of periods per week. Check if the timetable is still solvable. Add the next teacher if it is still solvable. Remove the constraint if the timetable is not solvable and try to add the following teacher.

In many schools it is not allowed that activities are omitted. If impeded teachers must be represented by other teachers you might get big trouble if you add to many free days, because there might be not enough teachers to cover activities. Please read chapter Teachers' Free Periods.

If you need constraint like max days per week for students set just add an activity with the students set, subject “free”, no teacher and the number of periods per day of your timetable as duration.

If you need constraint like max days per week for students set you can think about effecting similar with constraint Min hours daily for a students set.

If you need constraint like max days per week for all teachers you can think about effecting similar with constraint Min hours daily for all teachers.

Table of contents

Gaps

The max gaps constraints are:
Time constraints (teachers)Max gaps per week for a teacher
Time constraints (teachers)Max gaps per week for all teachers
Time constraints (teachers)Max gaps per day for a teacher
Time constraints (teachers)Max gaps per day for all teachers
Time constraints (students)Max gaps per week for a students set
Time constraints (students)Max gaps per week for all students

A gap is an unused timeslot (or several) between two activities, between an activity & a break or between two breaks.
That mean for example unused timeslots in the first and last period are no gaps; a break is not a gap.

The law of many countries rule that students of primary and secondary schools don't have a gap.
Add constraint Max gaps per week for all students with value 0 and weight 100%.

The upper years are allowed to have gaps, but not the lower years.
Add constraint Max gaps per week for a students set with value 0 and weight 100% to the lower years.

A upper years are allowed to have maximum one gap per week.
Add constraint Max gaps per week for a students set with value 1 and weight 100% to the upper years.

Also the teacher like as less gaps as possible.
The easiest way to do it is to use constraint Max gaps per week for all teachers.

Use weight 100% and start with a high Max gaps per week for all teachers value. Try to solve the timetable and decrease the value step by step.

In many schools it is not allowed that activities are omitted. If impeded teachers must be represented by other teachers you might get big trouble if you add to "good" gap constraints, because there might be not enough teachers to cover activities. Please read chapter Teachers' Free Periods.

It sound fair if you use Max gaps per week for all teachers instead of different values to every single teacher by constraint Max gaps per week for a teacher. But you might think over hasted. For example the chef and it's deputy always have much paperwork in the office. So they don't have really gaps, they can expedient use this "gaps". Also trainee teachers don't have really gaps, because they also have to observe activities from other teachers. The timetable might be solvable if a few teachers have a higher max gaps per week value.

Maybe FET can solve the timetable if all teachers have maximum 2 gaps per week, but it can't solve the timetable if all teachers have maximum 1 gap per week. Maybe it's fair if all teachers that have free days get a constraint max gaps 2 and all teachers that are working every day get the constraint max gap 1.

Don't forget a teacher if you use constraint Max gaps per week for a teacher instead of Max gaps per week for all teachers.

Most teacher should have max gap 3 and only a few one should have 2 (or a lower value).
Add constraint Max gaps per week for all teachers with value 3 and weight 100%. Add constraint Max gaps per week for a teacher with value 2 (or lower) and weight 100% to every teacher that should have the lower value.

Most teacher should have max gap 2 and only a few one should have 3 (or a higher value).
You cannot do it like in the previous example, because always the lowest value has highest priority. Add constraint Max gaps per week for all teachers. Add a activities with subject gap (or the reason) and duration 1 to every single teacher that should have more gaps. Be carefull if you have teacher home room constraints.

You added constraint max 2 gap per week for all teachers. But some teachers have both gaps consecutive at a single day and you don't like that.
Add constraint Max 1 gap per day for all teachers at the same time.

I need a contraint like min gaps per week.
There is no min n gaps per week constraint. But there are 2 constraints that nearly do the same..
Variant 1: Use constraint Max hours continuously.
Variant 2: Please read previous examples again. In short: Add pseudo activities and maybe also use constraint preferred times.

Table of contents

Max hours continuously

The max hours continuously constraints are:
Time constraints (teachers)Max hours continuously for a teacher
Time constraints (teachers)Max hours continuously all teachers
Time constraints (students)Max hours continuously a students set
Time constraints (students)Max hours continuously for all students

This constraints can be used to affect the minimum number of gaps per day. If someone get a constraint Max hours continuously with value 4, then it mean he will never teacher more then 3 hours continuously. So if he work 4 hours per day, then he will get at least 1 gap. If he work 7 hours a day, then he will get at least 2 gaps.

Table of contents

students early

The students early constraints are:
Time constraints (students)A students set begins early
Time constraints (students)All students begin early

A students day will always start in the first period with an activity if you use this constraint (except you also used a constraint like in section Not available teachers, students or rooms & breaks in the first period).

Most students come to school by bus. But it arrive only at the first period and students are not allowed to have gaps.
Add constraint All students begin early with weight 100%.

Most students come to school by bus, it arrive only at the first period. The lower years are not allowed to have gaps. But the upper years are allowed to have gaps.
Add constraint A students set begins early to the lower years with weight 100%.

Most students come to school by bus, it arrive only at the first period and students are not allowed to have gaps. The bus bring them back only after fourth, fifth and sixth (last) period.
Add constraint All students begin early with weight 100%. Add constraint Min hours daily for all students with value 4 and weight 100%.

Table of contents

activity ends day

The activity ends day constraints are:
Time constraints (activities)An activity ends students day
Time constraints (activities)A set of activities ends students day

This constraint is very important if students have constraint no gaps and not all students of an group (or several groups) visit this activity. Also fortnightly activities maybe need this constraint.

The school offer remedial education to the students of an year. So not every students need to visit this activity. But you don't want to add a new category, because you are to lazy or pupils have (nearly) no unused period in their timetable.
There are two variants:
Variant 1: Add an activity with subject of remedial education, add the correct teacher, duration and the year (instead of this you can also add all groups, but it doesn't look so fine in the printed timetable). Add constraint An activity ends students day this activity.
Variant 2: If you have several activities that must end a students day and that activities have an common attribute (for example a speacial subject), then you can use constraint A set of activities ends students day to select several activities with a single constraint.

If you need activity starts day, then use An activity has a set of preferred times and choose every 1st period as possible time.

Table of contents

2 activities are consecutive

The 2 activities are consecutive constraint is:
Time constraints (activities)2 activities are consecutive

Constraint consecutive mean that these activities are scheduled at the same day without any gap, break or an other activity between them.

Students have subjects mathematics listening first and directly after this activity they should have mathematics practise by an other teacher.
Add constraint 2 activities are consecutive to these activities.

Table of contents

2 activities are ordered

The 2 activities are ordered constraint is:
Time constraints (activities)2 activities are ordered

Constraint ordered mean that the first activity must be scheduled before the second activitiy.

Students have subjects mathematics listening and mathematics practise. Of listening should be before practise.
Add constraint 2 activities are ordered to these activities. So if listining is on Wendesday 3th period, then practise will be later in that week.

Be careful with this constraint, because it is very restrict the timetable very much.

In my opinion this constraint sounds nice, but ensnare to an unhelpful use.
If you order two activities, then it might happen that listining is on Monday and the practise is on Tuesday. Sounds correct and maybe also sound like this is needed, but think more carefully. What happen if the activity on Tuesday doesn't take place because of ill teacher, ill students, holiday, field day, school trip or other reasons. The "needed" order is confused. It is nearly impossible to keep such an order the whole year. So why adding such an strict constraint if you can't keep the order over the whole year? Just because of the first week? In my opinion that is nonsense. Even if the first week start with an practise lesson that realy doesn't matter. You have enough other things to do in the first lesson (Get to know your students, check their previous knowledge, give an overview about the year or maybe just do a listing lesson.).
So in my opinion this constraint should be only used if you also use a constraint A set of activities has same starting day (any hours) to that activities.

Table of contents

Min gaps (hours) between a set of activities

The Min gaps (hours) between a set of activities constraint is:
Time constraints (activities)Min gaps (hours) between a set of activities

Constraint Min gaps (hours) between a set of activities mean that there are a minimum number of periods between 2 activities. So this constraint is something like the opposite of constraint consecutive.

Table of contents

Working in an hourly interval max days per week

The Working in an hourly interval max days per week constraints are:
Time constraints (teachers)A teacher works in an hourly interval max days per week
Time constraints (teachers)All teachers works in an hourly interval max days per week

...

Table of contents

preferred time(s)

The preferred time(s) constraints are:
Time constraints (activities)An activity has a preferred starting time
Time constraints (activities)An activity has a set of preferred time slots
Time constraints (activities)A set of activities has a set of preferred time slots
Time constraints (activities)A set of subactivities has a set of preferred time slots
Time constraints (activities)An activity has a set of preferred starting times
Time constraints (activities)A set of activities has a set of preferred starting times
Time constraints (activities)A set of subactivities has a set of preferred starting times

Preferred times are very powerful and fundamental constraints, you can nearly do everything with them. Especially constraint A set of (sub)-activities has a set of preferred times is very helpful (compare next example). It can care about activities with the same teacher, the same students, the same subject or the same activity tag.

1st Period
2nd Period
3th Period
4th Period
5th Period
6th Period
allowed
allowed
allowed
not allowed
allowed
not allowed
What is the difference between preferred time slot and preferred starting time?
There is no difference if the corresponding activities have duration 1. There are only differences if duration is 2 or more.
Have a look at the right example.
An activity with duration 2 can be start at period 1 and 2 if you use constraint preferred time slot.
But an activity with duration 2 can start at period 1, 2, 3 and 5 if you use constraint preferred starting time.

The main subjects (often the native language, a foreign language, mathematics) are instructed in a German secondary school 4 times per week. It might happen, that a students set has a main subject always in the last period. That is pretty bad because the students are already tired and can't learn as good as in earlier periods.
Add constraint A set of subactivity has a set of preferred times. Seletct component number 1. Select a mainsubject. Select activity preferd times periods 1 to 4. Add that constraint. Repeat it one more time, just with component number 2. By this constraints it can't happen that all activities are instructed at period 5 or later. There are now at least 2 activities in the 4th period or before.
Now the teacher can instruct new things or write tests in activities that have a earlier period and just do practice in activities that are scheduled later.
As always I prefer to use 100% weight. If this constraint is to difficult, then maybe just do it with the first component. If the timetable is still to easy to solve you can maybe also do it with the 3th component or with periods 1 to 3.
But be careful. Some activities still must be able to schedule late! So you shouldn't use constraint A set of activity has a set of preferred times to do this.
Of course don't do this with all subjects, because some subjects can/must be scheduled late.

An external teacher come at a special period to your school.
Use An activity has a preferred starting time.

All students should be able to celebrate Mass in the first Period except Friday.
Add an activity to every year with subject Mass and the priest as teacher. Use An activity has a set of preferred times. Select corresponding activities and select the first periods as preferred times.

Activities with duration 2 must (or should) start only in odd periods (1st, 3th, 5th, ...).
Use odd as activity tag and add a constraint A set of activities has a set of preferred starting times to all 1st, 3th and 5th periods. Don't use constraint A set of activities has a set of preferred time slots to effect this, because that mean activities with duration 2 or more can not be placed!

Activities must (or should) be instructed only in the morning (or in the evening).
Use morning (or evening) as activity tag and add to both activity tags a constraint A set of activities has a set of preferred times.

Table of contents

Same starting time

The same starting time constraints are:
Time constraints (activities)A set of activities has same starting time (day+hour)
Time constraints (activities)A set of activities has same starting day (any hour)
Time constraints (activities)A set of activities has same starting hour (any days)

Every single year should be able to celebrate Mass in the first Period.
Add a activity to every year with subject Mass and the priest as teacher. Add constraint A set of activities has same starting hour (any days) or A set of activities has a set of preferred times. Select corresponding subject or priest and choose the first periods as preferred times.

In the easier way you don't need constraint A set of activities has same starting time (day+hour). Just move all needed teachers and students in one activity. But by this they get only one room. But there are at least 3 needful examples:

In the classes are male and female students. You maybe want to schedule sport separated by girls and boys. Of course you can do it by using a new category. But in (nearly) 100% filled timetables this mean that they must have sport simultaneously.
If the first activity is subject sport, teacher 1 and group 10A, the second activity is subject sport, teacher 2 and group 10B. Add constraint A set of activities has same starting time (day+hour) to this to activities. Now teacher 1 can instruct all boys of group 10A and 10B; teacher 2 can instruct all girl of this groups.
This work well if the number of groups/classes is not odd in a year. If the number of groups is odd, then just connect to classes of two different years together (maybe 10C and 9C).

The native language teacher is teaching 4 periods per week in a group. But at 1 out of the 4 periods an other teacher is team teaching. So you can't just add this teacher to the activity, because in the other 3 periods he should teach somewhere else.
Variant 1: Add an pseudo activity. This activity just include the team teaching teacher. Now add constraint A set of activities has same starting time (day+hour) with the pseudo activity and one out of the four native language activities. You need to uncheck the block checkbox to see a single activities. If you have teacher home rooms this variant mean two rooms a locked for the team teaching activity.
Variant 2: Add one activity with both teachers and duration 1. Add a second activity with the native language teacher and total duration 3. Add the first single activity into the automatic generated Min n days constraint of the last activities.

Students have subjects mathematics listening first and directly after this activity they should have mathematics practise by an other teacher.
Add constraint 2 activities are consecutive to these activities.

Table of contents

Not overlapping

The not overlapping constraint is:
Time constraints (activities)A set of activities are not overlapping

Activities with same teacher or same students or same room are never overlapping by default. (compare Basic compulsory time and room constraints). So this constraint is only needed in very special situations.

There are 2 very important guys with a special skill. You know that one of them is sometimes away (or ill) and the other guy need to represent the other. Of course that is only possible if he have no activity at the same time.
Use constraint A set of activities are not overlapping.

Table of contents

Home room(s)

The home rooms constraints are:
Space constraints (teachers)A teacher has a home room
Space constraints (teachers)A teacher has a set of home rooms
Space constraints (students)A set of students has a home room
Space constraints (students)A set of students has a set of home rooms

Home rooms are the default rooms. They are allocated if there is no Preferred room(s) constraint.

Many institutions have home rooms to groups or teachers. You don't need to add home room constraints if every group (or teacher) have it's own home room. So you don't need to add home room constraints because you already know that there will never be a conflict. Add home rooms constraints only if some groups (or teachers) share rooms or if you want to display them into the timetable.

FET didn't allocate a home room if a activity contain more then 2 teachers or students sets. Use a Preferred room(s) constraint for that activities if you need to allocate a room.

Don't use teachers home room constraints and students home room constraints at the same time.

Read chapter preferd rooms before you add home rooms.

Every teacher should get his own home room. Sadly there are more teachers then rooms at the institution.
Your institution instruct 6 periods per day at 5 days a week. So the institution has 30 periods per week. Now count the number of periods that every teacher is working in his homeroom. You will see that some teacher work many hours in their home room. But there will also be teacher that work less hours in their homeroom. Not only because they are half time teachers, also because they maybe just teach math in the homeroom but physic in the lab. Some teacher even don't need a homeroom, because they teach only in special rooms. Now count the number of teachers that need home rooms; maybe you already have enough rooms. If not you need to check two variants:
Variant 1: Check if 2 (or more) teacher can share a home room. So the number of teaching periods from all teachers that share a single room can be maximum the number of periods per week of the institution. Add the same room to all teachers that should share a single room (constraint A teacher has a home room).
Variant 2: Maybe you have bad luck and there are no teachers that can share a single room. In that case one (or some) teacher need two (or more) home rooms (constraint A teacher has a set of home rooms). Before using this constraint you should think about using constraint An activity has a preferred room to activities of that teacher.

You counted the number of home room periods of every teacher and wrote down a list of teacher that could share a home room. But which teachers should share a single home room?

Check if teachers that instruct in the same special room can share a home room. For example teacher T1 instruct math and physics and teacher T2 instruct history and physics. Physics is instructed in the lab. Math and history is instructed in the home room. So if teacher T1 instruct physics, then the lab is used by T1. So T2 will never be able to instruct physics at the same time as T1, but that also mean the home room of T1 is free and T2 can use that home room.

Be careful if you share a special room with an other institution and so you also use A room is not available at the same time. For example you have a hugh gym that has 3 room but you can't use it every day because also an other school use it. Teacher T3 instruct math and sports and teacher T4 instruct history and sports. So this teachers can maybe never share a home room, because they must use the gym at the same time.

Sometimes (especially if you just need the last link of 2 teachers) it's the best if the teachers with the lowest number of home room periods share a room.

Table of contents

Preferred room(s)

The same starting time constraints are:
Space constraints (subject)A subject has a preferred room
Space constraints (subject)A subject has a set of preferred rooms
Space constraints (subject+activity)A subject+activity tag have a preferred room
Space constraints (subject+activity)A subject+activity tag have a set of preferred rooms
Space constraints (activity)An activity has a preferred room
Space constraints (activity)An activity has a set of preferred rooms

Preferd room constraints have a higher priority then home room constraints. This constraints are normally used for special rooms.

Subject chemistry must always be instructed in the chemistry lab.
Add constraint A subject has a preferred room if you have just one chemistry room.
Add constraint A subject has a set of preferred rooms if you have several chemistry rooms.

Subject physics must always be instructed in physics lab, but if physics lab is already occupied it is allowed to be instructed in the chemistry lab.
This example is sadly not possible, but very similar constraint is possible: Subject physics must always be instructed in physics lab or chemistry lab.
Add A subject has a set of preferred rooms.
So it might happen that physics is instructed in chemistry lab even the physics room is free. So please check yourself if this happen and manually correct it.

Subject biology must always be instructed in biology lab in year 7 to 10, but must not be instructed in year 5 and 6.
Set activity tag room needed to all biology activities of year 7 to 10. Add constraint A subject+activity tag have a preferred room with weight 100%. Add constraint A subject has a preferred room with weight under 100%.

You need to allocate several rooms for a single activity.
Add dummy activities with a (dummy) subject, maybe a dummy teacher and without a students set. Add constraint A set of activities has same starting time (day+hour) to connect dummy activities with the other activity. You don't need the dummy teacher, but it maybe help you checking the timetable. Don't forget that this dummy teacher maybe infringe upon other constraints (especially gaps constraints) Add room constraints to the dummy activities.

You have a gym that can be separated into 3 parts. Sometime 3 very large groups are together in the gym and it's a little bit to full in the gym. You can't remove a room, because sometimes must be 3 groups in the gym.
There are two different variants to solve this problem. Both are very similar, but depending on your exact dataset one of them is (maybe) much better and/or easier to enter:
Variant 1: Write down all very large groups. Add dummy activities with subject sport, dummy teacher and without a students set. Add constraint A set of activities has same starting time (day+hour) to connect a dummy activity with two large sport activities. You don't need the dummy teacher, but it maybe help you checking the timetable. Don't forget that this dummy teacher maybe infringe upon other constraints (especially gaps constraints)
Variant 2: Write down all smallest groups. Add A set of activities has same starting time (day+hour) to connect 3 small sport activity groups together.

An activity is splitted into 4 activities per week. Only one of these activities need the computer lab and not the home room.
Just add the activity as normal and use constraint An activity has a preferred room to one (sub)-activity

Table of contents

Buildings

The buildings constraints are:
Space constraints (teachers)Max building changes per day for a teacher
Space constraints (teachers)Max building changes per day for all teachers
Space constraints (teachers)Max building changes per week for a teacher
Space constraints (teachers)Max building changes per week for all teachers
Space constraints (teachers)Min gaps between building changes for a teacher
Space constraints (teachers)Min gaps between building changes for all teachers
Space constraints (students)Max building changes per day for a set of students
Space constraints (students)Max building changes per day for all students
Space constraints (students)Max building changes per week for a set of students
Space constraints (students)Max building changes per week for all students
Space constraints (students)Min gaps between building changes for a a set of students
Space constraints (students)Min gaps between building changes for all students

TODO: nice example?

Table of contents

Statistics

Check the teachers and students statistics before generating a timetable. You can check if all activities are (hopefully) added correct. It's also useful to check the statistics if you want to add some constraints. (like max days per week or max gaps)

Table of contents

Timetable

Maybe not every timetable is solvable. Remove constraints if FET fail to find a solution. Contact the author if you know that a solution is possible. Don't add to many constraints at one time and always save with a new file name.

Table of contents

Generating a timetable

There are two different ways to generate timetables:
timetablegenerate new
timetablegenerate multiple variants

Generating a timetable is very random process. So it might happen that generating a timetable just need a few seconds and generating a timetable with the same dataset need the next time several minutes. I can't say how much time is needed to your timetable, but I know datasets that need several hours to solve even on a modern computer.

Don't wonder if the number of placed activities stop or even decrease sometimes. That is normal. Just try some sample files. They are all solvable.

Table of contents

View a timetable

If you generated a single timetable by timetablegenerate new, you can view the timetables by:
timetableview (students)
timetableview (teachers)
timetableview (rooms)

*** you can lock activities here *** who need it? Good example?

I recommend to view the timetables with an web browser. They are saved in html format. On Linux systems they are stored in ~/fet-results/ and on Windows systems they are stored in a subdirectory /results/ of the FET directory.

Table of contents

Before releasing a timetable

I recommend to do four things:

  1. You should tell all teachers at a meeting or by a paper all constraints you want to care about. Ask all teachers if that constraints are correct or if constraints are missing. Maybe it's the best if the other teacher must write down all their constraints and wishes. So you will not forget a constraint and no one can affront you later that you didn't care about a special constraint. By talking about constraints in a meeting the other teacher will understand better why some have more gaps then others and this will reduce a lot of trouble and misunderstandings.
  2. Check the conflicts.txt file in the result directory.
  3. If your institution need to cover impeded teachers you should check the Teachers' Free Periods file in the result directory. (compare Teachers' Free Periods)
  4. Before releasing a timetable to the students you should release an unofficial timetable to the teachers. Do that as early as possible, so the other teachers can check your work.

It's very important to do that before the semester starts. Normally a institution has a meeting before the next semester begin, so you should do it at the latest at this meeting! Of course this two hints means that you have to work a little bit more before you can release a timetable, but you will have much more trouble and work if you release a buggy timetable.

Table of contents

How to change a running timetable?

Table of contents

Before changing a running timetable

Be critical yourself. Did you care about the hints that are described in chapter Prearrangement? So you ask the teachers for constraints before releasing a timetable and released an unofficial timetable first?

If you didn't care about that you have bad luck. Add the needed constraints and care about new constraints (see below). Don't forget to care about this hints this time!

If you care about that that hints you should inquire why you need to change the current timetable.

If a teacher forgot to tell you a constraint and you see that it's not necessary, I recommend to be stiff. Don't be to amiable and courteous. Don't add his constraint and don't generate a new timetable. I recommend that, because first of all be sure that you might get a new bug by solving an other one. Especially because there are new constraints you currently don't know (see below). You will get a lot of trouble if you don't care about them! Secondly other teachers will also come later and ask for new constraints, but maybe you will not be able to care about them and/or you get new bugs by that. So if you care about a teacher who didn't care about you (You already asked him to tell you missing constraints and asked him to check the unofficial timetable!) you will just have a lot of work and a lot of trouble in the college. All other teachers just will be dissatisfied and some might think that you give special privileges to a few teachers. Only by being strict the other teacher will respect you deadlines in the future. Of course necessary constraints must be added.

Maybe you wonder why I am talking about new bugs, because you followed my recommendation and set weight of all constraints to 100% and FET found a solution without any conflict. But by this "only" the whole timetable is fair and conflict free. Some teachers maybe don't view the whole timetable, they maybe just see their personal timetable and that might be not as good as before.
Example: The first time you added all constraints with 100% weight. Then you added constraint max gap per week and reduced that value step by step. FET was able to solve the timetable with max 5 gaps per week, but it wasn't able to solve it with 4 gaps per week. So you released timetable with max 5 gaps per week. Some days later you changed the running timetable (You added or changed some constraints). Fortunately FET was still able so solve the timetable with max 5 gaps per week. So the "whole" timetable is fair and you released it. But some teachers might be angry, because they got in the old timetable only 1 or even 0 gaps by accident. In the new timetable they have more (up to 5) gaps. So you see the problem? Some guy might be angry, but adding a constraint with a lower max gaps per week to that teachers is not good, because it's not fair to the other teachers and also the timetable will be much more difficult (or even impossible) to solve. That is why I recommend to "Never change a running timetable" if it is not necessary.

Table of contents

Changing a running timetable

If you must regenerate the timetable you must care about new constraints, not only the missing one! Some teachers get free periods or even whole days free (by accident). This teacher maybe already have some other (private) activities that you don't know! They might have consultation to a doctor, don't have a babysitter for their children, ... . So ask all teachers if they have compulsory free periods now. Add this constraints (as a rule A teacher is not available). Also add the missing constraint. Hopefully FET is still able to find a solution. If not you must think about increasing the number of max gaps or maybe also removing some constraints.

Table of contents

Teachers' Free Periods

Mr. Coverwood
MON TUE WED
1 5a
math
5a
math
---
2 --- --- ---
3 6b
math
--- ---
4 --- --- 5a
math
5 --- --- ---
6 7c
math
6b
math
---

In many schools it is not allowed that activities are omitted. There are many reasons why an activity might be omitted: A teacher is maybe ill, is on a school trip with his class, visit a further education, ... .

If impeded teachers must be represented by other teachers you might get big trouble if you add to "good" gap constraints, to many "min days per week" or to strict "min hours per day" constraints to teachers. The problem is that there might be not enough teachers to cover activities. Of course the number of free periods to every teacher is still the same, but especially many teachers with free days mean that you need a very loyal college. That constraint increase chance that teachers must represent at their free day other teachers! So might get trouble by that, mainly if you can inform that teachers only a few minutes or hours before he must represent an activity. The teacher is maybe not at home, because he do other things at his free day. So always check the "Teachers' Free Period" timetable before you release an (unofficial) timetable.

I recommend to check the "Less Detailed" table before you release a timetable. Only if you have a very loyal college you maybe need to check only the "Detailed" table.
Fist of all you need to check every period of the week. Have a look if there are enough teachers per period. If you see a period with only one teacher it mean that you can cover only one ill teacher at that period. So if two teachers are ill at the some day you are not able to cover both activities. If there is an empty period, then you can't even cover a single activity at that time.

For your daily work you normally use the "Less Detailed" timetable. Use the "Detailed" table only in emergency (because in the "Less Detailed" table are not enough teachers to cover all activities).

There are different teachers' free periods visible in the table.
In the “Less detailed” table are 5 different kinds of teachers' free periods: single gaps, boarder gaps, big gaps, must stay longer and must come earlier.
In the “detailed” table are also this kinds of teachers: must stay much longer, must come much earlier, free day and not available.

Mr. Coverwood
MON TUE WED
1 5a
math
5a
math
must come
much earlier
2 single
gap
border
gap
must come
much earlier
3 6b
math
big
gap
must come
earlier
4 border
gap
big
gap
5a
math
5 border
gap
border
gap
must stay
longer
6 7c
math
6b
math
must stay
much longer

"must come earlier": The teacher must come 1 period earlier to school as normal. So it's imported to tell that teacher as early as possible that he must driver earlier as normal to school.

"must come much earlier": The teacher must come 2 or more periods earlier to school as normal. So it's imported to tell that teacher as early as possible that he must driver earlier as normal to school.

"must stay longer": The teacher must stay 1 period longer as normal.

"must stay much longer": The teacher must stay 2 or more period longer as normal.

Gap: The teacher must not come earlier and must not stay longer, because he already instructed students at that day and will instruct (other) students later that day.

"single gap": The teacher has an activity directly before AND directly after that free period.

"border gap": The teacher has an activity directly before OR directly after that free period. (So he has one gap directly before OR directly after that free period.)

"big gap": The teacher has an free period (gap) directly before AND directly after that gap.

Maybe you wonder why teachers that have a break are missing in this table. Pretty easy. If that period is a break, you will never need to cover an activity, because all teachers have free at that time.

If you need to cover an activity, you must choose a teacher in the "Teachers' Free Period" table. It's difficult to say which teacher you should use. I tried to order the teachers by a general rule. But in some cases it's better to choose an other teacher first. Maybe it's better to choose a teacher that instruct the same group first. Maybe it's better to choose a teacher that instruct the same subject. Maybe it's better not to choose the first teacher, because he already instruct so many periods this day or week.

Maybe after some time you understand better this timetable and want to hide the descriptions in that timetable, because they just flood the timetable with unneeded information (because you are ale to differ the free periods by the different colours.). You can hide the descriptions by Hide Elements with css.

Table of contents

Print timetables

The default tool to print a timetable is a web browser, not a office program (like OpenOffice Writer or Calc), because the timetables are saved in html format and the import filters of office tools are not very good at the moment.

You want to publish a pdf file.
Check if your web browser or operating system support printing to pdf or exporting to pdf Sometimes it is called pdf Printer or print into file as pdf. You should search in your printer settings or in FileExport of your web browser. Windows user normally need to install a pdf print driver first.

Check if you use the latest version of the web browser. Try different web browser software.

Every Web browser has different advantages. Changing the font size is very easy with Firefox. Opera highlights text very fast. ... . So please try at least 2 of this web browsers:
- Firefox http://www.firefox.com/
- Opera http://www.opera.com/
- Konqueror (default Linux/KDE web browser)
- Internet Explorer http://www.microsoft.com/

In the easiest case you just have to open a timetable file with a web browser and print it by selecting FilePrint.

A page-break is done after every table if you saved the html files at least with html level 2 (FETsettingshtml level). But that doesn't mean that every table is on a single page! (compare next hint)

Check the print preview with your web browser (FilePrint Preview) before printing. Check every single page!

If a timetable doesn't fit on a single paper you can do three things:
- make the tables smaller (see below)
- make the paper larger (Reduce borders in the printer settings, crop the borders in the page settings of your web browser or use an larger printer.)
- maybe choose landscape format (in your printer settings)

You can make the tables smaller by:
- a web browser
- styling the html file with css
- editing the html file manually (not easy)

You can (maybe) reduce (and increase) the size of tables very easily with a web browser. Sadly every web browser hide this feature at different places.
- Open the print preview of your web browser and check if you can toggle the scale.
- Go to something like FilePage Setup or FilePrintOptions and check if you can do something like Fit to Paper Width, Shrink to Fit Page Width, proper size automatically or choose an other scale.

You can reduce (and increase) the size of tables easily with css by:
- reducing font size
- collapse borders
- hide elements (maybe hide caption, activity tags, rooms, table foot, ...)

You can reduce the size of tables with html by:
- removing unneeded columns or rows

Table of contents

Print multiple tables on a single page

There are two different ways to print multiple table on a single page:
- by css
- by printer driver

Table of contents

2 table on a single sheet by css

If you have enough space to print always two timetables on a single page then you need a page-break after every second table. Open the css file with an editor. You can see in the beginning the following lines:

table {
 page-break-before: always;
 text-align: center;
}

table.modulo2 {

}

Just remove the declaration page-break-before: always; from selector table and paste it into selector table.modulo2. So it should look like this:

table {
 text-align: center;
}

table.modulo2 {
 page-break-before: always;
}

Check the print preview. Check every single page! The size of tables is not always the same. So there are maybe 2 larger tables that doesn't fit on a single page. Read *** to understand how solve that problem.

Table of contents

2, 4 or 8 table on a single sheet by your printer driver

I recommend to check the print preview of your web browser first. There shouldn't be much free space on a page. So one or two timetables should use nearly the whole page. Now check if your web browser or printer support to print several pages on a single sheet. Have a look if you can set something like that in FilePrintProperties or in FilePage Setup. If your printer doesn't support printing several sheets an a single sheet you can check if your pdf print driver support that. So print (save) into a pdf file first and print that pdf file.

Table of contents

Style the html files with css

css means cascade style sheet. This is the easiest way to style the timetables. For example you can change colour and font size or hide elements. Your timetables must be saved with html level 5 to get access to all features (FETsettingshtml level).

Edit a css file with an editor. Don't do that with an office software. Linux user can use one of the enclosed editors (Kate, Kwrite, ...) Windows user can work with notepad++ http://sourceforge.net/projects/notepad-plus/

Open the css file. The file is in the same directory as the html files. If you have an good editor you should see that the css text is displayed in different colours. That syntax highlighting is done automatically by your editor and it will help you reading and searching bugs.

Table of contents

Comments

First of all you can see lines that start with /* and end with /* like this:

/* CSS Stylesheet of german_sample.fet
   Stylesheet generated with FET 5.4.18 */

That is a comment. This text is just to you. The web browser don't read that lines.

Table of contents

Selectors

Second of all you can see many statements like this:

table {
  page-break-before: always;
  text-align: center;
}

table.modulo2 {

}

Here are two statements. A statement start with an selector, followed by opening curly brace, maybe a declaration and a closing curly brace.

In this example the selector table has a declaration. But the selector table.modulo2 hasn't a declaration. If you already know html, you will remark that the name of selectors are similar to html element names or classes, because this selectors will affect that elements. If you don't know html, you will need to understand what this statement affect in the html file. You can check it pretty easy. Just write color: red; into ONE declaration. So it should look like this:

table {
  page-break-before: always;
  text-align: center;
  color: red;
}

table.modulo2 {

}

Save the css file and reload the html file. As you already imagine tables are coloured red in the html document now.

Remove color: red; out of the declaration of the css file and paste it in the next declaration. Save the css file again and reload the html file again.declaration You will see that only every second table is red now. Repeat this until with (all) other selectors until you understand the affect of all selectors.

Table of contents

Colours

You already know how to colour an element. You can also set a background colour by backgound-color. Just do it like this:

td.teacher, div.teacher {
  background-color: gray;
  color: blue;
}

If you add this lines into the selector td.teacher, div.teacher then all teacher names are written with blue colour on gray background.

Css know this colours: black, gray, silver, white, purple, fuchsia, maroon, red, olive, yellow, green, lime, navy, blue, teal, aqua and orange.

Table of contents

Hide Elements

A nice feature to reduce the size of tables is to hide some elements. For example to hide all activity tags just write display:none; into selector span.activitytag. So it should look like this:

span.activitytag {
  display:none;
}
Table of contents

Validate the css file

If you edit the css file it might happen that you do some mistakes. To avoid and find bugs turn on syntax highlighting of you editor and check the css file with an css validator. ( for example http://jigsaw.w3.org/css-validator/#validate-by-upload )

Table of contents

Settings

XXX

Table of contents

Help

Help is always needed. You can find hints and warnings here, but also we need help. So please tell us mistakes, nice examples or other suggestions. Help other guys in the forum, help coding or think about donating.

Yours
Volker Dirr