Main Menu

Dinner pause

Started by Zsolt Udvari, November 24, 2008, 08:08:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zsolt Udvari

It doesn't important (yet, until summer of 2009 ;) ), but I want to know a solution the follow.
So, the teachers in our school work at 8:00-14:20 (named hours 1, 2, ...7), so it would be nice when teachers've a dinner pause, one of 5., 6. or 7. hour.
Imho the creation of a virtual subjects (DinnerMon, DinnerTu,... and create its time slots) isn't the best solution, because when I add a "Max hours continuously for a teacher" or "Max hours per day", the Dinner* counts in.
If this is impossible, this will be a feature request ;)

Liviu Lalescu

I cannot think of a good solution. I think the best is to use the dummy activities and hope that FET will find a good solution even with max hours continuously.

There could be added more solutions, but neither one is universal and easy to understand for the other users.

I'll think about it.

Liviu Lalescu

I have thought about it.

With max hours daily, it is easy: you have one additional hour each day (this dummy activity).

With max hours continuously: why do you still need this constraint? Because the teacher already has a pause (the dummy activity) at the right moment.

It is quite difficult to add this constraint and to express the name of a new constraint.

Please let me know your opinion.

Zsolt Udvari

QuoteWith max hours continuously: why do you still need this constraint? Because the teacher already has a pause (the dummy activity) at the right moment.
No, you don't understand, what I want say. So, e.g. the max hours continuously let e.g. 5 hours. And when the teacher has similar day:
1. <none>
2. foo1
3. foo2
4. foo3
5. foo4
6. <dinner pause>
7. foo5

This is "bad", because the continuously hours are 6 (FET says, because we add a plus subject). But in real: the teacher has only 4 continuously hours (2-5), a pause/break, and the last one.
So this reduces the number of "good timetables".

Some teachers don't like the 6 continuously hours (they aren't young and they'll be tired soon), so this isn't solution (drop the continuously constraint).

Liviu Lalescu

I meant that you can get rid of max hours continuously if you have dummy activities, because these dummy activities are in the middle of the day and it becomes impossible for teachers to have 6 hours continuously.

If you have a situation like:

Math
Math
Math
Math
Math
Math
Dummy pause
...

then it is not OK with what I said, but I doubt that this will be possible in your timetable.

For teachers which have no dummy lunch activities, add constraint teacher max hours continuously.

Am I not right?

Zsolt Udvari

#5
QuoteAm I not right?
Imho partially. In my case yes, but in generally, no.
Why? I set the max hours continusly to 6, and the teachers of our school has max 7 hours.
But when I set the max hours continusly to 5, it doesn't work, see the example:
1. foo
2. foo
3. foo
4. foo
5. <dinner pause>
6. foo
7. foo

FET says that this is bad, but we know, that this is good, because of 5. hour is a "pause".

So in my case works: I'll clear this constraint, but in general case doesn't work.

Liviu Lalescu

#6
Quote
So in my case works: I'll clear this constraint, but in general case doesn't work.

Yes, I know that in the general case it does not work. But the general case is very unlikely to appear.

Your request is very difficult to add into code and difficult to describe in words (to make a new FET constraint).

The main purpose is for any user to be able to generate a good enough timetable. If the user manages to trick a bit the impossibilities, by adapting to the currently working constraints, this is good. If a user cannot adapt to these situations and he cannot obtain a good timetable, then I am forced to implement this into official FET or in a custom version.

But your request is difficult, because I didn't consider it from the beginning. Now, changing all the code is not nice, because I have to forget about the stability and matureness of current code.

A solution to your request would be to modify the constraint teacher not available times, to have alternative times. This is very difficult.

Another solution would be to make constraint teacher(s) max hours daily and continuously and min hours daily consider that a particular subject (say, DINNER) is to be considered as a break. As I think now, this is not impossible, though some hard work.

This last approach cannot be added into official FET. How to explain the user that some subjects are reserved? What subjects to reserve? I doubt that many users know about the trick with dummy activities for teachers' breaks.

If you really need this facility, I could try to make you a custom version (with this last approach - subject say "DINNER" is considered a break by some constraints. Please let me know. But if you can obtain a good timetable without this, I would prefer not to do it. I am now reading new algorithms, which might have a better purpose than customizing for a very rare situation. Also, there are other things to do in FET which would bring benefit for much more people, like the spreading of activities which I added a time ago and which is not perfect yet.

Zsolt Udvari

OK. I think this trick will be enough for me.