three teachers must guarantee presence of 1 or more of them in each hour of the timetable (medicine subminstration in emergency case)
which constraints may I set up to obtain it?
many solutions for this.
i do it at my school with a room. so maybe call the room "Emergency" or something like that.
then add the activities of the teachers. of course with space constraint for the "Emergency" room.
since there can only be one activity per room, the teachers emergency activities will never overlap.
thanks Volker, but my activities will overlap for sure, since each teacher(they are 3) works 19 hours per week and timetable has 37 slots.
So each hour of week must have 1 or more teachers, not exactly one.
also no problem.
you need to add 2 rooms then.
maybe call is subject "emergency" and use subject preferred roomS. (both rooms)
so you have 3*19=57 hours emergeny.
and you have got 37 hour * 2 rooms = 74 hours for rooms.
so you will have max 2 teachers per timeslot.
in worst case it migth happen, that a timeslot is without teacher.
if you want to avoid that, then you need to add 74-57=17 dummy activities. maybe all it subject "dummy".
the highly need constraint is, that the dummy subject is only allowed in ONE of the emergency rooms.
by this you will get at least 1 teacher, but max 2 teacher for emergency in your whole timetable.
Quote from: flauta on September 12, 2016, 08:49:16 PM
three teachers must guarantee presence of 1 or more of them in each hour of the timetable (medicine subminstration in emergency case)
which constraints may I set up to obtain it?
So at least one of the three teachers must have activities at each time slot?
This is not done in FET. You might use constraint activities max simultaneous in selected time slots, but I am not sure.
Quote from: flauta on September 12, 2016, 08:49:16 PM
three teachers must guarantee presence of 1 or more of them in each hour of the timetable (medicine subminstration in emergency case)
which constraints may I set up to obtain it?
Quote from: flauta on September 12, 2016, 09:37:19 PM
thanks Volker, but my activities will overlap for sure, since each teacher(they are 3) works 19 hours per week and timetable has 37 slots.
So each hour of week must have 1 or more teachers, not exactly one.
A perfect solution might not be possible with current FET. Maybe adding a new constraint, but it is difficult.
Maybe this would be an acceptable compromise, considering those numbers above:
Add a constraint activities max 2 simultaneous in selected time slots, slots selected = all slots but without a single time slot in which you consider three activities might be put, activities = all activities of the 3 teachers (so this constraint will select 37-1=36 slots). Then another constraint, max 3 simultaneous in selected time slot = the single one, all activities of the three teachers. It might work because 19+19=38.
I'll try to think of other better solutions.
Liniu. My solution with the room is perfect already. (The only disadvantage is, that ouy need to add the dummy activities.)
If you (Liviu) want to check it, then see my timetabledata (version 80) and check subject "VR".
sorry Volker, maybe I don't understand well your proposal, or maybe I didn't explain
that these 3 teachers don't give additional hours to cover the emergency: they cover it
with their simple presence in school, while they are teaching in normal classrooms.
So how can I assign them the dummy activity/room in the same hours of their subjects teaching?
There might be possible a new constraint, activities occupy min time slots, but it looks not easy at all. I will add this in the TODO.
i thought they cover with each 19 hours. let me know the number of hours they should stay at school with their presence (so they might cover in emergency), since i do the same trick here. we call it "substitution reserve". i just place them into a room. by that i get at least 1 hour cover per slot and max 2 hours cover per slot.
if you say "they shouldn't get hours for that"; just use the gaps; then in fact you might do that also (depeding on the numer of slots in your timetable):
use the FET -> Time Constraints -> Activities -> max simoltanious from a selection. Select all slots and all activities of that 3 teachers. set max 2 activities at the same time.
but i highly don't recommend it:
- depending on your dataset (number of slots per week) it might happen that all 3 guys have got a free day. that might be allowed. so who should come to school? in a bit "better" (but still bad timetable) similar stuff might happen and effect a high number of gaps for that teacher.
- your request might be not allowed by law, since those hours must be paid. (in germany it is only allowed if you pay for "stay at school/forced gaps" hours. You must try to avoid them.
- if there is now law in your country or if that number of hours is already included in their contract, then i suggest to give them the same number of hours for substitution reserve
I thought of this:
Add many constraints activities occupy max time slots from selection. n_hours_per_week of them (a lot). Each one will make a slot have at least an activity from the necessary ones.
For instance, for Monday first hour, select all other slots with X, select all activities, max occupied = n_hours_of_all_3_teachers - 1.
Please let me know.
Thanks Volker and Liviu
I can't say I understood well your last proposal Liviu, but the suggestion of Volker about the "emergency rooms" was sufficient for me
and the timetable now is wholly covered.
about the concerns of Volker on free days: that can't happen, since my school is opened only 5 days and all teachers work all 5 of them
thanks again
I'm sorry, my so-called solution is wrong. It's good that Volker's works. Sorry!
Hello, flauta,
After a long time, I could implement the constraint activities min simultaneous in selected time slots. I hope it will work for you.
I am still testing it, but I am almost sure it will make its way in the new FET-5.41.0. I will announce in the Snapshots section of the forum the new snapshot and in the News and announcements the new version (hopefully released in at most 1-2 weeks from now).
Thank you for suggesting it!