FET Manual

Version 0.5
last modified 20.02.2008

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

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

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

Table of contents

Table of contents

Preamble

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

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

Important definitions are marked blue.

Useful hints are marked green.

Critical warnings are marked red.

Wise examples are marked yellow.

Liviu Lalescu (http://www.lalescu.ro/liviu/) started his project at the end of year 2002 as he was working on his diploma. He got his examination in computer programming (software specialization) in June 2003. FET had a very large palette of constraints (more then today!(December 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 timetables in a few minutes.

Table of contents

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.

Table of contents

Installing FET

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

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.

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 regularly. Especially if you add or modify constraints. FET doesn't have a undo option right now. Sometimes it's very difficult to undo the last modification. Also if FET didn't find a solution after several hours you maybe want to undo but already forgot last changes.

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

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 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 constrains 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!)

Table of contents

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

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

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.

You don't need to 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.

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.

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.
coursesubject (duration)
Biology
Chemistry
Physics
Biology (4), chemistry (1), physics (2)
Biology (1), chemistry (4), physics (2)
Biology (2), chemistry (1), physics (4)

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

Example 2: Secondary School
A German secondary school has years from 5 to 10. In every year are again several classes (groups). But the students can now choose a course (group category 2). So this students visit several same activities (but the number of activities is normally lower then the number of activities of a class)
splitting a year To enter this example add year 10. Then divide year 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).

coursesubject (duration)
christian religion
jewish religion
muslim religion
philosophy
christian religion (2)
jewish religion (2)
muslim religion (2)
philosophy (2)
The students have different religions in the same classes. So they have religion in courses.
If there is only one subject, then it the easiest (and 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 constraint A set of activities has same starting time (day+hour)). In most cases you just add the subject religion. It's clear if the religion is christian, jewish, muslim or philosophy, because you can see this by the teachers name.

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

Maybe you know that (by accident) no students is in Group 10A and 10Bio at the same time. You can delete the corresponding subgroups. You maybe get better timetables by this. But you need to do it only if 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

Table of contents

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 activities of courses are simultaneously? (Think about teachers and rooms!)

Table of contents

Add an activity

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

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

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

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

Subject 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 a course of the 4th category (compare section Years, groups and subgroups) and you don't want to add that category manualy, or 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.
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 possibe several variants, that doesn't differ in the timetable solution. They just differ in the visual printed timetable.
The sweetes timetables are printed if you add a new category. And add activities like always.
Variant two is to enter "all" activities just as one activity (like without room problems), add as many pseudo actvities (without a teacher and room) as rooms are needed and add constraint Same starting time to this activities.
Variant three is to add several activities. Each activity contain a teacher and one group. Add constraint Same starting time to this 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 teachers have more then one group in their 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.

Table of contents

Add a fortnightly activity

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

Using a workaround

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

If students are not allowed to have gaps, then fortnightly activities should get constraint activity ends day or constarint 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.

A teacher instruct an activity to group 1A in odd calender week and to group 1B in even calender week.
You can do it on two different ways.
The first way is to enter only one activity for this. Just add both groups into one activity. This imply, that "both" activities are scheduled at the same period.
The second way is to enter 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.
Again here are two different ways to enter this.
The first way is to enter only one activity for this. Just add both teachers into one activity. This imply, that "both" activities are scheduled at the same period.
The second way is to enter 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.
Again here are two different ways to enter this.
The first way is to enter two different activities for this. This will effect the best timetable if you have no room problems.
The second way is to enter 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.
This time there are three different ways to enter this.
The first way is to 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 second way should be used if you have room problems. There are two variants, that doesn't differ in the timetable solution. They just differ in the visual printed timetable. Variant one is to enter two activities and add constraint Same starting time to this activities. Variant two is to enter "both" activities just as one activity (like way 1), add a pseudo actvity (with no teacher and no room) and add constraint Same starting time to this activities.
The third way is to enter four different activities for this. This will effect that four different periods are needed! So in many cases this is not recommended. Especially if you have room problems.
The exact way
The exact way can maybe find a better solution, but is not recommended, because it's much more work. So entering the dataset and generating a timetable need much more time (at least 2 times).
You need to enter 2 weeks in the basic settings. Enter all activities 2 times. One time with subject tag "odd weeks" and the other time with subject tag "even weeks". The forthrightly activities are just entered one time. Set a constraint preferd time to activities with subject 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.

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

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

If you need special rooms for team teaching, then please also read section preferred room(s).

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

Table of contents

Basic compulsory time and room constraints

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

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

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

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

