Hello,
Please help user chalbi with his attached file. He uses FET Morocco.
chalbi, you should have started with simpler files which were still solvable, then add the constraints. Your file is very complicated. I do not see the problem now - I am a bit tired. I hope other users can help with advice. I might try again later.
I made the attached file (removed all the constraints and added a few new ones). It solves fast. You might want to take a look and make progressive approach to add constraints to it, making sure it still solves.
We can talk some more on this.
Yes, there are a lot of bugs in the file.
i tracked down one bug.
see attached file. i removed NEARLY ALL constraints.
file is still impossible.
but if you increase students max hours up to 7, then it solve in a second.
sadly that isn't the only bug. there are more bugs.
you should start from new with Livius file and or do it like me and track down bugs and solve them.
Liviu, please see the attached file. Do you think it is possible to write a check for this situation so FET can already warn before it generates?
I added a new file, liviu3+all the initial space constraints. It still solves fast.
Quote from: Volker Dirr on July 25, 2016, 08:26:10 PM
Liviu, please see the attached file. Do you think it is possible to write a check for this situation so FET can already warn before it generates?
In the official FET, there is a check for that (I assume you mean max hours daily?). But I had to deactivate it in Morocco FET, because of reasons I am not sure right now. Maybe it is too difficult to care for a general situation. Anyway, the user should take care of this. It is better than to reject correct situations.
for the Moroccan system, it has only 4 hours per half day. I think it has introduced an error, or maybe I do not understand?
I think it is confusion between custom version and official version.I tried to look ..
I added also min days between activities constraints (using the advanced spread of activities over the week). It solves (a bit more difficult). See the attached file.
as I thought, this file contains several conflicts between constraints, with a weight of 100% !, so we both possible way:
1- be satisfied with the solution proposed by mr.Liviu;
2 give more details of mr Chalbi.
There are also much more simple bugs in the original file. Fox example all students have got a max 6 hours per day constraint. In that week are 6 allowed days. So a student can have max 6*6=36 hours. But he added more then 36 hours to all students. That is of course impossible.
Liviu, i think the old max days check shouldn't be to difficult.
If (number of days mod 2 == 0) -> continue.
if (number of days mod 2 ==1) -> number of days += 1
number of days /=2
if((number of hours of an teacher or student per week/number of days)>max hours per day) -> warning: it is impossible
I'll think about it. I don't know why I did not add it initially.
I updated Algeria FET and Morocco FET, I added these new checks as suggested by Volker Dirr.
thank you very much for mr.liviu and mr. Volker :)