FET Manual

Version 0.9
last modified 04.04.2018

FET written by Liviu Lalescu
https://lalescu.ro/liviu/

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

FET Homepage
https://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 AGPL v3. Get the latest news and version from the official FET homepage (https://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 (https://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.

  • Miscellaneous time constraints
    • Basic compulsory time constraints
    • Break (all teachers and all students not available)
  • Teacher's time constraints
    (nearly all 2 times: for one teacher and for all teachers)
    • A teacher is not available
    • Max days per week
    • Min days per week
    • Max gaps per week
    • Max gaps per day
    • Max hours daily
    • Max span per day
    • Max hours daily with an activity tag
    • Min hours daily
    • Max hours continuously
    • Max hours continuously with an activity tag
    • Working in an hourly interval max days per week
    • Min resting hours
  • Student's time constraints
    (nearly all 2 times: for one student and for all students)
    • A students set is not available
    • Max days per week
    • Max gaps per day
    • Max gaps per week
    • Begins early (max beginnings at second hour)
    • Max hours daily
    • Max span per day
    • Max hours daily with an activity tag
    • Min hours daily
    • Max hours continuously
    • Max hours continuously with an activity tag
    • Working in an hourly interval max days per week
    • Min resting hours
  • Activity's time constraints
    • An activity has a preferred starting time
    • An activity has a set of preferred starting times
    • An activity has a set of preferred time slots
    • A set of activities has a set of preferred starting times
    • A set of activities has a set of preferred time slots
    • A set of subactivities has a set of preferred starting times
    • A set of subactivities has a set of preferred time slots
    • Min days between a set of activities
    • Max 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)
    • A set of activities occupies max time slots from selection
    • Two activities are ordered
    • Two activities are consecutive
    • Two activities are grouped
    • Three activities are grouped
    • A set of activities are not overlapping
    • Max simultaneous activities from a set in selected time slots
    • Min gaps (hours) between a set of activities
  • Miscellaneous space constraints
    • Basic compulsory space constraints
  • Rooms's space constraints
    • A room is not available
  • Teacher's space
    • 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
  • Student's space constraints
    • 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
  • Subject's space constraints
    • A subject has a preferred room
    • A subject has a set of preferred rooms
  • Subject and activity tag's space constraints
    • 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
    • A set of activities are in the same room if they are consecutive
    • A set of activities occupies max different rooms
Table of contents

Preparing FET

FET needs a computer that can run Qt. So it is possible to run it for example with Microsoft Windows, Apple MacOS or Linux. Even it is running with a Raspberry Pi 1 computer (it has got only 0,7 GHz and only 0,5 GB RAM), a faster computer is highly recommended. Also a screen size with at least 1280x800 is useful, because lower values will make it difficult to read the activity planning or some other dialogues. But in fact you can also run FET without a screen by using the command line version fet-cl.

Table of contents

Installing on Windows

Microsoft Windows users should have got Windows 7 or later. Download the FET executable file from the official FET homepage. It will extract all need files. Open the new created directory and start fet. You can move the directory to another location and/or create a link to the executable file.
Checkout the video "How to install FET on Windows?" if you need more detailed explanations.

Table of contents

Installing on MacOS

There is a MacOS version available you can also get a link to the download at the official FET homepage. Please ask in the FET Forum if you need more help about the MacOS version.

Table of contents

Installing on Linux

Many Linux version have got FET already in their own packet managers. Please read the manual of your OS if you don't know how to use it. You can also check the official FET homepage if you need a link to some of them.

Table of contents

Compiling from the sources

Download the FET sources file from the official FET homepage. Extract that file. You will find a very detailed description in the README file.

Table of contents

Setup language and output directory

Before exploring FET you might need to setup or check 2 things:
Open FETSettingsLanguage and select your preferred language.
Open FETSettingsSelect output directory and check that folder. You will use this folder many times while working with FET. So keep it in mind or change it if you prefer an other location.

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. If you are using FET the first time maybe open a few example files. Check the data and generate a timetable with FETTimetableGenerate new. Check the generated timetables in FETTimetableView

FET doesn't have an option to print in this menu. The timetables will be written into the output 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 manually 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.
But in fact that is normally not needed, since the timetable will be saved automatically in your output directory after generating it.

