Max consecutive gaps per day for all teachers (and for a teacher)

Started by Wizard, November 27, 2013, 08:24:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Wizard

Hi!
I use max gaps per day for all teachers and set it to 3, but I sometimes get 3 consecutive gaps in one day, which is too much. FET has constraint "max hours continuously per day for all teachers", is it easy to implement a similar constraint for gaps like "Max gaps continously per day for all teachers" so as to use it together with max gaps per day for all teachers? Or is there an easy way to achieve what I want (max 3 gaps per day, but 2 max consecutive gaps)?

Liviu Lalescu

Maybe it is possible with some tricks:

Add for each possible gap an activity with activity tag "Gap". Then max hours daily with an activity tag "Gap" set to 3 and max hours continuously with an activity tag "Gap" set to "2" and max gaps set to 0.

Take care so that teachers have enough slots to agree with these fake activities (I am not sure about your data).

Wizard

What do you mean by "for each possible gap"? A teacher might have 0 gaps. I don't want to "force" gaps.
Do you think it's difficult to add this as a constraint in future FET versions?

Liviu Lalescu

Quote from: Wizard on November 28, 2013, 08:13:38 AM
What do you mean by "for each possible gap"? A teacher might have 0 gaps. I don't want to "force" gaps.

You don't force gaps, because fake activities might be scheduled in the first or last hours. But there must be enough space for this.

Quote
Do you think it's difficult to add this as a constraint in future FET versions?

Yes, I think it is difficult, that is why I tried to devise some tricks.

Wizard

OK, let me see if I understand. If a teacher teaches 21 hours per week and and all the working hours are 35, I create a fake activity for this teacher with 14 hours per week and then use max hours daily (3 hours), max hours continuously (2 hours) and max gaps set to 0, right? And I have to do this for every teacher, correct?

Liviu Lalescu

Yes, you put it even better than me. And max gaps = 0 is useless now.

When adding the fake activity, choose min days distance = 0 (no constraint min days added).

Wizard

Ok, thanks  :) And do I have to split this activity into 5 (for each day)? What exactly does min day 0 mean?

Liviu Lalescu

Quote from: Wizard on November 28, 2013, 12:51:00 PM
Ok, thanks  :) And do I have to split this activity into 5 (for each day)? What exactly does min day 0 mean?

Split into 14 (in your example), each with duration 1. Min days 0 for the constraint min days between the activities when adding the activity. (It is a field there.)

Wizard

Ah, I see! Thank you so much for a wonderful application!  :) :)

Liviu Lalescu

You're welcome!

There is another possible problem remaining: if you use teachers' max hours daily/continuously -- fake activities add to the real activities. But I think this is not the case.

Wizard

Yes, I thought of that too, but I'm not using it. I assume that since these fake activities are not connected to a specific group of students, than the time slots that these activities occupy are not counted for students and the students still get a real activity for these time slots, right?

Liviu Lalescu

Quote from: Wizard on November 28, 2013, 01:16:06 PM
Yes, I thought of that too, but I'm not using it. I assume that since these fake activities are not connected to a specific group of students, than the time slots that these activities occupy are not counted for students and the students still get a real activity for these time slots, right?

Yes, fake activities have no students and the students can get any activity for these time slots.