Hello and thank you for this soft and discussion board..
How can I tell FET about the following constraints?
constraints:
SCHOOL:
- day has two (2) studying periods and one (1) lunch period
- A morning period from 08H00 to 12H00 , four (4) timeslots,each timeslot is one hour
- A lunch period from 12H00 to 14H00 students have to go home to take launch, no activity, school isclosing down.
- An afternoon period from 14H00 to 18H00. four (4) timeslots,each timeslot is one hour
TEACHERS:
- if a teacher has activities in a given day, he works only one period either morning or afternoon but never both;
- no gaps between timeslots
STUDENTS:
- can have lesson in the both periods;
- in a given period, no gaps between the timeslots;
The most important thing is that:
For Students and teachers:
- in a given period, minimum of adjacent timeslots with activity is 2, never one;
for students: Gaps between activities and lunch break are legal (acceptable gaps) ( for example, students can have lesson for two hours/activity in the morning and for two other hours at the afternoon, no matter where they are located, as long as the two mornin or afternoon activities are adjacents, consecutives)
Your data is too complicated to enter directly into FET.
I thought of something: make 2 timetables, one for the first period and one for the second.
Add constraints:
students no gaps
teachers no gaps
teachers min hours daily 2 (this means that in each working day they must have 2 hours - "intelligent" constraint)
students min hours daily 2 (but this means that they have lessons in each day, because the constraint is not "intelligent")
Decide which activities go in the first period and add them to the timetable data.
Decide for each teacher the maximum days per week in which he works in the first period - add constraints teacher max days per week.
Generate timetable - this is for the first period.
Select new file.
Now, see which teachers work in the morning and add constraints teacher not available to specify that they are not available in these days in the afternoon.
Now repeat the same steps as for morning.
Maybe you can obtain a feasible timetable, but you need to decide to split activities into 2 sets: morning and afternoon - choice is your's.
I have thought some more, and I found another possible approach (no need to split into 2 the activities - FET can do that):
Add 2*number of days, days 1..n correspond to morning and n+1..2*n corresponding to afternoon.
Drawbacks:
1) Students min hours daily is not intelligent, so all days must have at least 2 hours for each student. I can give you however a FET version just for you, with intelligent min hours for students (only a minor change in the sources, I have reasons not to include it in the official FET - it gives impossible timetables for other data).
2) You cannot say for each teacher that he wants to work only in the morning or in the afternoon each real day.
I'll think some more and let you know. Maybe you can also think of something to solve point 2).
I think you can do it with a single timetable.
Just do this:
add 12 periods (hours)
add 3 activity tags "morning", "lunch" and "afternoon"
add constraint activity tag preferd time with tag "morning" at all slots in the morning. similar with "lunch" and "afternoon".
add 10 dummy activities with all years (stundents), no teachers, subject "lunch" or "---" and activity tag "lunch".
that is needed because you want to add constraint students don't have a gap.
also this is needed, because teachers are only allowed to work at the morning or afternoon. so they have two gaps at lunch time.
i fear your teachers don't have gaps is pretty hard. (how do you want to substitude ill teachers if no one has gaps?) i recommend to start with allowing 1 gap. (if you need to allow more gaps, you also need to seperate the lunch time into more periods.)
now like liviu told: decide which activity should be in the morning and which should be in the evening. set this as activity tag.
i am not sure if my variant is to hard, because it mean a stundent can not have school from 08.00 to 12:00, then 2 hours lunch, 2 hours free and the last 2 hours school. also it is not possible that a students already have period from "11:00-12:00" free. maybe that constraint is to hard to you, but give it a try.
hmmm....
by thinking about it, it would be also possible to not differ between "morning" and "afternoon". so you only need activity tags "possible slot" and "lunch".
I have thought some more. I think the second solution I told you about is possible. I also can help you with providing custom made FET to allow intelligent students min hours and to specify that for all teachers, they must work either in the morning or in the afternoon.
many many thanks for prompt reply
QuoteI have thought some more. I think the second solution I told you about is possible. I also can help you with providing custom made FET to allow intelligent students min hours and to specify that for all teachers, they must work either in the morning or in the afternoon.
such a customised FET version will be very wellcomed
Now I will rty to understand your suggesed workarounds along with those of Volker Dirr
I think I was not so clear :(
Quote
1) Students min hours daily is not intelligent, so all days must have at least 2 hours for each student. I can give you however a FET version just for you, with intelligent min hours for students
I said:
The most important thing is that:
For Students and teachers:
- in a given period, minimum of adjacent timeslots with activity is 2, never one;
I had to add:
But free day/period is also OKin other words:
If FET schedule some activities for a teacher or a students on monday morning or afternoon, the minimum number of contiguous activity should be 2
But if FET didnot schedule any activity on monday, it will be ok also :)
So is there any constraint like this:
Minimum contiguous activity,
because a single hour/activity at morning or afternoon is not allowed
a photo is worth than 100 words
in the followings images, timeslot 5 and 6 are lunch break
Please, notice that gaps around lunch break dont matter, they are fully legal !! as long as minimum contiguous activity is 2 !!!
1- a "good" timetable sample for students:
(http://img239.imageshack.us/img239/7484/40601092sr3.jpg) (http://imageshack.us)
2- another "good" timetable for students:
(http://img239.imageshack.us/img239/4815/55983044aw8.jpg) (http://imageshack.us)
3- a third sample for students:
(http://img178.imageshack.us/img178/4634/54523130vq2.jpg) (http://imageshack.us)
4- this is even better for students:
(http://img526.imageshack.us/img526/8875/50991772gj6.jpg) (http://imageshack.us)
5- and finally some sample timetable sfor teachers:
(http://img149.imageshack.us/img149/3746/62929980he1.jpg) (http://imageshack.us)
6- and this is a more compact timetable for teacher:
(http://img526.imageshack.us/img526/8875/50991772gj6.jpg) (http://imageshack.us)
Yes, I understood correctly your problem. Min hours daily should be 2 for teachers and students. I'll make you a custom FET, with days: day FET 1 is real day 1 morning, day FET 2 is real day 1 afternoon, day FET 3 is real day 2 morning, day FET 4 is real day 2 afternoon, and so on.
The custom version I'll send you makes impossible for teachers to have lessons in FET day 1 & 2, in FET day 3&4... at the same time, and also makes possible for students to have no hours in a day and minimum 2 in other days.
To make a schedule better, with more hours per day for students/teachers, you can raise the number of minimum hours daily for a students set/teacher or for all from 2 to 3.
I have made a special version just for you. Links:
http://timetabling.de/download/custom/alfaromeo/fet-5_6_4-alfaromeo.exe
http://timetabling.de/download/custom/alfaromeo/fet-5_6_4-alfaromeo.tar.bz2
Please let me know your results/problems.
This custom version adds intelligent students min hours daily and automatic constraint that teachers cannot work in days 1&2, in days 3&4 ... at the same time (like you need). This constraint is not listed in the timeconstraints list.
Please read my other posts above (without the first one) to know how to input your data.
Please let me know if you succeed. If there are bugs, I will solve them.
Thnk you very much
really appreciate the help
I will give it a try
But I strill have two questions:
- does this version tolerate gaps eventualy located around lunch break ( eventualy located before or after lunch break)!?
in other words: can this version make distinction between illegal gaps located between morning or afternoon activities, and legal gaps located apound lunch break . I dont want FET to hang forever trying to eliminate those gaps
- a cosmetic concern: How can I join the two halfs days at final stage (printing) !?
Hi Volker_dirr
Quotei am not sure if my variant is to hard, because it mean a stundent can not have school from 08.00 to 12:00, then 2 hours lunch, 2 hours free and the last 2 hours school. also it is not possible that a students already have period from "11:00-12:00" free. maybe that constraint is to hard to you, but give it a try.
If you look at the images above, you will notice that this senario is legal
Quote
hmmm....
by thinking about it, it would be also possible to not differ between "morning" and "afternoon". so you only need activity tags "possible slot" and "lunch".
I will give it a try also
Best regards
Quote
- does this version tolerate gaps located around lunch break !?
in other words: can this version make distinction between illegal gaps located between morning or afternoon activities, and legal gaps located apound lunch break . I dont want FET to hang forever trying to eliminate those gaps
Yes, because FET sees 2*n days, each day is separate from the others. You just have to add max gaps per week teachers and students -> 0. Each day will have no gaps in this way, but it is allowed to have gaps between days.
Quote
- a cosmetic concern: How can I join the two halfs days at final stage (printing) !?
I think the first step is to obtain a good solution. Then, we can think of a solution to this.
Quote
Yes, because FET sees 2*n days, each day is separate from the others. You just have to add max gaps per week teachers and students -> 0. Each day will have no gaps in this way, but it is allowed to have gaps in between days.
sorry !! I am a little bit confused
If my understanding is correct, the day 1 is monday morning, day 2 is monday afternoon... and so on
Well, from the teacher's pointview, he will have lesson only in day 1 or day 2
my qusetion: how many hours shall I put in each "artificial" days? 4 hours or 10 hours (morning+lunch break+afternoon)?
Quote
You just have to add max gaps per week teachers and students -> 0
this means that students will never have lesson in both morning and afternoon in the artificial day 1 for example.
So I only have to put 4 hours/timeslots in each "artificial" day
Each artificial day (FET day) will have 4 hours. Forget about the 2 hour break, it is not needed anymore.
I added a constraint that days 2*i-1 and 2*i cannot have both hours for teachers only. Students are allowed to have hours in both days.
If you have 5 days with 4+2+4 hours (real life), then add 10 days with 4 hours per day in FET.
QuoteEach artificial day (FET day) will have 4 hours. Forget about the 2 hour break, it is not needed anymore.
...
If you have 5 days with 4+2+4 hours (real life), then add 10 days with 4 hours per day in FET.
ok :)
I get it now
Now I am in the process data input
I am also reading the very helpfull Volker_dirr's user manual...
In our school, we have no optional courses for students.
all the students from the same group/class attend the the same course in the same time
I am confused with this terminology : years, groups ,class... ::)
In our school, students are divided like this:
there is tree (3) years / grades
- year 1 (has two categroie)
- categorie/option : scientific ( we have 3 groups or class)
- categorie/option : littracy ( we have 2 groups or class)
Year 2 (has two categorie also)
- categorie/option : scientific ( we have 2 groups or class)
- categorie/option : littracy ( we have 2 groups or class)
Year 3 has 4 categorie
- categorie/option : languages ( we have 2 groups or class)
-categorie/option : humanities ( we have 2 groups or class)
-categorie/option : physics ( we have 1 groups or class)
- categorie/option : biology ( we have 1 groups or class)
How to input this ? I mean is my terminolgy compatible with FET terminology ?
I think it is compatible.
Define:
Year1
contains 5 groups (3+2)
Year2
contains 4 groups
Year3
contains 2+2+1+1 groups
This only if I understood correctly and groups are independent.
You can add manually groups or divide each year according to only one category, in which specify 5 divisions for year1, 4->y2 and 6->y3.
I have added the alfaromeo custom files to:
http://lalescu.ro/liviu/fet/download/custom/alfaromeo/
as a mirror. It is better to use it this way, because if I change it, you will be able to browse the directory and get latest version. On timetabling.de it is not possible to see a whole directory, it is needed to give the exact link of the files. On lalescu.ro, I can give the name of the directory.
ok
did you put in any modification for joining days
because we have to publish timetable in our school tommorow afternoon, and I am afraid I could not join the days by editing the html code into every studentés and teacher's timetables
No, I didn't make these changes, the file is the same you used a time ago.
I am very sorry, but I could not modify the html export part. Also, you said that we should wait for your answer to tell us which files you can use and which one you really need. I told Volker that he must not work until we get an answer from you.
But I suggest this: copy tables and paste them into OpenOffice.org Calc or in MS Excel. Then you can cut+paste the information (insert rows, then cut each second day and paste it below first day).
LATER EDIT: Or you can use some macros in OO.o or Excel or use some formulas. There are many possible tricks in Excel or OO.o to make what you need.
I am mainly intersted in
- fet_teachers_timetable_days_vertical.html
- fet_groups_timetable_days_vertical.html or fet_subgroups_timetable_days_vertical.html
I am sorry, but I cannot help you. I am very tired and I cannot follow the html exporting part of FET.
I advise you to copy/paste in OpenOffice.org. I tried for a timetable and it works. You'll get a a cell for each time slot. Then it is easy to copy/paste by hand the portions, because you have few teachers and students. Or you can write some formulas if you know them.
Maybe Volker can help you, but he has classes tomorrow and he might be busy.
I'll go to sleep now, I might though recheck your messages in an hour, if my sleep won't be so tight.
By copy/paste I mean: open in Firefox (or MSIE or Opera might work), then select the needed tables, then Ctrl+C, then paste in OpenOffice.org (Excel might also work). You'll have a cell for each time slot, exactly like you need.