Table of contents

Not available teachers, students or rooms & breaks

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

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

This constraints must have weight 100%.

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

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

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 per week and increase weight of constraint Min n days between a set of activities up to 100%. Do it similar to every teacher. Be careful, because a teacher maybe work less days. Add constraint ***xxx activity preferd time and set period 7 and 8 are preferd at every day with weight 100%. Be careful if you use constraint Min hours daily, because activity lunch is a "normal" activity to FET.

Table of contents

Min n days between a set of activities

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

Read also section Add an activity.

A set of activities should be instructed on different days, but they must not instructed on different days.
Add constraint Min n days between a set of activities with weight under 100%.(This is done 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. Maximum 2 activities can be set consecutive at a single day by this constraint. So it is not possible that 3 splitted activities are instructed at only one day. In worst case you have 2 splitted activities consecutive at 2 different days.

coursesubject (duration)
nature science
industrial art
foreign language
biology (2), chemistry (2), physics (2)
industrial art (6)
French (4), Latin (2)
Be careful if 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 better to work at a project without many interrupts.
So think about conflicts like this as early as possible. Talk to the teachers, explain the problem and find an agreement. A maybe solution is this: The French teacher get 4 activities with duration 1 and 100% weight of constraint Min n days. This mean the the industrial art teacher "only" get a activity that is splited into 4 parts (two with duration 2 and two with duration 1). In the strict sense this activity doesn't need a constraint Min n days between, because the Min n days constraint of the French activity already care about that. FET also care about that Latin is directly instructed before or after French, because industrial art need duration 2. - Also have a look at the nature science now. This also mean it is impossible that all subjects have only 1 activity with duration 2. If physics and Latin is instructed by the same teacher then physics can never have 2 periods consecutive. If physics and French is instructed by the same teacher, then no nature science can have 2 periods consecutive.

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

Table of contents

max & min periods per day

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

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

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

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

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

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

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

Table of contents

max days per week

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

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

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

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

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

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

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

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

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

Table of contents

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

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

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

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

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

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

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

I need a contraint like min gaps per week.
There is no min n gaps per week constraint. But there are workarounds. Read previous examples. In short: Add pseudo activities and maybe also use constraint preferred times.

Table of contents

students early

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

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

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

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

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

Table of contents

activity ends day

The activity ends day 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. Also fortnightly activities maybe need this constraint (compare xxx***).

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.

Table of contents

2 activities are consecutive

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

Constraint consecutive mean that 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.

Table of contents

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 powerful. 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 preferd 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 an activity to every year with subject Mass and the priest as teacher. Use An activity has a set of preferred times. Select corresponding activities and select the first periods as preferred times.

Activities with duration 2 must (or should) start only in odd periods (1st, 3th, 5th, ...).
Use odd as 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.

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

Table of contents

Not overlapping

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

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

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

Table of contents

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 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+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. ***xxx mit ph lab kleiner 100%!

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

An activity is splitted into 4 activities per week. Only one of this activities need the computer lab and not the home room.
There are several variants. The first two one differ only in the visual output.
First variant: If you have no room problem, then just add the activity as normal and use constraint An activity has a preferred room to one activity (uncheck box?)
Second variant: You can do it with pseudo activities. The exact way depend on your special way of added room constraint. Please read also section Add a team teaching activity.
Third variant: If you have room problems, then the first variants are maybe not the best, because it occupy two rooms. You should add an activity with the group, one teacher and split it into only 3 activities. Add a second activity with the group and both teacher. Add this activity to the already existing min n days constraint. Care about correct room constraints of this activities. The exact way depend on your special way of added room constraint.
Table of contents

Statistics

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

Table of contents

Timetable

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

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.

View a timetable

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

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

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

Before releasing a timetable

I recommend to do four things:

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

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

How to change a running timetable?

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

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.

Teachers' Free Periods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Print timetables

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

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

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

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

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

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

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

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

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

You can (maybe) reduce (and increase) the size of tables very easily with a web browser. Sadly every web browser hide this feature at different places.
- Open the print preview of your web browser and check if you can toggle the scale.
- Got 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 automaticly 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, subject tags, rooms, table foot, ...)

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

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

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.

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.

Style the html files with css

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

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

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

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.

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 decleration. Save the css file again and reload the html file again. 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.

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.

Hide Elements

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

span.subjecttag {
 element: display:none;
}

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 valdidator. ( for example http://jigsaw.w3.org/css-validator/#validate-by-upload )

Table of contents

Settings

XXX

Table of contents

Help

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

Yours
Volker Dirr