Finding a bug in this timetable - It gets stuck

Started by infoo_, February 28, 2025, 05:24:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

infoo_

Hello!

Please, I need your help with this timetable attached

I have done an intense research without a solution

It places 121 out of 122 activities and I tried everything: from deactivating constraints and splitting 2+2 activities into 2+1+1 activities, without solution

For your interest:

For teacher ferressini I have activated hour 6 (6-7-8) on day lunes of not available times constraint because without it, less activities are placed (maybe it can be deactivated if not necessary)

Also, teacher ferreyra can change its not available times with this configuration:

You cannot view this attachment.

Although it seems that the constraint of the file works better because it places more activities than the above

Finally, teacher pasquali can change its not available times with this configuration:

You cannot view this attachment.

No changes were noted with one option or another.

Everything indicates that the problem is in groups 2c and 3c

Could anyone guide me to find the error?

Thank you!!

Volker Dirr

Please use max working days constraints for your teachers. You can do much better timetables if FET choose the free day; not the teacher. You will always get impossible timetables very fast if the teachers select the free day. Even if you solve it this year, you will get the same and probably much worse problems every year again and again and again...
Timetabling doesn't work like that. You pay the teachers, so you can also choose the free day, not the teacher. Except there is a reason for it, like working at an other school. And in this case also the teacher shouldn't select the "free" day. In that case you must talk with the other timetable maker of the other school and select a "good" "free" day.

infoo_

Thank you Volker

With respect to max working days constraints, I understand

However, pasquali teachs both on mornings and afternoons at school, so since he can works viernes afternoon OR jueves afternoon, I don't know how to reflect that in fet

For teacher ferreyra there is no problem, since he only teachs on afternoon. I will implement that, thank you

infoo_

I tested extending ferreyra available times and setting max 3 days for him, but now the generation reachs 327 max placed activities in the first minutes instead of 332 (out of 334)

Why does it have worst performance if we give fet the liberty of choosing the free day?

Volker Dirr

I don't talk about that teacher only. I talk about ALL teachers:
In your data set there are 53 teachers and 52 from that 53 teachers have got a lot of not available times. Not only free day, but also in the morning and in the evening.

You way of timetabling is wrong. It doesn't work like that. I don't think that anybody can help you since we all don't that why you 52 teachers must have so many not available times. Please remove first of all all not available times. That are chosen by the teachers only.

Please explain us for all 52 teachers why exactly they need to many not available times. If you can't explain that, then nobody will be able to give you a good advice.

infoo_

Quote from: Volker Dirr on March 02, 2025, 03:07:57 PMPlease explain us for all 52 teachers why exactly they need to many not available times. If you can't explain that, then nobody will be able to give you a good advice.


Some work at other schools in between mornings and evenings. Some live too far from school. Some are mothers. Some are waiting to take more hours in other schools but they can't if they don't know the final timetable (based on their available days)

Volker Dirr

Quote from: infoo_ on March 02, 2025, 03:06:38 PMI tested extending ferreyra available times and setting max 3 days for him, but now the generation reachs 327 max placed activities in the first minutes instead of 332 (out of 334)

Why does it have worst performance if we give fet the liberty of choosing the free day?

Because if you choose the free day, then FET will only try to generate with that free day.
If you let FET choose the day, then it has got 5 days to check. So in worst case it might be 5 times slower. In best case it will be as fast as with a fixed free day.

The difference is:
You you choose the teachers choose a free day and it doesn't work, then you will get no solution.
If FET can choose the days, then it can find other solutions that you disallowed without any reason.

Please do that with ALL teachers, not only with a single teacher. I can tell you for example that at my old school, even only 3 teachers select a free day "bad", then my data set was impossible. I was also able to prove that with my data set. (Also a school with a bit over 50 teachers).

infoo_

Quote from: Volker Dirr on March 02, 2025, 03:14:57 PM
Quote from: infoo_ on March 02, 2025, 03:06:38 PMI tested extending ferreyra available times and setting max 3 days for him, but now the generation reachs 327 max placed activities in the first minutes instead of 332 (out of 334)

Why does it have worst performance if we give fet the liberty of choosing the free day?

Because if you choose the free day, then FET will only try to generate with that free day.
If you let FET choose the day, then it has got 5 days to check. So in worst case it might be 5 times slower. In best case it will be as fast as with a fixed free day.

The difference is:
You you choose the teachers choose a free day and it doesn't work, then you will get no solution.
If FET can choose the days, then it can find other solutions that you disallowed without any reason.

Please do that with ALL teachers, not only with a single teacher. I can tell you for example that at my old school, even only 3 teachers select a free day "bad", then my data set was impossible. I was also able to prove that with my data set. (Also a school with a bit over 50 teachers).