There is no problem at all if you generated multiple timetable by FETTimetableGenerate multiple variants. ....

But be careful if you use FETTimetableGenerate new. It will overwrite the previous results if the dataset have got the same name.

I highly recommend to save with a new file name as soon as a timetable was generated successful, even if there are still missing activities or constraints! One possibility is to append an increasing number at your file name.

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 if you do it like in the example table at the right side 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 & buildings

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

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

An activity tag is an optional mark to an activity.

Activity tags are for example lecture (reading), exercise or laboratory. If some activities must (or should) be instructed only in the morning the activity tag might be morning. The idea of this marks is normally not to give additional information to users. This marks are normally used if you want to set constraints just to activities with special activity tags. So they are used only by you (timetable maker) but will be hidden for teachers and students later to get better readable timetables.

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 can be occupied by one activity at he same time. 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. Call them maybe "Gym-1", "Gmy-2" and "Gym-3".

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 SchoolPrimary school example
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, 1D, 2A, 2B, 2C, 3A, 3B, 4A, 4B.
To enter the first year of this example add year 1. Then divide year by selecting categories. So you need only one Category. Add 4 divisions into this category and call them A, B, C and D. (Compare picture on the right). Confirm with "ok". Now check the groups to see what happened. To avoid space between year and category name remove the space of the separator character(s) in the divide year by selecting categories.

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

coursesubject (duration)
Biology
Chemistry
Physics
Biology (4), chemistry (1), physics (2)
Biology (1), chemistry (4), physics (2)
Biology (2), chemistry (1), physics (4)
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).
So for example one student from class 10a has chosen course Physics; so he as got 4 hours physics, 2 hours biology and only 1 hour chemistry. While an other student from the same class has chosen course Chemistry; he he as got 4 hours chemistry, 2 hours physics and only 1 hour biology.
Primary school example The beginning is very similar to the German primary school example above. Only the year name is 10 instead of 1. You also need to divide year by selecting categories. Add again 4 divisions in the first category and call them A, B, C and D. But this time you need to increase the number of categories up to 2 In the second category you need to add 3 divisions: Biology, Chemistry and Physics. (Compare picture on the right). Confirm with "ok". Now check the subgroups to see what happened. 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 all just groups. It also doesn't know the duration of the activities 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.

coursesubject (duration)
Christian religion
Jewish religion
Muslim religion
philosophy
Christian religion (2)
Jewish religion (2)
Muslim religion (2)
philosophy (2)

There is a third category at most German schools. Compare table at the right.

The students have different religions in the same classes. So they have religion in courses.
The default way is to do it the same way as before. Keep the first and second category as explained.
Add a third category with 4 divisions: Christian, Jewish, Muslim and Philosophy (Compare picture on the right). Confirm with "ok". Check the subgroups to see what happened.

Primary school example Your can add more categories of course. Doing more categories will make it easier to care about rooms and the timetables will be very comfortable readable. The only disadvantage of that is that the needed time to generate might be higher since a lot of subgroups will be generated by that. As long as there are not much more subgroups than students in that year all is very fine. If there are more subgroups than students in the year you also don't need to worry as long as your timetable is still fast solvable. But if there are much more subgroups than students or generating your timetable slows down to much you should think about tricks.

The first trick is to add all teachers and students of an category into a single activity (similar to a team teaching activity). The disadvantage is that the courses will be as the same time, even there might be other/better solutions. The timetable might be difficult to read, especially if the activities have got other subjects. You can care about only one room. You can avoid the disadvantages by adding several activities with an A set of activities has same starting time (day+hour) constraint. The trick is that only the first activity get the whole year while the other activities don't get a students set. If there are no critical room problems it might be much easier to keep all students and teachers (even with maybe the wrong subject) in a single activity and split that activity after there timetable was generated by an other tool. (This is for example very easy if you use substitution and supervision tool TiTiTo.)

The second trick is to do an other students structure. See next chapter.

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 and Universities

Students of high schools and universities have got normally a lot of possible courses to select. If you done your course planning already you can easily at the data into FET. If you haven't done your course planning yet, you should check the custom FET MAPR version.

