Prevent starting times on a certain slots makes impossible generation

Started by infoo_, February 26, 2023, 09:26:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

infoo_

Hello

Please see attached FET file with data and timetable. That is the last achieved timetable.

However, the school told me that soonly there will be a swap between Teachers AM and AN on courses 2C and 3C.

So in order to make this working, they told me that on Martes on hours 1º and 2º (of afternoon) it can't be teached Matemática because of teachers AM and AN not available times.

So I created the following constraint (it is last on the unordered time constraints list):

Time constraint
Activities with:
Teacher=AM
Students=2C
Subject=MATEMÁTICA
Activity tag=2C
Duration=2
etc.

If you deactivate it, you will get a complete timetable.

So I tried to deactivate all acts preferring starting times, but it seems impossible.

What would you propose to solve this issue? Please let me know what changes you made to the file.

Thank you!

ADDED: The person in charge of doing the timetable told me that he could not solve this. If he can't by hand, I guess we can't by computer :)

Liviu Lalescu

Hello,

It would be good to give from the start all the necessary constraints, otherwise time will be wasted.

I think you need to unlock the timetable and generate with the constraint activated. Unfortunately, it seems impossible, all my 8 threads stop after a few seconds on 295/325. Probably you need to relax your data.

infoo_

Hello Liviu

Yes, from what I understood the only change to the file is swapping teachers on 2C and 3C of Matemática. And of course deactivate last time constraint since it would be unncessary.

Please see fixed FET file. Now it stops at 289/325.

Do you have any trick to figure out what constraints should be relaxed? Because I would do it by trial and success, but this can cause that some flexible constraints actually can be more restrictive.

Liviu Lalescu

Hello, darkwindow,

Usually, I check the constraints of the teacher at the activity of which it stops (in our last case, id 59, teacher X, activity number 290/325). Unfortunately, this seems not to be the problem.

I begin then to hunt constraints. For instance, I made all the constraints min days between activities 0% and the max placed activity remained 289/325. Note that there are some constraints which alter the initial order. These are preferred times and not available - the other, as I remember, keep the order.

There might be a problem with 2C and 3C and 1C availability. Maybe on a day you have 2 free slots and on another day 2 free slots, and an activity which can be placed on 2 days as 3 hours on a day and 1 hour on the other day.

infoo_

Quote from: Liviu Lalescu on February 26, 2023, 10:36:27 PMUsually, I check the constraints of the teacher at the activity of which it stops (in our last case, id 59, teacher X, activity number 290/325). Unfortunately, this seems not to be the problem.

I did the same! I even raised its available times to the hour 4 of afternoon (instead of hour 3, because FET always placed its activity there), without success. Note: This was for testing, we cannot increase teacher available times.

Quote from: Liviu Lalescu on February 26, 2023, 10:36:27 PMI begin then to hunt constraints. For instance, I made all the constraints min days between activities 0% and the max placed activity remained 289/325. Note that there are some constraints which alter the initial order. These are preferred times and not available - the other, as I remember, keep the order.

I don't understand what do you mean by "Note that there are some constraints which alter the initial order"

Quote from: Liviu Lalescu on February 26, 2023, 10:36:27 PMThere might be a problem with 2C and 3C and 1C availability. Maybe on a day you have 2 free slots and on another day 2 free slots, and an activity which can be placed on 2 days as 3 hours on a day and 1 hour on the other day.

If I understood you correctly, the free slots on a course can occur in last 1 or 2 hours of a day (this was one of my first requirements).

This gives me space to ask another question: Would it be better to split activities of duration = 2 into two of duration = 1 each? I remember that I have done it in the past, but the generation was worst -- FET hardly placed any activity!

I remember you told me that this is because of FET placement activities algorithm. But if the solution for this particular problem involves splitting acts of duration = 2... then we might not finish the generation because of FET placement activities algorithm!

That sounds bad. But maybe we can start guessing what activities can be splitted into duration = 1, although, as I just say, it is not the best solution.

Liviu Lalescu

Preferred times and not available constraints: if you modify them, the initial order of the activities will be changed and FET might place another number of activities (like 297/325), even if the problem is the same.

I told you that you can input, instead of say 2+2+1 100% -> 1+1+1+1+1 0% consecutive if same day. FET won't place more than 2 on the same day. This is a better solution if you allow 1 hour each day. This is an equivalent solution if you add 2 constraints "two activities consecutive". This is an easier solution if you add only 1 constraint "two activities consecutive".

I must sleep now, I am tired. Good night!