I understand. However, one con would be waiting more time since fet has to cover all possibilities?

Volker Dirr

Quote from: infoo_ on March 02, 2025, 03:13:30 PM
Quote from: Volker Dirr on March 02, 2025, 03:07:57 PMPlease explain us for all 52 teachers why exactly they need to many not available times. If you can't explain that, then nobody will be able to give you a good advice.


Some work at other schools in between mornings and evenings. Some live too far from school. Some are mothers. Some are waiting to take more hours in other schools but they can't if they don't know the final timetable (based on their available days)

No. Don't tell me that all 52 teacher have reasons for so randomly chosen free times. You pay them, you can talk with the other school. Grab your phone and call the other school. Talk with them how to share the teachers.


infoo_

Quote from: Volker Dirr on March 02, 2025, 03:17:38 PMNo. Don't tell me that all 52 teacher have reasons for so randomly chosen free times. You pay them, you can talk with the other school. Grab your phone and call the other school. Talk with them how to share the teachers.



What do you mean by free times?

Volker Dirr

Quote from: infoo_ on March 02, 2025, 03:16:41 PMI understand. However, one con would be waiting more time since fet has to cover all possibilities?

Well, you can choose: Let FET generate an impossible timetable after a few seconds or get a possible/solved timetable after several minutes. It it is your choice.

Volker Dirr

Quote: "What do you mean by free times?"

Every single slot that you selected in the teachers not available times constraints. I never saw a school with so many not available times. In normal case all full time working teachers have not free time at all.
A few work at an other school. But not 52 teachers out of 53.
Then there are half time teachers. They get of course a free day (or 2). But YOU/FET choose it, not the teacher.
Some mothers maybe don't get to the first hour and some mothers maybe don't work at the last hour. But viewing your data set: I can't see any logic it it.

infoo_

#12
Quote from: Volker Dirr on March 02, 2025, 03:23:36 PMQuote: "What do you mean by free times?"

Every single slot that you selected in the teachers not available times constraints. I never saw a school with so many not available times. In normal case all full time working teachers have not free time at all.
A few work at an other school. But not 52 teachers out of 53.
Then there are half time teachers. They get of course a free day (or 2). But YOU/FET choose it, not the teacher.
Some mothers maybe don't get to the first hour and some mothers maybe don't work at the last hour. But viewing your data set: I can't see any logic it it.


Maybe you are not seeing that the timetable is divided into two big groups: teachers who entirely teach on mornings, and teachers who entirely teach on afternoons (and teachers who teach both on halfs, but they are the few).

Keeping that in mind, it is obvious why the vast majority of teachers have too little available times: since they only teach in one half, then they are not in obligation to select available times in the other half

I think that's why you see too many not available times slots

If that is not the case, please tell me 5 teachers out of 52 that you consider they have too little available times

infoo_

#13
Some time ago I asked how to give shape to my case of having a school that have teachers that teach only on mornings, afternoon or both.

I found putting them into the same timetable is good since we can play with max gaps, max days etc. And it is easy to maintain (I guess, I am not an expert in timetabling)

Maybe in Europe vast majority of schools are one half. But in my country vast majority of non-public school have two halfs (or even three, morning, afternoon and night school). I hope now you understand why it is too complicated to get in touch with other schools

Sorry if I was not clear about this before

Volker Dirr

Quote from: infoo_ on March 02, 2025, 03:32:39 PMMaybe you are not seeing that the timetable is divided into two big groups: teachers who entirely teach on mornings, and teachers who entirely teach on afternoons (and teachers who teach both on halfs, but they are the few).

Keeping that in mind, it is obvious why the vast majority of teachers have too little available times: since they only teach in one half, then they are not in obligation to select available times in the other half

I think that's why you see too many not available times slots

If that is not the case, please tell me 5 teachers out of 52 that you consider they have too little available times

I see that. But I can see that you didn't divide the days in half.

I will count the opposite, since there a more "strange" looking constraints then well looking constraint:
The only 11 teachers that might look "ok" are BONINO, CIABURRI, CORONELL, FERRERY, CIABURRI, HALFON, PERRERYA, SUERO, TAMARA, TRAVALIGANTY, VALESIS,
I assume CIABURRI and CIABURRI drive together. Please solve it, like Liviu suggested it.
Similar to Perrerya and Coronel.
And even they are "bad" if they must work at other schools and you didn't talk to the other school.
All other 42 teachers look very strange. You can explain every single not available slot? There is no symmetries in the constraints.

Well, if you don't want to let the teachers free times, then you have only 2 variants. Try to remove all min day constraints, then the timetables will be of course bad for teachers and students, but solve able. Or you must do a better activity planning. But i don't know enough about your school to do that. That is too much work for unpaid help.