Author Topic: Please help user chalbi with his file  (Read 1109 times)

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Please help user chalbi with his file
« on: July 25, 2016, 11:33:57 AM »
Hello,

Please help user chalbi with his attached file. He uses FET Morocco.

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Please help user chalbi with his file
« Reply #1 on: July 25, 2016, 11:36:33 AM »
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.

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Please help user chalbi with his file
« Reply #2 on: July 25, 2016, 12:48:37 PM »
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.

Volker Dirr

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 1906
    • View Profile
Re: Please help user chalbi with his file
« Reply #3 on: July 25, 2016, 01:26:10 PM »
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?

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Please help user chalbi with his file
« Reply #4 on: July 25, 2016, 01:44:44 PM »
I added a new file, liviu3+all the initial space constraints. It still solves fast.

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.

Benahmed Abdelkrim

  • Level 5
  • *****
  • Posts: 727
  • The most beautiful is the simple
    • View Profile
Re: Please help user chalbi with his file
« Reply #5 on: July 25, 2016, 02:02:38 PM »
  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?
B.A/krim

Benahmed Abdelkrim

  • Level 5
  • *****
  • Posts: 727
  • The most beautiful is the simple
    • View Profile
Re: Please help user chalbi with his file
« Reply #6 on: July 25, 2016, 02:09:13 PM »
  I think it is confusion between custom version and official version.I tried to look ..
B.A/krim

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Please help user chalbi with his file
« Reply #7 on: July 25, 2016, 02:48:49 PM »
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.

Benahmed Abdelkrim

  • Level 5
  • *****
  • Posts: 727
  • The most beautiful is the simple
    • View Profile
Re: Please help user chalbi with his file
« Reply #8 on: July 25, 2016, 03:01:24 PM »
  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.
« Last Edit: July 25, 2016, 03:27:46 PM by Benahmed Abdelkrim »
B.A/krim

Volker Dirr

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 1906
    • View Profile
Re: Please help user chalbi with his file
« Reply #9 on: July 25, 2016, 04:43:13 PM »
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

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Please help user chalbi with his file
« Reply #10 on: July 25, 2016, 11:21:41 PM »
I'll think about it. I don't know why I did not add it initially.

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Please help user chalbi with his file
« Reply #11 on: July 26, 2016, 05:17:16 AM »
I updated Algeria FET and Morocco FET, I added these new checks as suggested by Volker Dirr.

Benahmed Abdelkrim

  • Level 5
  • *****
  • Posts: 727
  • The most beautiful is the simple
    • View Profile
Re: Please help user chalbi with his file
« Reply #12 on: July 26, 2016, 09:24:15 AM »
thank you very much for mr.liviu and mr. Volker  :)
B.A/krim