Need help with these constraints for a school

Started by infoo_, February 21, 2023, 08:03:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

infoo_

Hello

I took most of your suggestions and put a lot of effort in generating the attached FET file.

The school almost approved it, but I need to fix some issues (some are fixed, so I don't include them here):

1º) Teacher max gaps per day, WP:100%, T:Teacher Q, MG:2 must have MG = 0 or MG = 1 (ideally MG = 0)

2º) Matemática Teacher A on 4C must respect min days between activities = 1 100% (max hours = 2 instead of 3)

3º) (Optional) Teacher max gaps per day, WP:100%, T:Teacher AQ, MG:2 should be MG < 2

The most important is to solve 1º), the others are important but not as the first one.

I attach the file with data and timetable because if I deactivate placed activities, the generation is never finished. I don't know why. I only changed teacher's name for privacity. You can deactivate all of them, no problem. If you want to try without activate placed activities, here are the seeds that were from the successful generation (I remember it took ~3 min):

Generation started on: 2/21/23 2:31 AM

The random seed at the start of generation is:
   s10=1520584588, s11=1930088439, s12=555555873,
   s20=3874092411, s21=2482283404, s22=3106961385.

This file was automatically generated by FET 6.8.4.

---

Generation ended on: 2/21/23 2:34 AM

The random seed at the end of generation is:
   s10=1831861930, s11=4000834580, s12=3414413369,
   s20=765949400, s21=4205607824, s22=1172350969.

This file was automatically generated by FET 6.8.4.

Thanks!

Liviu Lalescu

Hello!

1) It seems that Teacher Q MG 0 is impossible, the timetable stops very fast at 282/324. But with MG 1 it is possible.

2) In my file I also added two constraints for Teacher A 4C Mate (see last 2 time constraints).

3) I did not add this constraint for teacher AQ, but by chance the first timetable I obtained has only a gap for this teacher (I did not check the other 2 timetables).

I attach 3 timetables for these changes of mine.

I will let it now try for AQ MG 0. I'll let you know.

Liviu Lalescu

I obtained a solution with Teacher AQ MG 0. I attach the files. I'll leave it now generate more solutions (if any), so you can have more to choose from. I'll let you know.

Liviu Lalescu

I obtained in total 4 solutions. I attach them (the initial file is in the previous post, and also the solution in the previous post is the first in the 4 solutions here).

Note: for the starting file, I unlocked time+space from your file. This means I removed all non-permanently locked activities (in time - activity preferred starting time - and in space - activity preferred room).

infoo_

Thank you so much!!

May I ask how did you obtained a timetable with Teacher AQ MG 0? I am comparing the two files and for now I didn't find any differences between constraints (besides you add 2 time constraints)

Liviu Lalescu

AQ has max gaps per day = 0 (modified by me), and Q has max gaps per day = 1 (also modified by me).

infoo_

Oh, but that's more restrictive than that we had before :o

So I am more confuse than before, since you found a very excellent solution with more restrictive constraints

Liviu Lalescu

I am not sure I understand. You wrote 3 additional conditions you wanted, and I added them. The first condition is not possible with 0, only with 1 (max gaps daily for Q).

In FET, if you don't specify a constraint, FET won't care about it. It is best to feed FET the needed constraints than to generate more and choose a solution.

I generated very many times to find the solutions above (on 8 cores, with time limit 10 minutes each). Many times the time was exceeded.

infoo_

Sorry I read wrong -- you found a solution with Teacher AQ MG = 0, I read Teacher Q MG = 0 (where the generation is stuck). Now I understand ;D

Liviu Lalescu

No problem! :)

I just hope your institution will accept with 1 gap for Q, and that there are no other problems.

infoo_

#10
With respect to rooms, I see that in our files we have "Activity preferred room" activated constraints.

In my school, it is not necessary to know which room is assigned to which teacher. Since we have "Subject preferred rooms", can we delete "Activity preferred room" constraints since I guess they are redundant? And this would increase performance?

Liviu Lalescu

No, they are not redundant. They are part of the solution. If you remove them (activity preferred room), and the preferred rooms for the subjects are 100%, FET will place them similarly in the same rooms. Probably the performance is not increased.

But why do you consider the performance? You have a locked file which generates in 1 second.

infoo_

Quote from: Liviu Lalescu on February 21, 2023, 04:24:53 PMNo, they are not redundant. They are part of the solution. If you remove them (activity preferred room), and the preferred rooms for the subjects are 100%, FET will place them similarly in the same rooms. Probably the performance is not increased.

I mean "Activity preferred room" is created after FET successfully generated a timetable, like "Activity has a preferred starting time", isn't it?

If yes, then we can consider delete them/deactivate them like when we work with a timetable with new constraints, we need to deactivate (maybe all) "Activity has a preferred starting time" constraints.

It is a question for future timetables, not for this one.

Liviu Lalescu

Indeed. But: If you have a locked file, just go to Timetable Advanced unlock and unlock all in time and space. It will remove these constraints. Yes, in this case it is important to remove even activity preferred room (because in some cases you have 2 rooms to choose from for an activity).

infoo_

Ok, so we can remove "Activity preferred room" if new changes are required.

Thanks!