There are 2 Students in year 1:
Student "Bart Simpson" selected core group A, group Physics and group Jewish.
Student "Lisa Simpson" selected core group A, group Biology and group Christian.
The idea is simple. Year name stays year name, group name stays group name and the subgroup is the name of the student. You will notice that it will be a lot of work to enter that students structure since you need to add each student into all his courses. You shouldn't do that manually. Most school have got already an school administration software with all the needed data. Check how to export that data into a csv file. You can import that data into FET. The csv file should look like this:
"year","group","subgroup"
"1","A","Bart Simpson"
"1","Physics","Bart Simpson"
"1","Jewish","Bart Simpson"
"1","A","Lisa Simpson"
"1","Biology","Lisa Simpson"
"1","Christian","Lisa Simpson"
If your school administration doesn't have got a csv export you can contact your school administration software developer or me.
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 split 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 should have an planning. Many school do that just with an spreadsheet software like Excel or Calc. FET also contain a simple Activity planning.
So you already should think about all activities (teachers, students and rooms) before adding them:
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 simultaneous because of other reasons?
Think about rooms: If you will use room constraints than care in your activity planning about as less room changes 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

If you are doing your timetable with FET the first time I highly recommend the following:

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 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.
It doesn't matter if you increase the duration of the first or the second subactivity. The order in the timetable can be different.

Subject native language is instructed 4 periods per week. The periods should be at different days, but they most not be at different days. 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 Min gaps (hours) between a set of activities.

Subject religion is instructed 2 periods per week. It should be instructed on different days. Maybe religion is a course of the last category (compare section Years, groups and subgroups) and you didn't divided the year by selecting categories with that category.
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.
Subject native language is instructed 6 periods per week in a 5 days week. 5 periods should be at different days.
Variant 1: Add teacher, group, subject, split this activity into 5 parts, since you have got only 5 days. Of course one (sub)-Activity need duration 2. Increase weight up to 100.
Variant 2: Add teacher, group, subject, split this activity into 6 activities per week. Also increase weight up to 100. This is of course impossible. So move to constraint Min days between a set of activities and search the correspond constraint. Remove one activity from that constraint.

Please read section Weights of constraints and Min 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).

Your school have different teacher meetings.
Add them as a normal (pseudo) activity. Just keep the students set empty.
Your school have got some backup hours for teachers to care about substitution of absent teachers.
You can also add them as pseudo activities. Of course it will be clever if those activities are not overlapping. It is easy if you have got in total less backup hours than your timetable has got hours per week. Just add Not overlapping constraint to all that activities.
You might want to always one of those backup hours in the first hour. There are 2 variants:
Variant 1: Add an A set of activities occupies max time slots from selection from a selection constraint. The big disadvantage of this variant is that you always need to modify this constraint as soon as the number of backup hours change. So this is a very critical variant, since you also need to remember it some month later if you do the next timetable.
Variant 2: Add a pseudo year. Maybe all that students set "backup". Add a students begins early (max beginning at second hour) constraint. Than always add those students into the backup activities.
You want to schedule also the supervision activities of the teacher before school, in the breaks and after school.
Of course that is also possible, but i don't recommend it. You need to increase the number of hours per week. Be very careful, since you need to set students not available during the supervision hours. Be careful, since FET might set a teacher meeting into that slots. So care about that also with constraints. Generating the timetable might become much slower. Teachers gap constraints will be critical, since a supervision slot will be counted as a gap if there is no activity.
Because of this disadvantages I highly recommend to do the supervision planning after generating the timetable. Normally it is very easy to do the supervision planning manually. There are some nice tools (like TiTiTo) that help you with that planning and allow to print nice timetables with included supervision activities.
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
Workaround Variant 1

This 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.
Workaround Variant 2

