Min hours for teacher for specific days

Started by ayreon, September 13, 2020, 08:58:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ayreon

Hi,
I need to do the following: I have set min hours for all teacher to 2 but I want for some teacher and only for some particular conditions to have a higher number (for example 3).
The condition is that a teacher works in a specific hour of a specific day but I can only consider the day. So if a teacher works on Monday I want to have min hours 3, while I accept 2 on other days.
Of course I cannot set 3 for every days or I get an impossible timetable.
Is there a way to do this? Will a new constraint of this type be implemented easily?
The reason is that the last hour of Monday is somehow fake (it is done from home) so I don't want teachers to come only for a single hour in that case and modeling this last hour as a transfer in a new building or a new day doesn't solve the issue because it's a single hour (I could create a secon fake activity but then not all teacher works in that hour so I have to create two to have min hours respected, so it will be heavily complicated). Is there an easy way I don't see?
Thanks.

Liviu Lalescu

Hello,

In the official FET, you can add for each teacher a constraint activities occupy min time slots from selection: add all the activities of that teacher, select all slots of Monday, min occupied = 3. But this does not allow free Mondays for this teacher.

A customization to allow empty Mondays might be possible, but I am not sure it is easy.

ayreon

Hi, thanks for the reply and for the hint.
Not having Monday as free day is not a problem, I managed to solve my timetable with your suggestion doing this way:
- First I generated a first time table and lock all activities
- For teachers who got only two hours on Monday I set your suggested constraint and unlock his/her activities, so not having Monday as free day is not a problem since they haven't got it in the first place
- I unlocked activities for teachers who teaches in the same classes
- Generated again
And I got what I wanted.

Thanks :-)

Liviu Lalescu

Interesting approach! I am not sure the second-phase timetable is always possible, though.

You are welcome!  :)

ayreon

No, of course, you have to carefully select activities to unlock and when timetable is impossible you continue to unlock related activities expanding days or/and teachers. But for a couple of teachers it could be done, not more 😉

Volker Dirr

An other variant might be working just placing 3 fixed activities on that day.
But i wonder a bit why you need such a constraint. Can you please explain an example why such a constraint is useful?

Liviu Lalescu

Quote from: Volker Dirr on September 15, 2020, 09:06:24 PM
But i wonder a bit why you need such a constraint. Can you please explain an example why such a constraint is useful?

Please read ayreon's initial post.

Volker Dirr

#7
hmm... it is done at home: why not using teacher not available constraint?