FET Manual
Version 0.1a
last modified 09.10.2007
FET written by Liviu Lalescu
http://www.lalescu.ro/liviu/
Manual written by Volker Dirr
http://www.timetabling.de/
FET Homepage
http://www.lalescu.ro/liviu/fet/
FET is free software for automatically scheduling the timetable of a school, high-school or university. It uses a fast and efficient timetabling algorithm. It is free software, open source, licensed under GNU/GPL. Get the latest news and version from the official FET homepage (http://www.lalescu.ro/liviu/fet/).
This is a small manual with hopefuly a lot of useful examples.
Important definitions are marked blue.
Useful hints are marked green.
Critical warnings are marked red.
Wise examples are marked yellow.
Liviu Lalescu (http://www.lalescu.ro/liviu/) started his project at the end of year 2002 as he was working on his diploma. He got his examination in computer programming (software specialization) in June 2003. FET had a very large palette of contraints (more then today!(September 2007)), 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 timetabels in a few minutes.
There are a lot of nice features. FET is able to automaticly care about all groups (classes/courses/students), has a very large palette of constraints and of course nice styleable xhtml timetables.
TODO: requirements TODO: same like readme. (really write it twice? Maybe short the readme and write long version here?)
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.
Of course it's possible to open and save a file.
TODO: write a open without erasing current dataset, so it's possible that different timetable makers merge their data files.
FET doesn't have a option to print in this menu. The timetables will be written into the results directory after a timetable is generated.
TODO: save the timetable solution to print it from here?
Save your dataset regulary. Especially if you add or modify constraints. FET doesn't have a undo option right now. Sometimes it's very difficult to undo the last modification. Also if FET didn't find a solution after several hours you maybe want to undo but already forgot last changes.
The saved dataset contain only the Basic settings, Activities and Constraints. It doesn't include the generated timetable solution.
The data contain the Basic settings, Activities and Constraints. It doesn't include the generated timetable solution.
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.
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 ...).
Add 10 days with names Monday_1 to Friday_1 and Monday_2 to Friday_2 to do fortnightly timetables. The activities can (for example) get a subject tag Week_1 or Week_2.
| Example 1 | Example 2 | Example 3 | Example 4 (bad!) | Example 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, but it's highly recommended not to use a point in time (view bad example), because you might get confused if you work with some constarins that need to know the period names.
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.
At the moment Example 5 is better then Example 4, because not available constraint forms are using currently that slang. (TODO: change it!)
So sadly i have to recommend NOT to use Example 4. It´s bad at the moment.
(Except if you add a period that always get special activities or a break. In example 4 a period 09.35-10.00 can be added and this period always get the constraint break. But that is only a cosmetic intrusion.)
So by this example an activity with duration 1 take 45 minutes and an activity with duration 2 take 90 minutes.
Activities can not get non-integer duration like 1.5.
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.)
At the moment you need to add one period more then needed, because not available constraint forms are using currently that slang. (TODO: change it!)
Add teachers, subject, subject tags and rooms.
Also these names are printed into the timetable. So use short cuts to get smaller timetables.
A subject tag is an optional information to an activity.
Subject tags are for example lecture (reading), exercise or laboratory.
If need a fortnightly timetable the subject tags might be Week 1 or Week 2.
If activities with duration 2 must start in odd periods (1st, 3th, 5th, ...) the subject tag might be odd.
If some activities must (or should) be instructed only in the morning the subject tag might be morning.
Think at least twice before using subject tags. I recommend to use subject tags only to set constraints. Try to set constraint as long as (easily) possible without a subject tag. Subject tags are very powerful, but every activity has only one subject tag.
Don't add home rooms. Normally every group (class or teacher) has it's own home room. So there will never be a room conflict. Add only rooms that could have a conflict (arts room, gym, science lab, ...).
Every room has capacity 1. So only one activity can be placed per room. If you have a huge gym (that maybe can be separated into 3 parts by curtains), then enter 3 rooms for the gym.
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 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.
Category: A set of groups that might have activities simultaneously.
| course | subject (duration) |
|---|---|
| Biology Chemistry Physics |
Biology (4), chemistry (1), physics (2) Biology (1), chemistry (4), physics (2) Biology (2), chemistry (1), physics (4) |
Course (division of the second category): A set of students who meet (sometimes) the same activities.
To enter this example add year 10. Then divide year automaticly by selecting categories.
Increase number of divisions up to 4 and call them A, B, C and D in the first category.
Increase the Number of categories up to 2 and the number of division of this category up to 3.
Call them Biology, Chemistry and Physics.
Now check the subgroups to see what happen.
The most important is to see that you get the groups 10A, 10B, 10C, 10D, 10Biology, 10Chemestry and 10Physics by this.
(So in this example the first 4 groups are classes and the last 3 are courses.
To FET they are just groups. It doesn't know the duration of the groups (at this moment).
Be careful if you have a (nearly) 100% filled timetable. This activities are scheduled simultaneously if the timetable is 100% filled. 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 an different teacher then in the other courses, then this courses are possible.
It doesn't matter in this example if the physics course get only biology duration 1. FET is able to care about that, even the duration is different between the courses.
Your can add a second set of courses by using category 3.
You can add a third set of courses by manually doing the same like divide year automaticly by selecting categories, but it's a little bit tricky. In some cases you don't need to add a new category (read next hint).
| course | subject (duration) |
|---|---|
| christian religion jewish religion muslim religion philosophy |
christian religion (2) jewish religion (2) muslim religion (2) philosophy (2) |
Think about needed categories first. The first category should always be the class. The second and third category should be the categories with the longest total duration. Other categories must be done manually or by the hint simultaneous activities.
Maybe you know that (by accident) no students is in Group 10A and 10Bio at the same time. You can delete the corresponding subgroups. You maybe get better timetables by this. But you need to do it only if your timetable is not 100% filled. 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!
Also pseudo activities are possible. (They don't have any teacher or student)
Before adding activities you need to do a planning. Currently FET doesn't help you with this. So you already need to think about all activities. Has every students the correct number of activities (subject and duration)? Has every teacher the correct number of activities (duration)? Is it possible that activties of courses are simultaneously?
To add an activity you just need to add (double click with the mouse, or select and press enter) students, subject and teachers.
Normally an activity contain 1 teacher, 1 group and 1 subject.
You should always enter the number of hours that this activity is instructed.
The Min n days between a set of activities constraint is one of the most important constraints.
So this constraint is added automaticly with (nearly) every added activity.
Please read section Weights of constraints and Min n days between a set of activities.
It's allowed to add pseudo activities. Pseudo activities doesn't include a students set or a teachers set. Sounds stupid, but they are useful to care about some constraints. Compare sections Not available teachers, students or rooms & breaks, About gaps per week, preferred time(s) and preferred room(s).
Check the statistics after all activities are added.
| weight | average 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.
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.
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.
Normally this constraints need weight 100%. Because you can not choose if someone is available or not.
Constraint break is a easy way to say that all teachers and students are not available.
This constraint is:
Time constraints (activities) → Min n days between a set of activities
Read also section add an activity.
| course | subject (duration) |
|---|---|
| nature science industrial art foreign language |
biology (2), chemistry (2), physics (2) industrial art (6) French (4), Latin (2) |
If you do your cover planing you must also carefully think about constraint Min n days between a set of activities (Normally not in the classes (category 1), but in the courses (category 2 and above)).
The max & min periods per day constraints are:
Time constraints (teachers) → Max hours daily for a teacher
Time constraints (teachers) → Max hours daily for all teachers
Time constraints (teachers) → Min hours daily for a teacher
Time constraints (teachers) → Min hours daily for all teachers
Time constraints (students) → Max hours daily for a students set
Time constraints (students) → Max hours daily for all students
Time constraints (students) → Min hours daily for a students set
Time constraints (students) → Min hours daily for all students
Constraints max and min periods per day for students are useful if you want a balanced day.
| Group | activities per week |
|---|---|
| 1A, 1B 2A, 2B 3A, 3B 4A, 4B |
20, 19 21, 20 25, 24 30, 29 |
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.
The max days per week constraints is:
Time constraints (teachers) → Max days per week for a teacher
Of course if the contract of employment guarantee a max number of days per week, then this is an important constraint.
A timetable is not solvable if you add constraint max days per week with only 3 days and weight 100% if the same teacher instruct a set of 4 or more activities that have constraint Min n days between a set of activities with weight 100%. Be careful! Most activities have this constraint (compare add an activity).
I recommend to check this constraint again after all other constraint are added, most of them already have weight 100% and FET is still able to find a solution.
Most teacher like a free day. Check the teacher statistics. Check if a teacher is able to (maybe) get free day. So the number of periods per day of the teacher must be lower or equal then the number of periods per week of the timetable minus the number of periods per day. Also check if a lower number of working days doesn't controvert to a constraint (especially a constraint Min n days between a set of activities). Add constraint Max days per week for a teacher with weight 100% if nothing argue against it. Don't add to many constraint at one time. Maybe begin with the teacher that instruct the lowest number of periods per week. Check if the timetable is still solvable. Add the next teacher if it is still solvable. Remove the constraint if the timetable is not solvable and try to add the following teacher.
If you need contraint like max days per week for students set just add an activity with the students set, subject “free”, no teacher and the number of periods per day of your timetable as duration.
If you need contraint like max days per week for students set you can think about effecting similar with constraint Min hours daily for a students set.
If you need contraint like max days per week for all teachers you can think about effecting similar with constraint Min hours daily for all teachers.
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 (students) → No gaps for a students set
Time constraints (students) → No gaps for all students
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.
It sound fair if you use Max gaps per week for all teachers instead of different values to every single teacher by contraint 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 solveable 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.
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).
The activity ends day constraint is:
Time constraints (activities) → An activity 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.
If you need activity starts day, then use An activity has a set of preferred times and choose every 1st period as possible time.
The 2 activities are consecutive constraint is:
Time constraints (activities) → 2 activities are consecutive
Constraint consecutive mean that this activities are scheduled at the same day without any gap, break or an other activity between them.
The preferred time(s) constraints are:
Time constraints (activities) → An activity has a preferred time
Time constraints (activities) → An activity has a set of preferred times
Time constraints (activities) → A set of activities has a set of preferred times
preferred times are very powerful constraint, you can nearly do everything with them. Especially constraint A set of activities has a set of preferred times is very powerfull. It can care about activities with the same teacher, the same students, the same subject or the same subject tag. But don't forget, every activity has only one subject tag!
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 hour (any days)
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:
The not overlapping constraint is:
Time constraints (activities) → A set of activities are not overlapping
Activities with same teacher or same students or same room are never overlapping by default. (compare Basic compulsory time and room constraints). So this constraint is only needed in very special situations.
The Same starting time constraints are:
Space constraints (misc) → A subject has a preferred room
Space constraints (misc) → A subject has a set of preferred rooms
Space constraints (misc) → A subject+subject tag have a preferred room
Space constraints (misc) → A subject+subject tag have a set of preferred rooms
Space constraints (misc) → An activity has a preferred room
Space constraints (misc) → An activity has a set of preferred rooms
Just enter rooms if you know that there might be conflicts. So don't enter home rooms.
Check the teachers and students statistics before generating a timetable. You can check if all activities are (hopefully) added correct. It's also useful to check the statistics if you want to add some constraints. (like max days per week or max gaps)
Maybe not every timetable is solvable. Remove constraints if FET fail to find a solution.
Contact the author if you know that a solution is possible.
Don't add to many constraints at one time and always save with a new file name.
***lock activities ***who need it? Good example?
XXX
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