Just do the timetable 2 times with 2 different files. Maybe call one file the "A" week and the other file the "B" week. Don't forget that you can do this trick only with 2 different weeks.
Several schools use this trick for example for the first half of the year and the second half of the year. Especially if the activities have got only 1 hour per week. So they just do it 2 hours per week in the first half of the year and 0 hours per week in the second half of the year. In best case students have got an even number of those activities; so you can swap them easily without changing the total number of hours of the students.

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; so just add the day names a second time (maybe with an other suffix). 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 split into 4 activities per week. Only one of these activities should be instructed by two (or more) teachers.
Variant 1: Add the activity at the beginning with 1 teacher only. Then modify one subactivity and add a second teacher. The modified subactivity will get max one room. If you know that there will be somewhere a free room for that teacher it might be better to not care that now. You can split such an activity very easy with TiTiTo later and add the other room later.
Variant 2: Add an activity with the group, one teacher and split it into 4 activities. Keep the id of one out of the split 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 3: 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 days between a set of activities constraint.

Table of contents

Subactivities

While modifying activities you always change the whole activity. So all subactivities will get the same modification. Sometime it is very useful to change only one of that subactivity.

Don't forget that the subactivities are orderd only in this menu. It doesn't mean that the subactivities are also ordered in the timetable. So the first subactivity can be on the last day while the last subactivity can be on the first day. You must use a constraint if you want to order them in the timetable

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 teacher or students 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 min/max days/periods/gaps). The Min 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 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 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.

It is easier to "see" impossible dataset while generating a timetable if all constraints have got 100% weight only, since in that case the number of placed activities change max +/- 1 (or decrease).
If you have got some constraint with less than 100% weight an impossible timetable is not so easy to "see". The number of placed activities might change a lot like during "normal" generating a solvable timetable.
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 period is not counted as a gap. If you need to count not available times as possible gaps please use Time constraintsActivitiesA set of activities have a set of preferred times. Select only the needed teacher and set all not available times.

A teacher is teaching at an other school on Wednesday and Thursday.
Add constraint A teacher is not available.

A teacher is teaching at an other school on Wednesday and Thursday but only in the last 2 hours.
Variant 1: Add constraint A teacher is not available. Be careful, you might need to add one more hour not available since the teacher need time for travelling.
Variant 2: You can also use a pseudo activity with constraint An activity has a preferred starting time. So don't add a students set into this activity, but you should use a room constraint and set a room for this activity. The room should be also in an other building and you should add a constraint min gaps between changing the building. This Variant is of course much more work, but the advantage is that you can also care correct about max gaps for this teacher.

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 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.

There is a break between the 3rd and 4th hour. Teachers should do supervision while students relax during the break.
You might use constraint Not available for all students years during that break. So you can set activities for the teachers to do the supervision. The advantage of this variant is that you are ready as soon as the timetable is generated. But there are several disadvantages: If teachers don't do supervision during the short break it is counted as a gap. So all gap constraints will become to strict. Also the printed timetables don't look "perfect". I suggest to not enter those break times. You can do the supervision planning later with other tools like TiTiTo. The supervision planning is normally pretty easy even with an already generated timetable and the timetables will also look sweeter.

n days between a set of activities

Table of contents

The n days between a set activities constraints are:
Time constraints (activities)Min days between a set of activities
Time constraints (activities)Max days between a set of activities

n days between activities does NOT mean: one activity on Monday and one activity on Wednesday. There is one day (Tuesday) between.

n days between activities are calculated by a difference. So if one activity is on Monday (maybe the 14th February) and one activity is on Wednesday (maybe the 16th February) then there are 16-14=2 days between an activity.

Table of contents
Min days between a set of activities

Min n days between a set of constraints are added by default as soon as you add an split activity. So please 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 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 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 split activities are instructed at only one day. In worst case you have 2 split 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 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 days between, because the Min 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 activity planing you must also carefully think about constraint Min days between a set of activities (Normally not in the classes (category 1), but in the courses (category 2 and above)).

Instead of using a min 0 days between activities constraint you should use a same starting day constraint.

Table of contents
Max days between a set of activities

By this constraint you set the max days between a set of activities. In my opinion it is "unneeded" to normal school tables, since there are other much more important constraints that should be added.
But if you enter a dataset with more than just 5 days per week (maybe if you use the 120-days custom FET version) this constraint will be very useful to get "good" spreading of (sub)-activities.

Table of contents

Hours per day

The min hours daily constraints are:
Time constraints (teachers)Min hours daily for a teacher
Time constraints (teachers)Min hours daily for all teachers
Time constraints (students)Min hours daily for a students set
Time constraints (students)Min hours daily for all students

