I need some help with the constraint 'Min hours daily per real day for all teachers'.
I have a pseudo-activity on an afternoon for a teacher meeting. However, some teachers show up on that day only for that meeting, so setting a minimum of 2 hours won't work.
Is there any elegant way around this?
Also, a general question regarding these daily/morning/afternoon minimums & maximums: Is there a reason why these constraints can only be chosen globally and nor for individual days?
I think you need to add multiple constraints for each teacher with a single click ("Add constraintS" button), then deactivate for the necessary teachers.
Not for individual days: I think nobody else in 20 years suggested this (maybe a user or two asked for a single day maybe). You can use activities occupy min/max time slots from selection, but you might need to add a lot of constraints.
Quote from: Liviu Lalescu on January 31, 2024, 12:11:06 PMI think you need to add multiple constraints for each teacher with a single click ("Add constraintS" button), then deactivate for the necessary teachers.
Thanks. I thought of that solution too. The problem is, then those teachers won't have the constraint on all the other days, which is necessary.
(Now you also see why I asked about the individual days...)
I solved it with this hack for the time being: I just extended the meeting to length 2 hours, but that's not really an elegant solution.
You could add a dummy activity (no students) for the teachers with only 1 hour on the meeting day, and constrain this dummy and the meeting to be grouped or same day.
Similar here: Always think about advantages and disadvantages.
I will exmplain with my data set.
We have over 50 teachers. But only 24 classes.
We also have a teacher meeting on Tuesday 7&8 hour.
So of course i don't need all at the same time.
Impossible to let them all work Tuesday in the 6th hour. Most of them will have free.
If i add a constraint like min 3 hours per day, then of course it will help to have them in school on Tuesday. So that is an advantage.
The disadvantage is, that it will increase the number of gaps, but it won't save the time to travel to school. So the wasted time on traveling to school will be the same, but the number gaps will be higher.
Without such a min 3 hours on Tuesday rule my data set might be in best case solve able without any gap for all teachers. As soon as i add such a rule like min hours on Tuesday, i know that at least have of the teachers ill have a gap in the 6th hour.
So if you add rules like that, you should always think about also what happens to the number of gaps for the teachers and if they can save travel time to school by that.
Yes, that is actually one of the biggest problems I see with this concrete schedule. On the one hand, teachers have to attend the meeting, so there is no reason why the meeting shouldn't be counted for gaps. On the other hand, Thursday (the day of the meeting) will inevitably have more gaps due to this, which will probably lead to a worse overall schedule when trying to minimize gaps.
That is why in an ideal world or if I programmed something like FET from scratch, I would include the possibility of having constraints like this (as an example): Limit gaps to say one per day for Monday-Wednesday and Friday, and set a different value for Thursday. (Instead of setting a global maximum for the week or for every weekday.)
Well, in fact the number of gaps will be higher, even if the min day rule is only on one day.
They could be higher, yes. But my strategy would be to set those constraints as hard constraints and then continuously lower the overall value (for individual or all teachers) until I reach the optimum.
Yes. Of course. But never the less it will be higher than without it.
It is more a psychological problem. Similar like the min 2 hours per day constraint. If you think closely about it, it is a stupid rule, since it might increase the gaps. In fact it doesn't matter if you are 2 hours at school or only 1. The travel time to school won't be reduced by that. So even most guys don't like only 1 hours per day, the real needed/wanted constraint is a lower max days per week.
But i admit that i also add min 2 hours per day rule, even in fact it is stupid to add it. But most guys don't understand it.
It is a bit like most guys think a mushroom is a plant. Even if you ask nature scientist they will tell you that a mushroom is more an animal.
Most guys don't understand it and so even nature scientist call it a plant if they talk with "normal" guys and they call it more animal if they talk to each other.
I completely understand where you're coming from. That is another thing I am only using because the teachers want me too.
In real life, a person who lives very close to the school probably for example won't mind if he has a longer break over lunch, so again in an ideal world different types of gaps could be weighted differently. Everyone cares about free whole or half days though of course.
Quote from: Liviu Lalescu on January 31, 2024, 12:20:12 PMYou could add a dummy activity (no students) for the teachers with only 1 hour on the meeting day, and constrain this dummy and the meeting to be grouped or same day.
Yes that's what I basically did, the meeting itself is a dummy. But it's not possible that two dummies occupy the same slot though, right?
Quote from: maxi_mus on January 31, 2024, 01:21:24 PMThat is why in an ideal world or if I programmed something like FET from scratch, I would include the possibility of having constraints like this (as an example): Limit gaps to say one per day for Monday-Wednesday and Friday, and set a different value for Thursday. (Instead of setting a global maximum for the week or for every weekday.)
There are solutions:
1. Add dummy activities (only a teacher), preferred times only on Thursday. Durations for each should be 1 FET hour.
2. A customization (which might be very tricky, and I am really afraid to add this to the official FET).
Quote from: maxi_mus on January 31, 2024, 01:49:08 PMQuote from: Liviu Lalescu on January 31, 2024, 12:20:12 PMYou could add a dummy activity (no students) for the teachers with only 1 hour on the meeting day, and constrain this dummy and the meeting to be grouped or same day.
Yes that's what I basically did, the meeting itself is a dummy. But it's not possible that two dummies occupy the same slot though, right?
Sorry, I don't understand. If two activities have different teachers and no students, they can be in the same slot.
The meeting is an activity with (almost) all teachers and no students. My trick was to extend this meeting to a second hour. I think what you are suggesting is basically the same.
Be careful if you use max hours per day at the same time. Since if you extend it from 1 to 2 hours, even it is only a single hour, it might procedure gaps for teachers if you are using a max hours per day constraint at the same time.
Quote from: maxi_mus on January 31, 2024, 02:06:54 PMThe meeting is an activity with (almost) all teachers and no students. My trick was to extend this meeting to a second hour. I think what you are suggesting is basically the same.
Hmm... I think not the same. Say the majority of teachers have 1 hour of another activity and 1 hour from meeting this day, and the exception teachers have only 1 hour on this day. Then you can add a meeting activity with all the teachers, and n_exception_teachers dummy activities. Do you understand my idea?
Yes, I understand. I don't think it makes a difference though (in this concrete example), because all the teachers that are available on Thursday will always have lessons anyway, so the dummy thing won't cause them to have too few lessons.
OK, but please also think of the gaps (there might appear one extra gap on Thursday).
The second dummy lesson is immediately after the teacher meeting, and there is no more school then (the teacher meeting ends all students days anyway), so there cannot be additional gaps. But this is of course a hack that only works in this specific situation, which is why I was searching for an alternative.
Oh, I wrote the alternative in my posts above?
I am not talking about a gap between the teachers meeting. I am talking about gaps between for example the 2nd and the 4th hour that might be placed only, because the teacher meeting is "too long" if teachers have a max hours per day constraint.
If you are using a max hours per day constraint for teachers and if you make the meeting longer, then this will force FET to produce gaps in teachers timetable and this also mean FET is forced to fill this gaps by other teachers and this mean FET will be forced to place gaps between that filled hours and the teacher meeting.
So if you use a teachers max hours per day constraint and you make the meeting "longer", then you will get probably much more teacher gaps.