Hi there. Small timetable, it gets stuck at 126 out of 299. The problem starts when I introduce the Educación Física teacher (21 activities). Any help?
Thanks
Juanma
You data is impossible.
It is more difficult to see, since you didn't tried to split years into groups.
The problem is at least in year 4° ESO. It is clever to call the year only "4° ESO" and add 4 groups into that year. Then add a whole year to most of your activities. By the the timetable will be smaller on paper and it will be easier to see the bug.
Just add a 7th hour and set a break contraint for the 7th hour on Tuesday to Friday. Then generate the timetable. Now you will see, that the timetable can be generated and there is one activity placed on Monday 7th hour. If you try to place this activity into a free slot, then you will see that it is always already used by an other year. So it is impossible to do that.
As i said: it is easier to see and understand that bug, if you split the years more clever. It happen because you share so many activities with different years.
easy example:
activity 1: yearA, yearB
activity 2: yearA, yearC
activity 3: yearB, yearC
Now you have a timetable with 2 slots only.
As you can see yearA has only 2 activities, yearB has only 2 activities and yearC has only 2 activities.
So it should be possible to add the activities in 2 slots, don't they?
Try it, and you will see that it is impossible. You need at least 3 slots.
You done the same bug in your data set.
Thank you for your reply. The thing is that when I don't assign the name of the teacher, it works. That's it, an activity without a teacher.
Juanma
Quote from: Volker Dirr on August 31, 2023, 01:09:21 PMYou data is impossible.
It is more difficult to see, since you didn't tried to split years into groups.
The problem is at least in year 4° ESO. It is clever to call the year only "4° ESO" and add 4 groups into that year. Then add a whole year to most of your activities. By the the timetable will be smaller on paper and it will be easier to see the bug.
Just add a 7th hour and set a break contraint for the 7th hour on Tuesday to Friday. Then generate the timetable. Now you will see, that the timetable can be generated and there is one activity placed on Monday 7th hour. If you try to place this activity into a free slot, then you will see that it is always already used by an other year. So it is impossible to do that.
As i said: it is easier to see and understand that bug, if you split the years more clever. It happen because you share so many activities with different years.
easy example:
activity 1: yearA, yearB
activity 2: yearA, yearC
activity 3: yearB, yearC
Now you have a timetable with 2 slots only.
As you can see yearA has only 2 activities, yearB has only 2 activities and yearC has only 2 activities.
So it should be possible to add the activities in 2 slots, don't they?
Try it, and you will see that it is impossible. You need at least 3 slots.
You done the same bug in your data set.
Yes, you can do the same problem with teachers of course.
Example:
activity 1: year4A, year4B, teacherB
activity 2: year4A, teacherA
activity 3: year4B, teacherA
As you can see year 4a, year 4b and teacherA have all only 2 activities.
But you can't place them in just 2 timeslots. That is impossible.