The max hours daily constraints are:
Time constraints (teachers)Max hours daily for a teacher
Time constraints (teachers)Max 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 (teachers)Max hours daily with an activity tag for a teacher
Time constraints (teachers)Max hours daily with an activity tag for all teachers
Time constraints (students)Max hours daily with an activity tag for a students set
Time constraints (students)Max hours daily with an activity tag for all students

Constraints max and min hours daily 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.
Also talk to the teachers. If a teacher have got only 1 hour at a day it might be a psychological problem. A teacher might complain: "I must come to school just for 1 hour." So imagine now you will move one of his activities at the same day. In worst case he will get more than 2 new gaps! That isn't better. Of course you might also move an activity without generating a new gap. But now also count correct: Does he save driving time to school by that? No! Is he longer or shorter at school or at home by that? No! So a min day constraint doesn't help in that point! You can save driving time to school only by a Max days per week constraint. You can save hours at school only by Max gaps constraints (or working less hours).

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 and to high min periods daily constraint for teachers, because there might be not enough teachers to substitute teachers of that 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 careful if you have teacher home room constraints.
Teaching many hours subject sport or music might pretty stressful, since it is nearly never quite.
Tag activities with subject music and/or sport with an activity tag. Add constraint Max hours daily with an activity tag.

It is now to difficult to generate a timetable? Check constraint Max hours continuously with an activity tag since this is a less strict variant.

Table of contents

Days per week

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 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 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 substitute that teachers. Please read chapter Teachers' Free Periods.

Table of contents
Min days per week

The min days per week constraints are:
Time constraints (teachers)Min days per week for a teacher
Time constraints (teachers)Min days per week for all teachers

Even there are min days constraints for teachers, they are in my opinion never needed. Why should someone force a teacher or student to come to school if they could stay at home?

There are at least 3 variants how you force min days per week already indirectly. You could use similar variants for students.

Variant 1: Just add a max hours daily constraint. If a teacher have got 24 hours per day and you set for example max 6 hours then he will get min 24:5=4 days per week. If you set max 8 hours per day he will get min 24:8=3 days per week. If you set max 5 hours per day he will get min 24:5=4 days per week.

Variant 2: Just use min day constraint with 100% weight. Maybe it is a math teacher and the activity is split into 4 parts with 100% weight. In that case the teacher will get min 4 days.

Variant 3: Add him a "pseudo" activity. If the teacher must come at least 5 days per week than there should be a reason for this. Maybe he should supervise or work in the office. So just give him a "pseudo" activity with 5 sub-activities with 100% weight and maybe the subject "office".

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
Time constraints (students)Max gaps per day for a students set
Time constraints (students)Max gaps per day for all students

A gap is an unused timeslot (or several) between two activities.
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 fact this is always the last optimisation i am doing after all other constraints are fine. So don't use a too low value at the beginning if you didn't enter all other constraints yet.

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 substitute that teachers. 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 careful 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 constraint 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
Time constraints (teachers)Max hours continuously with an activity tag for a teacher
Time constraints (teachers)Max hours continuously with an activity tag all teachers
Time constraints (students)Max hours continuously with an activity tag a students set
Time constraints (students)Max hours continuously with an activity tag 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 3, 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 5 hours a day, then he will also get at least 1 gaps. If he work 7 hours a day, then he will get at least 2 gaps.

Teaching many hours subject sport or music might pretty stressful, since it is nearly never quite.
Tag activities with subject music and/or sport with an activity tag. Add constraint Max hours continuously with an activity tag.

There are still to many hours daily? Check constraint Max hours daily since this is a more strict variant.

Table of contents

Max span per day

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

The span is the last hour minus the first hour. It doesn't matter if there are activities between or gaps.

You already added Max hours daily constraints and Gaps constraints. Sadly you can't reduce that values since the timetable become to difficult by that. But in worst case teachers get the max allowed number of hours per day and the max number of allowed gaps at the same day. Those days will be very long days.
Add constraint Max span per day constraints might help.
Table of contents

