Max gaps between 2 teachers = 0

Started by infoo_, February 20, 2023, 08:16:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

infoo_

Hello

I have 2 teachers. Teacher A and suppose he is substitute of another teacher, say "Teacher B (Substitute is Teacher A)". That's why I have 2 different teachers, altough it is temporally the same teacher but with different names.

I set Maximum gaps per day=0 for Teacher A and Maximum gaps per day=0 for Teacher B (Substitute is Teacher A), it works fine.

But I realized that in the timetable, on Mondays both teachers have a gap of like 4 or 5 hours.

So I think I need to also specify that both teachers must also have max gaps = 0 between its activities, in some way. So both teachers don't have any gaps between them.

I thought about consecutive activities but I don't want to specify an activity of Teacher A to be consecutive to another activity of Teacher B (Substitute Teacher A), but FET should find the combination that fits better.

Maybe something like "Max gaps between two teachers = 0".

Is there a trick to achieve this?

Thanks!

Liviu Lalescu

Hello,

Maybe a possible solution (trick): add a teacher T, and include him in all the activities of A and B. Then max 0 gaps for T. Careful that the activities with two teachers don't respect home rooms constraints for the teachers.

I wonder why you have split the real teacher to A and B. Without this split things are easier and faster to generate.

infoo_

Hello

Quote from: Liviu Lalescu on February 20, 2023, 08:23:41 PMMaybe a possible solution (trick): add a teacher T, and include him in all the activities of A and B. Then max 0 gaps for T. Careful that the activities with two teachers don't respect home rooms constraints for the teachers.

Yes, these teachers don't have any associated room, so no problem with that.

I will try it, thanks!

Quote from: Liviu Lalescu on February 20, 2023, 08:23:41 PMI wonder why you have split the real teacher to A and B. Without this split things are easier and faster to generate.

I created the teachers when I started using FET, so I had no idea that we could put more than 1 teacher on an activity.

But in my school sometimes these "substitutes" took the available times of the Associate teachers, so FET must not find the "intersection" between its available times but consider the available times of one teacher (not both).

So that's why I let 2 created teachers instead of the same.

Liviu Lalescu

I think I understand your problem. You have two teachers (A and B) with different availability tables. Yes, in this case you need to add a third teacher (say T), include it into all the activities of A and B, and add max 0 gaps for T as well. It should work.

Another solution: add a single teacher T, available all the time, and two activity tags, A and B. Then constrain the preferred times of A with a constraint, and B another constraint. But gaps will be counted for T in the slots marked with X (red). I don't like this solution.

infoo_

After 10 minutes it found a solution. From your first message, I added a new teacher on activities of both teachers, set max gaps = 0 and instead of putting the activities consecutive (like I would expect), FET found a solution that put the conflicting activities on different days (of course it respects the available times). So I guess it is fine. :)

Quote from: Liviu Lalescu on February 20, 2023, 08:39:30 PMI think I understand your problem. You have two teachers (A and B) with different availability tables. Yes, in this case you need to add a third teacher (say T), include it into all the activities of A and B, and add max 0 gaps for T as well. It should work.

I don't understand. It is the same thing you said in your first message. I thought you were referring about the "duplicate" teachers.

Liviu Lalescu

Quote from: darkwindow on February 20, 2023, 08:44:41 PMI don't understand. It is the same thing you said in your first message.

Sorry, it was indeed a repetition, to confirm. It is great that it is working in practice.

You can even apply max days per week or min hours daily for T (and/or for A, and/or for B).

infoo_

For a teacher max gaps = 0, which is more efficient, Liviu? Max gaps per day = 0 or Max gaps per week = 0?

Liviu Lalescu

I always prefer per week both for students and for teachers, but my choice is not really important, it is only historical (I firstly implemented per week).

For teachers, the treatment is probably equivalent in practice.

For students, if there exists x per day, I internally add x * n_days per week, so if you have 0 per day you'll also have 0 per week. Indeed, for students per day might be less efficient than per week if I did not add this internal trick.