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/
Table of content
Preamble
FET is free software for automatically scheduling the timetable of a school, high-school or university.
It uses a fast and efficient timetabling algorithm.
It is free software, open source, licensed under GNU/GPL.
Get the latest news and version from the official FET homepage (http://www.lalescu.ro/liviu/fet/).
This is a small manual with 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.
Features
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.
- Time constraints (misc)
- Basic compulsory time constraints
- Break (all teachers+all students not available)
- Time constraints (teachers)
- A teacher is not available
- Max days per week for a teacher
- Max gaps per week for a teacher
- Max gaps per week for all teachers
- Max hours daily for a teacher
- Max hours daily for all teachers
- Min hours daily for a teacher
- Min hours daily for all teachers
- Time constraints (students)
- A students set is not available
- No gaps for a students set
- No gaps for all students
- A students set begins early
- All students begin early
- Max hours daily for a students set
- Max hours daily for all students
- Min hours daily for a students set
- Min hours daily for all students
- Time constraints (activities)
- An activity has a preferred time
- An activity has a set of preferred times
- A set of activities has a set of preferred times
- Min n days between a set of activities
- An activity ends students day
- A set of activities has same starting time (day+hour)
- A set of activities has same starting hour (any days)
- 2 activities are consecutive
- A set of activities are not overlapping
- Space constraints (misc)
- Basic compulsory space constraints
- A subject has a preferred room
- A subject has a set of preferred rooms
- A subject+subject tag have a preferred room
- A subject+subject tag have a set of preferred rooms
- An activity has a preferred room
- An activity has a set of preferred rooms
- Space constraints (rooms)
Installing FET
TODO: requirements
TODO: same like readme. (really write it twice? Maybe short the readme and write long version here?)
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.
File
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.
Data
The data contain the Basic settings, Activities and Constraints.
It doesn't include the generated timetable solution.
Basic setting
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.
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 ...).
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.
Your institution has activities with 90 minutes duration on Monday, Wednesday and Friday
but only 60 minutes duration on Tuesday and Thursday.
Call the periods like in example 1, 2 or 3.
But you (not FET) have to know that every period 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.)
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!)
Teachers, subjects, subject tags & rooms
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.
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 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.
Class (division of the first category): A set of students who meet (nearly always) the same activities.
FET avoid using the term class, because this term is used different in colloquial language.
Depending on the context a students say that he visit class A or class 1 or class 1A.
In this example FET will call 1 as year, A as division of a category and 1A as group.
Example 1: Primary School
A German primary school has 4 years.
But there are different number of groups (classes) (depending on the number of students per year).
For example Group 1A, 1B, 1C, 2A, 2B, 2C, 3A, 3B, 4A, 4B.
To enter the first year of this example add year 1. Then divide year automaticly by selecting categories.
Increase number of divisions up to 3 and call them A, B and C in the first category.
Now check the groups to see what happen.
To avoid space between year and category name just remove the space of the separator character(s) in the divide year automaticly by selecting categories.
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.
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)

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) |
The students have different religions in the same classes. So they have religion in courses.
If there is only one subject, then it the easiest (and in (nearly) 100% filled timetables the only possible solution) to scheduled all at the same time.
There are several possibilities to do it (compare
add an activity and contraint
A set of activities has same starting time (day+hour)).
In most cases you just add the subject
religion.
It's clear if the religion is christian, jewish, muslim or philosophy, because you can see this by the teachers name.
Think about needed categories first. The first category should always be the class.
The second and third category should be the categories with the longest total duration.
Other categories must be done manually or by the hint simultaneous activities.
Maybe you know that (by accident) no students is in Group 10A and 10Bio at the same time.
You can delete the corresponding subgroups. You maybe get better timetables by this.
But you need to do it only if 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!
Example 3: High School
TODO
Example 4: University
TODO
Activities
An activity contain normally a subject, one (or more) student set, one (or more) teacher set and a duration.
It can also contain a subject tag and/or a number of (sub)-activities.
Also pseudo activities are possible. (They don't have any teacher or student)
Prearrangement
Before adding activities you need to do a planning. Currently FET doesn't help you with this.
So you already need to think about all activities.
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?
add an activity
To add an activity you just need to add (double click with the mouse, or select and press enter) students, subject and teachers.
Normally an activity contain 1 teacher, 1 group and 1 subject.
You should always enter the number of hours that this activity is instructed.
The Min n days between a set of activities constraint is one of the most important constraints.
So this constraint is added automaticly with (nearly) every added 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 sport is instructed 3 periods per week.
One activity should have duration 2 and the other activities must have duration 1 at other days.
Add the teacher, the group, the subject, split this activity into 2 activities per week, increase duration of the first sub activity up to 2, modify weight up to 100 and add the activities.
Subject 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, increase duration of the first sub activity up to 2, maybe modify weight under 100% and add the activities.
Subject native language is instructed 4 periods per week. The periods should be at different days, but they most not be at different day.
If they are at the same day they must be consecutive.
Add the teacher, the group, the subject, split this activity into 4 activities per week, keep weight 95% (or modify like you want), check the force consecutive box and add the activities.
Subject religion is instructed 2 periods per week.
It should be instructed on different days.
Maybe religion is the 4th category (compare section
Years, groups and subgroups),
but you was to lazy to add an other category or your timetable is (nearly) 100% filled, so it's clear that this activities must be simultaneously.
You also know that there will no room problems.
(If you fear room problems, then please read *** same starting time!!! Hier noch leere Aktivitäten)
Add the all religion teachers, the year (you can also add all groups, but that will flood the printed timetable with too much information), the subject, split this activity into 2 sub activities per week, keep weight 95% (or modify like you want) and add the 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.
Constraints
Weights of constraints
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.
Every constraint slows down finding a solution.
So just add needed constraint.
For example if your timetable is (nearly) 100% filled you (maybe) don't need to add a constraints min or max periods per day.
How to do a good and correct weight?
In my opinion nearly all constraints should have weight 100%.
Especially constraints that have an other maximum value (like max days/periods/gaps).
The
Min n days between a set of activities constraint is a little bit tricky.
It should be always 100%, only course activities in 100% filled timetables should have sometimes lower values.
Read section
Years, groups and subgroups and
Min n days between a set of activities to understand why.
So of course it's a nice idea to write down a list of all needed constraints and order them by importance.
But I do not recommend to set weight to 100% to the most important constraint, maybe 99% to the second important constraint and so on until the last one.
I recommend to add all constraints step by step with weight 100% (except a few
Min n days between a set of activities constraints).
If you add a constraint with an other value (like max days/periods/gaps) then also use weight 100%, but use a high value.
After all constraint are added and if FET is still able to find a solution, begin decreasing the max days/periods/gaps values.
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.
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.
Normally this constraints need weight 100%. Because you can not choose if someone is available or not.
A teacher is teaching at an other school on Wednesday and Thursday.
A students set has industrial placement at an other institution on Monday period 1 and 2.
Add constraint
A students set is not available.
In the students timetable is only
--- displayed.
You can also add an activity with subject
industrial placement, no teacher, duration 2 and the corresponding students set.
Add a constraint
An activity has a preferred time for this activity on Monday 1st hour.
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 and increase weight of constraint
Min n days between a set of activities up to 100%.
Do it similar to every teacher. Be careful, because a teacher maybe work less days.
Be careful if you use constraint
Min hours daily, because activity lunch is a "normal" activity to FET.
Min n days between a set of activities
This constraint is:
Time constraints (activities) → Min n days between a set of activities
Read also section add an activity.
A set of activities should be instructed on different days, but they must not instructed on different days.
Add constraint
Min n days between a set of activities with weigth under 100%.(This is done automaticly if you
add an activity).
So in favoured case all activities are instructed at different days.
In worst case all constraints are instructed at only one day.
A set of activities should be instructed on different days, but they must not instructed on different days.
But if they are instructed, then they must be instructed consecutive.
Add constraint
Min n days between a set of activities (This is done automaticly if you
add an activity) and check the
force consecutive box.
So in favoured case all activities are instructed at different days.
It can never happen that all activities are instructed at only one day, because only 2 activities can be set consecutive at a single day.
So it is also not possible that 3 activities are instructed at only one day.
In worst case you have 2 activities consecutive at 2 different days.
course | subject (duration) |
nature science industrial art foreign language |
biology (2), chemistry (2), physics (2) industrial art (6) French (4), Latin (2) |
Be careful if you have a (nearly) 100% filled 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 a better to work at a project without many interrupts.
So think about conflicts like this as early as possible.
Talk to the teachers, explain the problem and find an agreement.
A maybe solution is this: The French teacher get 4 activities with duration 1 and 100% weight of constraint Min n days.
This mean the the industrial art teacher "only" get a activity that is splited into 4 parts (two with duration 2 and two with duration 1).
In the strict sense this activity doesn't need a constraint Min n days between, because the Min n days constraint of the French activity already care about that.
FET also care about that Latin is directly instructed before or after French, because industrial art need duration 2. - Also have a look at the nature science now.
This also mean it is impossible that all subjects have only 1 activity with duration 2.
If physics and Latin is instructed by the same teacher then physics can never have 2 periods consecutive.
If physics and French is instructed by the same teacher, then no nature science can have 2 periods consecutive.
If you do your cover planing you must also carefully think about constraint Min n days between a set of activities (Normally not in the classes (category 1),
but in the courses (category 2 and above)).
max & min periods per day
The max & min periods per day constraints are:
Time constraints (teachers) → Max hours daily for a teacher
Time constraints (teachers) → Max hours daily for all teachers
Time constraints (teachers) → Min hours daily for a teacher
Time constraints (teachers) → Min hours daily for all teachers
Time constraints (students) → Max hours daily for a students set
Time constraints (students) → Max hours daily for all students
Time constraints (students) → Min hours daily for a students set
Time constraints (students) → Min hours daily for all students
Constraints max and min periods per day for students are useful if you want a balanced day.
Group | activities 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 use a 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.
max days per week
The max days per week constraints is:
Time constraints (teachers) → Max days per week for a teacher
Of course if the contract of employment guarantee a max number of days per week, then this is an important constraint.
A timetable is not solvable if you add constraint max days per week with only 3 days and weight 100%
if the same teacher instruct a set of 4 or more activities that have constraint Min n days between a set of activities with weight 100%.
Be careful! Most activities have this constraint (compare add an activity).
I recommend to check this constraint again after all other constraint are added, most of them already have weight 100% and FET is still able to find a solution.
Most teacher like a free day. Check the teacher statistics.
Check if a teacher is able to (maybe) get free day.
So the number of periods per day of the teacher must be lower or equal then the number of periods per week of the timetable minus the number of periods per day.
Also check if a lower number of working days doesn't controvert to a constraint (especially a constraint Min n days between a set of activities).
Add constraint Max days per week for a teacher with weight 100% if nothing argue against it. Don't add to many constraint at one time.
Maybe begin with the teacher that instruct the lowest number of periods per week.
Check if the timetable is still solvable. Add the next teacher if it is still solvable.
Remove the constraint if the timetable is not solvable and try to add the following teacher.
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.
About gaps per week
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
A gap is an unused timeslot (or several) between two activities, between an activity & a break or between two breaks.
That mean for example unused timeslots in the first and last period are no gaps; a break is not a gap.
The law of many countries rule that students of primary and secondary schools don't have a gap.
Add constraint No gaps for all students with weight 100%.
The upper years are allowed to have gaps, but not the lower years.
Add constraint No gaps for a students set to the lower years.
A few students are allowed to have one gaps.
Add an activity with subject “free”, no teacher and duration 1.
You can use other constraints to be more precisely
(Depending on or wishes you can use constraint
subject preferred times with weight 100% at the first and last periods;
or constraint
subject preferred times with weight under 100% at all periods between the first and last periods.)
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.
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.
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.
I need a contraint like min gaps per week.
There is
no min n gaps per week contraint. But there are workarounds. Read previous examples.
In short: Add pseudo activities and maybe also use constraint
preferred times.
students early
The students early constraints are:
Time constraints (students) → A students set begins early
Time constraints (students) → All students begin early
A students day will always start in the first period with an activity
if you use this constraint (except you also used a constraint like in section Not available teachers, students or rooms & breaks in the first period).
Most students come to school by bus.
But it arrive only at the first period and students are not allowed to have gaps.
Add constraint All students begin early with weight 100%.
Most students come to school by bus, it arrive only at the first period.
The lower years are not allowed to have gaps. But the upper years are allowed to have gaps.
Add constraint A students set begins early to the lower years with weight 100%.
Most students come to school by bus,
it arrive only at the first period and students are not allowed to have gaps.
The bus bring them back only after fourth, fifth and sixth (last) period.
activity ends day
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.
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 your timetable is (nearly) 100% filled.
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.
If you need activity starts day, then use An activity has a set of preferred times and choose every 1st period as possible time.
2 activities are consecutive
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.
Students have subjects mathematics listening first and directly after this activity they should have mathematics practise by an other teacher.
Add constraint 2 activities are consecutive to this activities.
preferred time(s)
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 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 An activity has a set of preferred times.
Do it only with half of the main subject activities.
Select activity perferd times period 1 to 4.
By this constraint it can't happen that all activities are instruced 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 one activity per main subject.
If the timetable is still to easy to solve you can maybe thing about also doing it with other activities or only from period 1 to 3.
But be careful. Some activities still must be able to schedule late!
Adding this constraint is faster if you just do it one time, open the FET datafile with an editor and add all other activities just by copy always the same and modify only the id.
An external teacher come at a special period to your school.
Use An activity has a preferred time.
All students should be able to celebrate Mass in the first Period except Friday.
Add a 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.
You need a fortnightly timetable.
Use Week 1 or Week 2 as subject tag to every activity and add to both subject tags a constraint A set of activities has a set of preferred times.
Activities with duration 2 must (or should) start only in odd periods (1st, 3th, 5th, ...).
Use odd as subject tag and add a constraint A set of activities has a set of preferred times.
Activities must (or should) be instructed only in the morning (or in the evening).
Use morning(or evening) as subject tag and add to both subject tags a constraint A set of activities has a set of preferred times.
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 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 a other teacher is team teaching.
So you can't just add this teacher to the activity, because in the other 3 periods he should teach somewhere else.
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.
Not overlapping
The not overlapping constraint is:
Time constraints (activities) → A set of activities are not overlapping
Activities with same teacher or same students or same room are never overlapping by default.
(compare Basic compulsory time and room constraints).
So this constraint is only needed in very special situations.
There are 2 very important guys with a special skill.
You know that one of them is sometimes away (or ill) and the other guy need to represent the other.
Of course that is only possible if he have no activity at the same time.
Use constraint A set of activities are not overlapping and
preferred room(s)
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.
Subject chemistry must always be instructed in the chemistry lab.
Add constraint A subject has a preferred room if you have just one chemestry room.
Add constraint A subject has a set of preferred rooms if you have several chemestry 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+subject tag have a preferred room.
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 subject tag room needed to all biology activities of year 7 to 10.
Add contraint A subject+subject tag have a preferred room with weight 100%.
Add constraint A subject has a preferred room with weight under 100%.
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 ways to solve this problem.
Both are very similar, but depending on your exact dataset one of them is (maybe) much better and/or easyer to enter:
1. Solution: 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)
2. Solution: Write down all smallest groups.
Add A set of activities has same starting time (day+hour) to connect 3 small sport activity groups together.
Statistics
Check the teachers and students statistics before generating a timetable.
You can check if all activities are (hopefully) added correct.
It's also useful to check the statistics if you want to add some constraints.
(like max days per week or max gaps)
Timetable
Maybe not every timetable is solvable. Remove constraints if FET fail to find a solution.
Contact the author if you know that a solution is possible.
Don't add to many constraints at one time and always save with a new file name.
***lock activities ***who need it? Good example?
Settings
XXX
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