good morning!
In the tables produced by the Moroccan version, we noted that the constraint min days between a set of activities allowed three (instead of two!) activities of the same type on the same day with a weight < 100%.
Is there something wrong?!
Please tell me, this potential bug appears if the "force consecutive if same day" is not selected? This is normal even in the official FET.
Do you mean real days, or half days?
Otherwise, please send me the locked (solution) file, so I can have a look.
indeed, this fact appears when "force consecutive if same day" is not selected.
I noticed scheduling 3 consecutive activities of the same type during the same day!!?(half day or full day).
Is not this something strange?!
Even with official FET this "bug" appears. See the attached file.
In the FAQ you can search this: "Q: Help on ConstraintMinDaysBetweenActivities."
Quote from: Liviu Lalescu on March 25, 2018, 03:16:15 PM
Even with official FET this "bug" appears. See the attached file.
In the FAQ you can search this: "Q: Help on ConstraintMinDaysBetweenActivities."
Is this "bug" due to the FET algorithm?! And therefore difficult to avoid without changing the algorithm of
FET?! If so is it a trick to avoid 3 consecutive activities on the same day with a weight less than 100%?
Quote from: Benahmed Abdelkrim on March 25, 2018, 04:55:02 PM
Is this "bug" due to the FET algorithm?! And therefore difficult to avoid without changing the algorithm of FET?! If so is it a trick to avoid 3 consecutive activities on the same day with a weight less than 100%?
Yes, it is because of the FET algorithm. I am not sure if it is difficult to change, it might be possible, but I would prefer to keep things as they are, to have the same behavior as the official FET.
You write: "avoid 3 consecutive activities" - but they are not forced consecutive.
In the official FET, you have the constraint students/teachers activity tag max hours daily/continuously.
In the Morocco/Algeria FET, you can do this: if you have an activity split into 8 components into a 6 real days week, add 2 split activities, one into 6 components with 100% and one into 2 components with 100% weight.
Quote from: Liviu Lalescu on March 25, 2018, 05:12:00 PM
You write: "avoid 3 consecutive activities" - but they are not forced consecutive.
They may be sometimes. See the screenshot below.
Quote from: Liviu Lalescu on March 25, 2018, 05:12:00 PM
In the official FET, you have the constraint students/teachers activity tag max hours daily/continuously.
Even the Morocco / Algeria version has this time constraint. Maybe it works with half-days and not with real days!?
Quote from: Liviu Lalescu on March 25, 2018, 05:12:00 PM
In the Morocco/Algeria FET, you can do this: if you have an activity split into 8 components into a 6 real days week, add 2 split activities, one into 6 components with 100% and one into 2 components with 100% weight.
Yes, I know this, but sometimes 100% is a STRONG weight, and the program may take hours to produce the timetable or it may be impossible!.
So we're satisfied with a relative weight reduction of less than 100%, but sometimes undesirable things appear, like the one we are talking about.
Quote from: Benahmed Abdelkrim on March 25, 2018, 06:12:23 PM
They may be sometimes. See the screenshot below.
I agree.
Quote
Even the Morocco / Algeria version has this time constraint. Maybe it works with half-days and not with real days!?
Unfortunately, it is for FET (half) days.
Quote
Yes, I know this, but sometimes 100% is a STRONG weight, and the program may take hours to produce the timetable or it may be impossible!.
So we're satisfied with a relative weight reduction of less than 100%, but sometimes undesirable things appear, like the one we are talking about.
You are right!
I have a solution, but it involves some more work. Use the magic constraint activities occupy max time slots from selection.
I attach an example, before this constraint and after this constraint (6 = n_real_days constraints for each teacher/students set). Note that the example does not containt the constraint min days between activities, to be easier. Please note that the example is for Algeria (but it solves also with Morocco).
You need to add 6 (n_real_days) constraints, containing all the activities of the teacher/students set: for the first constraint, select with X the first real day (Monday1 and Monday2), max occupied = 2. And so on.
It might be better, because you can remove the min days between activities constraint and the timetable might be easier to solve.
If you don't agree, I could try to add max 2 activities per real day per min days between activities constraint, but it might be difficult and I do not intend to add it to the normal Morocco/Algeria.
Yes I agree with you!.
Using "the magic constraint activities occupy max time slots from selection" it is a solution, but it is a complex and hard solution that may make the timetable in real situations very very difficult if not impossible.
Maybe there is another easy trick?
maybe this constraint: Max hours daily with an activity tag for a students set/all students?
Quote from: Benahmed Abdelkrim on March 25, 2018, 08:01:19 PM
Yes I agree with you!.
Using "the magic constraint activities occupy max time slots from selection" it is a solution, but it is a complex and hard solution that may make the timetable in real situations very very difficult if not impossible.
The only difficulty is to input the constraints, and maybe you only need to enter the constraints for some teachers/students sets/subjects, not for all. After you input - correctly - the constraints, the generation has the same good speed.
Please tell me if your problem is to input all the constraints activities occupy max time slots from selection, or if your problem is the speed to generate the timetable (the last problem is not significant).
Quote
Maybe there is another easy trick?
maybe this constraint: Max hours daily with an activity tag for a students set/all students?
Yes, this constraint might be made for real days. But the difficulty in inputting the activity tags and the constraints is also high.
Hey, great news :) I was looking on the constraint teachers/students activity tag max hours daily, to see if it is possible to make it for real days, and saw that it is for real days. So, you can work with it.
Yes as I was thinking. But does not that affect speed? The constraint is as you said is high. I am afraid that the production speed will decrease significantly.
what do you think?
Quote from: Benahmed Abdelkrim on March 26, 2018, 06:16:25 AM
Yes as I was thinking. But does not that affect speed? The constraint is as you said is high. I am afraid that the production speed will decrease significantly.
what do you think?
With neither the constraint activity tag max hours daily or activities occupy max time slots from selection the generation will not be slowed down.
Maybe the generation is slowed down because of min days between activities with weight <100%, because FET retries more times.
Some testing might be interesting.
Quote from: Liviu Lalescu on March 25, 2018, 03:16:15 PM
Even with official FET this "bug" appears. See the attached file.
So why do we accept this "bug" to continue?
Is there a way to correct it?
Because other users might think the opposite: It is maybe not a bug for them. But respecting that addition rule might decrease speed significantly or even make their timetable impossible.
So in my opinion there is only 1 solution:
- keep the current behavior as it is
and
- add a new constraint (or better only a new checkbox in that constraint) that also care about the addition request
Quote from: Volker Dirr on March 26, 2018, 09:46:09 AM
Because other users might think the opposite: It is maybe not a bug for them. But respecting that addition rule might decrease speed significantly or even make their timetable impossible.
So in my opinion there is only 1 solution:
- keep the current behavior as it is
and
- add a new constraint (or better only a new checkbox in that constraint) that also care about the addition request
I agree
And I think it would be better to be integrated into a constraint "Min days between activities", such as a constraint "force consecutive if same day".
It's a good idea. What do you think Liviu?
I allowed this because nobody complained until now. The fact that this worked when consecutive if same day is selected is only determined by the fact that it was easier to implement like this in the algorithm.
I added this in the TODO:
""""""""""""
349---------------------------------------------------------
From Benahmed Abdelkrim (on forum):
He complains that if a constraint min days between activities has consecutive if same day unselected, there can be 3 activities on the same day (or real day, for the custom Morocco and Algeria versions).
Volker Dirr suggests to add a Boolean setting for the min days between activities constraints, so that only 2 activities are allowed on the same day if this value is true.
""""""""""""
It is not easy. For now, please use one of the other two solutions - activity tag max hours daily or activities occupy max time slots from selection.
Thank you dear Liviu!