Busca por sugestão: Lacunas de Docentes - Escola com 3 períodos de aulas

Started by Xardeuss, January 29, 2026, 02:00:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Xardeuss

Good morning, everyone!! How are you all doing??

So, I'd like to ask for a suggestion. Where I work, there are classes in three periods of the day (morning, morning-afternoon/full-time, afternoon, and evening), with teachers who have classes in all of those periods.

I used the maximum number of gaps per day and per week restrictions, but it wasn't very effective, as we have classes that start at 7:10 AM and others that end at 11:00 PM. This scenario ends up creating many gaps overall. I had made some manual interventions, such as making a teacher unavailable during the times when they don't actually have classes (for example: a teacher only has classes in one morning class and another evening class, so I made them unavailable in the afternoon) and things like that...

I researched a bit about simple gap restrictions within a window, but I didn't quite understand how they work. I was a little apprehensive because, from what I understand, they ignore double or more gaps, and I had to make a move to consider each half-hour class as two FET periods.

So, here's my question: Do you know a "better" way to limit these gaps?

Like, I just want to try to make these teacher activities more "organized." Another example: if the teacher has classes in full-time classes (morning until mid-afternoon), the period they have until the evening classes doesn't "interest me," because they will have this gap due to the class schedule itself. I just don't want them to have one class in the first period of the class and another in the last, and situations of that kind.

Is it also possible to define that the teacher has a minimum number of activities in a day? Like, if the FET assigns some activity on that day, that there are at least two or more, and that, if this doesn't happen, they try to redistribute them to other days?

Thank you in advance for your attention!  ;D

P.S.: After I wrote it, I saw how long the text became hahaha...  :P

P.S.2.: I'll send an example of my schedule images, already in English, to make it easier to understand. The example is a bit more "exaggerated," just to demonstrate the situation.

Liviu Lalescu

Good evening, Xardeuss! I am fine, thank you!  :)

You wrote "3" shifts, but listed more: "morning, morning-afternoon/full-time, afternoon, and evening". Could you clarify, please?

You have these, for your problems:

1) Teacher(s) max span per day (maximum duration of working day).

2) Teacher(s) min hours daily.

3) Teacher(s) occupy max sets of time slots from selection. You can add a constraint of this type for each day, and in each constraint define say 3 sets of time slots, and the teacher(s) occupy max 2 of them.

Xardeuss

Good evening, Liviu!! Thanks again for helping me!   ;D

Oops, sorry about that. I didn't express myself well. We have four class models (morning, full-time, afternoon, and evening) divided across the three periods of the day.

Morning classes run from 7:10 AM to 12:30 PM.

Full-time classes run from 7:10 AM to 3:10 PM.

Afternoon classes run from 12:40 PM to 7:00 PM.

Evening classes run from 7:00 PM to 11:00 PM.

This scenario generates many "impossible" gaps, as some teachers have classes in all four types of classes, while others only have morning and evening classes. In the latter case, if I add the restriction of a maximum number of gaps per day per teacher, the entire afternoon period is considered as gaps...

Liviu, I've implemented your second suggestion now. It's much better already! I replaced your first suggestion with a maximum workload restriction for all teachers, as I need to "synchronize" the pre-set schedules in another school system that follows a similar model.

I didn't understand how the third restriction works... How do I use it?

Liviu Lalescu

You're welcome, Xardeuss!  :)

The constraint teacher(s) max occupied sets of time slots from selection: add a constraint for each day. On Monday (the first day), for instance, you make the spin box value = 1 for all morning (the first slots), the spin box value = 2 for all afternoon, and 3 for all evening. Then, you say that the teacher can occupy max 2 sets of time slots from these 3 total time slots, on that day.

So, you can say that a teacher cannot work all 3 shifts: morning, afternoon, and evening, but only maximum 2. Also, I am not sure about the full-time shift, maybe you have ideas to solve your problem, or explain to me why there is also considered this full-time shift.

Please let me know if this solves your question, and let me know if I forgot to clarify anything.

Xardeuss

I understand! Thanks again!!  ;D

So, I consider it a new category because the full-time period is a "mix" of the morning and afternoon categories... It includes the entire morning period, plus half of what would be the afternoon period. (The afternoon period ends at 7:00 PM, while the full-time period ends at 3:10 PM).

This could cause some problems, because some teachers, let's say, have classes in a class that only has morning classes, plus another class that only has afternoon classes, plus another class that only has evening classes.

It would be something like this...

He has 10 classes that the morning class schedule only allows him to have between 7:10 AM and 12:30 PM.

In addition to that, he has another 5 classes in an afternoon class where the schedule only allows classes from 12:40 PM to 7:00 PM.

Adding to this scenario, he also has blocks of evening classes that can only be allowed from 7:00 PM to 11:00 PM...

What I was thinking of doing is that, when FET allocates a class on that professor's day, it should try to fit as many classes as possible into the shortest possible time frame, with the fewest possible gaps.

In this particular professor's case, I would try to make the afternoon classes, which would be somewhat my "tool for manipulation," either as close as possible to the morning classes, or as close as possible to the evening classes, or half and half. But, let's say, FET should avoid as much as possible the afternoon times that would be furthest from the morning or evening times.

Liviu Lalescu

You are welcome, again!!  :)

Maybe you could use the Mornings-Afternoons mode. In this mode, n_FET_days = 2*n_real_days, and n_FET_hours = n_real_hours/2. Could you read a bit about this mode (in Help / Morocco-Algeria) and generate a few examples for this mode from fet-7.7.3/examples?

You might want to create FET days (in MA mode): Monday_morning+half_afternoon, Monday_half_afternoon+evening, Tue_m+h_a, Tue_h_a+e, etc.

Then, constrain the gaps of the teacher for each day, increasingly difficult, which will make the teacher have few gaps between morning and first half of the afternoon, and between the second half of the afternoon and the evening of a real day.

Xardeuss

I understand! That's a good idea!! I'll take a look.

Thanks, Liviu!!!  ;D  ;D

Liviu Lalescu

You could also triple the days and maybe add sentinels (quadruple the days in this case), and use the Official mode. The first FET day is Monday morning, 2nd FET day is Monday afternoon, the third FET day is Monday evening, the fourth is a sentinel (or omit the sentinels), then follows Tuesday morning, etc.

You need to think if you need doubling the days (MA mode), or triple/quadruple the days (Official mode, and use tricks which we can devise).

I might sleep now, so I am not sure I'll answer tonight anymore. Tomorrow.

Xardeuss

I understand! I'll do some tests following your tips. In general, I've already managed to improve my schedule in many areas thanks to you!!

If I have any questions, I'll send them here and you can answer them as you can.

Liviu, thank you again for your patience, and good night!!!  ;D  ;D

Liviu Lalescu