How can we place all activities?

Started by infoo_, February 10, 2023, 05:40:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

Quote from: darkwindow on February 10, 2023, 11:51:55 PMYou did an amazing job by inserting those constraints!! Thank you Liviu

I need to set those broken constraints to 0.

The excepetions to the rule are:

Time constraint teachers activity tag 1C max 2 hours daily broken for teacher Teacher AA/Teacher AB, on day Lunes, length=3. This increases the conflicts total by 0.95

Time constraint teachers activity tag 2C max 2 hours daily broken for teacher Teacher AA/Teacher AB, on day Lunes, length=3. This increases the conflicts total by 0.95

This 2 can be omitted, but the other must be solved.

I think we are not using the fact that, if an activity is splitted, they can be non-consecutive. It seems strange to me that in the schedule there are hardly any non-consecutive activities.



The room constraints related to "Taller de Producción en Lenguajes" can be deactivated, if needed.

If the constraint min days between activities is inactive, we are allowing non-consecutive. It is just luck.

You can reduce the weight or deactivate for room constraints for TPL.

For teacher(s) activity tag max hours daily, there are also impossible for teachers Teacher H and tag 2A, and teacher Teacher Au and tag 5B.

Unfortunately, for these tags you need to add a constraint for each teacher, as FET does not allow exceptions.

I tried a bit without exceptions (and 99% for impossible), but it seemed too difficult.

You might want to do these things and try.

Liviu Lalescu

I added manually the constraints (only the needed ones). See the attached file. With max gaps = 6 for teachers it stops at 260, and without it stops at 266 I think.

I'd say you settle for a solution with liviu12.fet. If you want, I can generate more files for you, so you have to choose from more.

I added only these in the new file liviu17.fet:

P-4C
D-5C
B-5C
K-4B and 5B
X-4C
Y-2C
H-2A (impossible, removed)
I-1B
AL-4A
AP-5A
AQ-3A
AS-4C
AU-4A, and 5B (impossible, removed).

Liviu Lalescu

I obtained 10 timetables without caring about max gaps for teachers. See attached files. For the solutions, see the report.txt file and go to that directory.

I am now trying with max 6 gaps per week for teachers and I already have 1 timetable. I will post a new reply with it, a bit later, I still left it computing.

I think the broken activity tag max hours daily cannot be improved.

Liviu Lalescu

I obtained 3 timetables with max gaps per week = 6. Attached.

I am now trying with teachers max gaps per week = 6 and per day = 4. It seems tough. I'll let you know.

infoo_

#34
Hello

But max gaps per week is a secondary problem.

We need to solve those broken constraints.

A teacher cannot exceed max = 2 hours daily with the same subject on a day. If a teacher teachs different subjects on same course, each subject has to be max = 2 hours daily.

Once we figure that out, I think it's time to go look at the gaps.

I propose to start again from liviu12 and figure out how to solve all "max 2 hours daily broken", with the exception of 2 (see message #28)

Thank you

Liviu Lalescu

Hello,

It did not solve with max gaps per day = 4.

liviu20.fet and liviu20-with-teachers-max-gaps.fet are better than liviu12.fet, because I only added the constraints for the needed tags.

As I told you, for Teacher H - 2A and for Teacher AU - 5B it is evidently impossible. So I deactivate these.

For the rest I tried many times with 99.5%, and each time 3 constraints of this type were broken. Feel free to make them 100%. It won't solve, and the problem is your too constrained file.

infoo_

Hello

Quote from: Liviu Lalescu on February 11, 2023, 08:26:09 AMFor teacher(s) activity tag max hours daily, there are also impossible for teachers Teacher H and tag 2A, and teacher Teacher Au and tag 5B.

For Teacher AU a possible (but not only) distribution could be:

You cannot view this attachment.

infoo_

Quote from: Liviu Lalescu on February 11, 2023, 01:10:08 PMAs I told you, for Teacher H - 2A and for Teacher AU - 5B it is evidently impossible. So I deactivate these.

For Teacher H he has 3 hours with 2A but 2 are from one subject and 1 hour is for another. Under the school restrictions, he can teach without breaking the rule, since these are 2 different subjects. This also happen with Teacher AU (see image above).

Liviu Lalescu

Quote from: darkwindow on February 11, 2023, 01:16:06 PM
Quote from: Liviu Lalescu on February 11, 2023, 01:10:08 PMAs I told you, for Teacher H - 2A and for Teacher AU - 5B it is evidently impossible. So I deactivate these.

For Teacher H he has 3 hours with 2A but 2 are from one subject and 1 hour is for another. Under the school restrictions, he can teach without breaking the rule, since these are 2 different subjects. This also happen with Teacher AU (see image above).

Oh, I understand now. Let me check what I did. I'll let you know.

Liviu Lalescu

I did it, and obtained 2 solutions relatively easy. Let me know if you want me to generate some more solutions for you.

I am now trying with teachers max gaps per week = 6, but it is difficult.

I am not sure, I might be away from the computer for an hour or so.

infoo_

I think this FET file from liviu12 is almost correct.

The only problem is Teacher AH (Suplente Teacher O) which has 3 hours of Matemática on 2C on same day.

So we need to solve this problem. The room constraints were activated, isn't it?

The other broken constraints are not violating the school rule. Don't you think?

infoo_

I forgot to include that Teacher AM must teach with Teacher AQ 1 hour in Matemática 1A and 1 hour Matemática 1B.

Liviu Lalescu

Quote from: darkwindow on February 11, 2023, 01:33:39 PMI think this FET file from liviu12 is almost correct.

The only problem is Teacher AH (Suplente Teacher O) which has 3 hours of Matemática on 2C on same day.

So we need to solve this problem. The room constraints were activated, isn't it?

The other broken constraints are not violating the school rule. Don't you think?

I removed activity ID 118 from the min days between activities constraints, because otherwise the timetable seemed impossible very early. It is probably impossible.

Liviu Lalescu

Quote from: darkwindow on February 11, 2023, 01:39:46 PMI forgot to include that Teacher AM must teach with Teacher AQ 1 hour in Matemática 1A and 1 hour Matemática 1B.

OK then, include and then try to generate, as I taught you. I would advise you to work in liviu21.fet.

You might need to add a constraint min days between activities for the new activities, 100% eventually, or teacher activity tag max 2 hours daily, 99.5%.

infoo_

#44
Quote from: Liviu Lalescu on February 11, 2023, 01:43:34 PMYou might need to add a constraint min days between activities for the new activities, 100% eventually, or teacher activity tag max 2 hours daily, 99.5%.

What are the "new activities" you are referring to?

Quote from: Liviu Lalescu on February 11, 2023, 01:43:34 PMOK then, include and then try to generate, as I taught you. I would advise you to work in liviu21.fet.

Yes, I added it. The generation took ~2 m. Many thanks!

Matemática of 1A (and 1B) has split 2-2-1. I added the teacher to the third index (the one that has 1 hour), but he could teach on 1 hour of the first 2 indexes. However this is really not a problem, since FET could solve easily when I added it to the 1 hour. But I think if we were more flexibe, it is better. I didn't know how to do it more flexible so I left with the 3rd index.

What's left to do? Restrict the max gaps? For these, I think it is not possible due the way I added the teachers. For example Teacher K could have a lot of gaps, but that's why I have another teacher called "Teacher AN (Suplente Teacher K)" who "fill" those gaps.