students begins early (max beginning at second hour)

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). ***xxx TODO recheck. Also write about max beginnings at the second hour

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 special 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

Two activities are consecutive

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

Constraint consecutive mean that these activities are scheduled at the same day without any gap or an other activity between them. A break by a Break Constraint between is allowed.

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

If both activities contains the same students and teachers it is maybe better to just increase the duration of one activity. Even if the subject is different, since generating a timetable will be faster.

Table of contents

Activities are grouped

The activity are grouped constraints are:
Time constraints (activities)Two activities are grouped
Time constraints (activities)Three activities are grouped

The Two activities are grouped constraint is less strict than the Two activities are consecutive. The activities will be also at the same day without any gap or an other activity between them. Also a break by a Break Constraint between is allowed. This time just the order of the activities is not compulsory. So the second activity might be before the first one.
This constraints might be used to avoid room changes of teachers or students.

If activities contains the same students and teachers it is maybe better to just increase the duration of one activity. Even if the subject is different, since generating a timetable will be faster.

Table of contents

Two activities are ordered

The two activities are ordered constraints is:
Time constraints (activities)Two activities are ordered

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

Students have subjects mathematics listening and mathematics practise. Of course listening should be before practise.
Add constraint Two activities are ordered to these activities. So if listening is on Wednesday 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 listening 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 really 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
Time constraints (students)A students set works in an hourly interval max days per week
Time constraints (students)All students works in an hourly interval max days per week

Your school has got 5 day per week. The students have got 31 hours per week. So every day 6 hours; except of one day with 7 hours. So there is one afternoon lessen per week for students.
No problems for the students, but which teacher should teach this "last" hour? In worst case maybe one teacher will get 5 of those afternoon activities.
Add constraint All teachers works in an hourly interval max days per week. Select the last hours and set value max 1. So every teacher get max 1 afternoon activity.
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. Select component number 1. Select a main subject. Select activity preferred 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 activities has a set of preferred times to do this.
Think about full time working teachers that are teaching main subjects only. Their timetable must still be solvable!
Of course don't do this with all subjects, because some subjects can/must be scheduled late.
Component number 1 must not be the first subactivity in the week. Even if component number one is placed on Tuesday, component number 4 can still be on Monday.

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, ...).
Add a constraint A set of activities has a set of preferred starting times. Check all even timeslots to disable them; only click on the hour name to disable all that hours in the week. Check the "duration" check box and increase the value up to 2.
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.
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: Modify one subactivity and add the 2nd teacher. By this he won't get his own room. Normaly this is not critical since somewhere will be a free room in your school. You can give him an other room easily after the timetable was generated by other software tools like TiTiTo.

Table of contents

Not overlapping

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

Activities with same teachers 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

Min resting hours

The Min resting hours constraints are:
Time constraints (teachers)Min resting hours for a teacher
Time constraints (teachers)Min resting hours for all teachers
Time constraints (students)Min resting hours for a students set
Time constraints (students)Min resting hours for all students

Some school start already early (maybe at 08:00) but also ends pretty late (maybe at 22:00). Especially school with working adults or room problems.
In those schools it will be bad if teachers or students have got the last activity in the last time slot at 22:00 and need to visit the school already the next day in the first time slot at 08:00. You can avoid those problems by using a Min resting hours constraint.

If you want to set a Min resting hours constraint with just 1 resting hour you might try Working in an hourly interval max days per week constraints. It is a bit more complicated to add this constraint, but it might be faster to generate a timetable. You need to set a constraint for Monday the last and Tuesday the first hour with max 1 working hour. Then need to set a constraint for Tuesday the last and Wednesday the first hour with max 1 working hour. Repeat this up to Thursday the last and Friday the first hour with max 1 working hour. Please let us know if this variant generate faster or slower results if you generate a lot of timetables.

Table of contents

A set of activities occupies max time slots from selection

TODO xxx ***

Table of contents

Max simultaneous activities from a set in selected time slots

TODO xxx ***

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 an 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 preferred 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 home room. 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 home room. Not only because they are half time teachers, also because they maybe just teach math in the home room but physic in the lab. Some teacher even don't need a home room, 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 huge 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.
Please check constraint A set of activities occupies max different rooms if there are still a few teachers left and you are not sure what room will be the best as home 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

