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

I hope good news  :)  I obtained (by luck, a very fast solution, 48s, but could take 10 minutes without solving). I attach. I made subject preferred rooms 99% and the final conflicts are low.

I did with consecutive if same day = true. If needed, I could generate some more with consecutive if same day = false.

infoo_

Quote from: Liviu Lalescu on February 10, 2023, 07:41:01 PMI did with consecutive if same day = true. If needed, I could generate some more with consecutive if same day = false.

Please. I am changing every yes with no (I'm not in my usual computer).

Also, the room constraints should be activated. This is importat for us because some teachers need to occupy those rooms.

infoo_

Quote from: Liviu Lalescu on February 10, 2023, 06:55:35 PMI added also such constraints. 3 were impossible and from 1 I removed an activity (see the constraints min days between activities). It solved (more difficult).

You said:

Liviu: removed Id 118

but we can't delete activities. Did I understood wrong?

Liviu Lalescu

Quote from: darkwindow on February 10, 2023, 07:44:10 PM
Quote from: Liviu Lalescu on February 10, 2023, 06:55:35 PMI added also such constraints. 3 were impossible and from 1 I removed an activity (see the constraints min days between activities). It solved (more difficult).

You said:

Liviu: removed Id 118

but we can't delete activities. Did I understood wrong?

Removed ID 118 only from this constraint (min days between activities).

Liviu Lalescu

Quote from: darkwindow on February 10, 2023, 07:42:45 PM
Quote from: Liviu Lalescu on February 10, 2023, 07:41:01 PMI did with consecutive if same day = true. If needed, I could generate some more with consecutive if same day = false.

Please. I am changing every yes with no (I'm not in my usual computer).

Also, the room constraints should be activated. This is importat for us because some teachers need to occupy those rooms.

When 100%, no need to put "no" instead of "yes". Only for <100%. I'll change.

The rooms constraints is activated, but 99%, because 100% seems impossible. In my liviu11 solution above only one such constraint is broken.

infoo_

Quote from: Liviu Lalescu on February 10, 2023, 07:48:33 PMWhen 100%, no need to put "no" instead of "yes". Only for <100%. I'll change.

I didn't know about that. But you didn't use min days with <100%. What will you change so?

Quote from: Liviu Lalescu on February 10, 2023, 07:48:33 PMThe rooms constraints is activated, but 99%, because 100% seems impossible. In my liviu11 solution above only one such constraint is broken.

I didn't check. I will see it. Thanks!

Liviu Lalescu

We don't need to change any constraint min days between activities, because they are either 100% or not active.

I'll try with 100% subject preferred rooms, but I think impossible.

infoo_

Quote from: Liviu Lalescu on February 10, 2023, 07:52:50 PMWe don't need to change any constraint min days between activities, because they are either 100% or not active.

That's why I don't understand what will you change.

If by "I'll change" you meant 100% on room constraints, it is awesome that you found a way to only have 1 conflict. I think there is no need to change anything more.

I will check your last file soon. Thanks for the hard work

infoo_

Can I ask if the min days constraints that you added are inefficient when there is a change of teacher or new teachers are added?

If there is a teacher that left, then I need to track every single constraint about him, and especifically min days are a lot with respect to other constraints, isn't it?

Liviu Lalescu

No need to change constraints min days between activities. They have all weight 100% (and 3 or 4 are inactive), so consecutive if same day is irrelevant.

I tried changing all subject preferred rooms to 100%, but seems impossible.

Please see liviu11 solution, it has only a room not respected.

Liviu Lalescu

Quote from: darkwindow on February 10, 2023, 07:58:55 PMCan I ask if the min days constraints that you added are inefficient when there is a change of teacher or new teachers are added?

If there is a teacher that left, then I need to track every single constraint about him, and especifically min days are a lot with respect to other constraints, isn't it?

I used Advanced > Spread of activities evenly over the week, 100%, then deactivated or edited the impossible constraints min days between activities.

Liviu Lalescu

Unbelievable, but it solved fast enough with 100% preferred rooms. See two solutions, attached (and the file).

infoo_

#27
Thanks!

Is there any way to constrain max daily/weekly gaps for all teachers in my file, considering it has 16 hours where the first 8 are for mornings, and the rest are afternoon?

A lot of teachers teach both on morning and afternoon, and supposing its available times are far away (first hours of morning and last hours of afternoon), then max gaps would be easily broken.

infoo_

#28
You 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.

Liviu Lalescu

Quote from: darkwindow on February 10, 2023, 09:58:51 PMThanks!

Is there any way to constrain max daily/weekly gaps for all teachers in my file, considering it has 16 hours where the first 8 are for mornings, and the rest are afternoon?

A lot of teachers teach both on morning and afternoon, and supposing its available times are far away (first hours of morning and last hours of afternoon), then max gaps would be easily broken.

For this, you can of course add constraints teacher(s) max gaps per day/week, and/or teacher(s) max span per day.