Preferred 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 split into 4 activities per week. Only one of these activities need the computer lab and not the home room.
Variant 1: Use constraint An activity has a preferred room to one (sub)-activity
Variant 2: Modify one of it's subactivities and set an other subject name or add an special activity tag which got a room constraint for the lab.

Table of contents

A set of activities occupies max different rooms

Space constraints (activity)A set of activities occupies max different rooms

You have got teacher home rooms at your school. There are much more teachers than rooms and so a lot of teachers already share a room. Sadly a trainee teacher also should have a room, but you don't know what room is the best to use.
Give that trainee teacher all possible home rooms by Space constraints (students)A set of students has a set of home rooms Than set to all activities of that teacher an Space constraints (students)A set of students has a set of home rooms and allow max 1 different room.

You have got 2 science labs. Since it doesn't matter if an activity is place in Lab A or in Lab B you added of course both rooms as preferred room. But you want that a split activity is always in the same Lab.
Set to all activities of the split activity Space constraints (students)A set of students has a set of home rooms and allow max 1 different room.

Be careful with this constraint. Use it only if you have got an easy timetable and if it is needed. It might be more clever if you add more detailed preferred room constraints instead of using this constraint. It might be better if you just generate the timetable without any additional constraint and modify later manually rooms if so see possible swaps.

Table of contents

A set of activities are in the same room if they are consecutive

Space constraints (activity)A set of activities are in the same room if they are consecutive

You have got 2 science labs. Since it doesn't matter if an activity is place in Lab A or in Lab B you added of course both rooms as preferred room. But you a teacher is already in one lab he should swap into the other lap if he has got an consecutive activity that needs a lab.
Set to all activities of the teacher that need a lab a Space constraints (students)A set of activities are in the same room if they are consecutive.

Be careful with this constraint. Use it only if you have got an easy timetable and if it is needed. It might be more clever if you add more detailed preferred room constraints instead of using this constraint. It might be better if you just generate the timetable without any additional constraint and modify later manually rooms if so see possible swaps.

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

Changing a building need much time. Even if the buildings are not far away. You can limit the number of building changes by this constrains. You need to enter the building names in FETDataBuildings. Then you must set the buildings to each room in FETDataRooms.

If the buildings are far way you might need much time to travel to the other building. Use one of the Min gaps between building changes to ensure that there will be enough time to travel.

This constraints can be also used for floors or rooms (if you don't need one of the Min gaps between building changes at the same time for real building changes). Just set the floor or room name as building name.

Table of contents

Statistics

Check the teachers, subjects 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)

Checking the teachers and subjects statistics is normally unneeded if you work with the Activity planning. But you should check the other statistics even if you use the activity planning.

Checking the students statistics. While the number of hours per year and group are a bit confusing sometimes I highly suggest to check the number of hours per subgroup. You can see bugs here that are not so easy visible in the activity planning. Those bugs often occur because of an incorrect or changed students structure.

Checking the activities room statistics will help to to find activities without a room.

Checking the teachers subjects qualification statistics will help to to find teachers in wrong activities.

Some of the advanced statistics are very similar to the Activity planning view. So it is partly unneeded to check it work with the activity planning view, but a quick view will never be wrong.

Taking some minutes time to check the statistics might save you a lot of work. In worst case you have got a very difficult dataset, just because of a bug. You might spent hours to solve this timetable just to notice at the first school day that your solution is wrong and can't be used. So take your time sometimes during working at your dataset and check the statistics, even you think you done that a few days ago already. Working at the dataset also mean you change the statistics.

Advanced

XXX

Table of contents

Activity planning

The activity planning is an small sheet to help you doing the planning. It doesn't support all feature and constraints that are needed for a full planning. That is nearly impossible, since a lot of different school systems uses a lot of different pedagogic rules for the planning. So you need to care about rules like this yourself:

But this planning gives you a nice overview about your whole dataset and you can see some some statistics much easier than in the default activities view. So it is easier so check things like:

To get the best assistance by this sheet I highly recommend to do two things before working with it:

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, check regularly if the timetable is still solvable 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.

It is easier to "see" impossible dataset while generating a timetable if all constraints have got 100% weight only, since in that case the number of placed activities change max +/- 1 (or decrease).
If you have got some constraint with less than 100% weight an impossible timetable is not so easy to "see". The number of placed activities might change a lot like during "normal" generating a solvable timetable.
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 a web browser. They are saved in html format.
If you don't have got a too slow computer of too less free disk space you should also think about increasing the html level up to level 5 since you will be able to see all similar names if you move with the mouse over a name. You can change the html level in FETSettingsTimetablesHTML level for generated timetables.
On Linux systems they are stored in ~/fet-results/ and on Windows systems they are stored in fet-results directory in the User directory.
If you can't find it please check FETSettingsSelect output directory.

Table of contents

Before releasing a timetable

I recommend to do six things:

  1. You should tell all teachers at a meeting or by a paper the activity planning. Ask all teachers if that planning is correct.
  2. 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.
  3. Check the conflicts.txt file in the result directory.
  4. Check all statistics at least one more time after the final timetable was generated.
  5. If your institution need to substitute impeded teachers you might check the Teachers' Free Periods file in the result directory. (compare Teachers' Free Periods)
  6. 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 the first two suggestions 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.

If you have got a very difficult dataset and your timetable is already running maybe check if you can keep the current one even it is not perfect. Maybe you can move a few activities manually to fix a critical bug and keep that solution even it mean there will be some minor bugs.

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 substitute that teachers. 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 you 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.

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 substitute teachers of an activity, because all teachers have free at that time.

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 substitute only one ill teacher at that period. So if two teachers are ill at the some day you are not able to substitute both activities. If there is an empty period, then you can't even substitute a single activity at that time.

If you need a substitution for 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.

Your can use the "Less Detailed" table for daily work. Use the "Detailed" table only in emergency (because in the "Less Detailed" table are not enough teachers to substitute all teachers). Advanced Users should think about using a software that helps you planning substitutions. Good software also give you much more information, not only the explained points above. For example team teaching teachers could be used to do the substitution or similar stuff. Maybe have a look at TiTiTo or similar tools.

Table of contents

Print timetables

There is a simple print menu to print the timetables. Sadly the tables doesn't look perfect with it. The default tool to print a timetable is a web browser, not a office program (like LibreOffice 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. So you should open your working directory and print the saved html files.

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. Some have nicer printed tables, some highlights the text faster, ... . So please try at least 2 of this web browsers:
- Mozilla Firefox https://www.mozilla.org/firefox/
- Opera https://www.opera.com/
- Google Chrome https://www.google.com/chrome/
- Microsoft Edge https://www.microsoft.com/windows/microsoft-edge

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++ https://notepad-plus-plus.org/

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 https://jigsaw.w3.org/css-validator/ )

Table of contents

Settings

There are a lot of settings in the menu. Most of them should be self-explanatory. Only the random seed might be blurry for some users.

As you know timetabling is pretty difficult. If you want to do an timetable you will start of course and place the activity with fixed times. But how to go on next. You need to select the most difficult activity (View initial order of the placing the activities while generating a single new timetable). But where so you want to place it? Monday the 1sh hour? Friday the last hour? Or somewhere else?
That decision is done by a random generator. In fact a "real" random generator isn't available on the most computer systems. "Random" generators are in fact not random on computers, in fact there are calculated by an algorithm. It is not easy to code an good random generator.
The FET random generator need to number (seeds) as input for the algorithm. If you restart generating a timetable (with exactly the same dataset) with the same seed then the same "random" numbers will be calculated and you will get exactly the same final table.
In normal case that is not good, since:

The last point doesn't sound like an disadvantage in the first moment. But as you know generating a timetable might take many hours or days if you start "wrong". So in worst case you always need to wait many days to get a final result. That is of course not practically. You might never get a fast result, even you might nearly always get a fast result if you just start planing the first activity in an other slot.
That is why the random set is set always different as soon as you start FET. (It simply use the system time to set the seed).
In normal case you will never need to change the seed. But you might have noticed that the seed is saved in the html-results folder. Generating the exact same timetable is pretty helpfull if we (the developers) get an bug report, since we can exactly reconstruct the problem.

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