where can I find the part of code to check of the validity of each constraint?

Started by ahmedzaalan, November 19, 2011, 03:39:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ahmedzaalan

hello!
I have some questions
first of all where can I find the part of code in which you test if a constraint is valid for an activity for a  time slot
for example if some activity have the constraint :
MindaysPerWeekForAStudentSet 
then where is the part of code that checks for example that (Monday/08-09) is An valid slot??

The second Question is when do you check the constraint that include Min(days/hour /etc.)
because it depends on  future data ,so how could you decide whether this slot is valid if you haven't placed all activities yet ,I working on a project for our university and I am thinking about checking this constraint after fishing placing all the activities related to the (student set/teacher) mentioned in the constraint

Liviu Lalescu

Quote from: ahmedzaalan on November 19, 2011, 03:39:30 AM
hello!
I have some questions
first of all where can I find the part of code in which you test if a constraint is valid for an activity for a  time slot
for example if some activity have the constraint :
MindaysPerWeekForAStudentSet 
then where is the part of code that checks for example that (Monday/08-09) is An valid slot??


See function Generate::randomSwap(...) in generate.cpp.

Quote

The second Question is when do you check the constraint that include Min(days/hour /etc.)
because it depends on  future data ,so how could you decide whether this slot is valid if you haven't placed all activities yet ,I working on a project for our university and I am thinking about checking this constraint after fishing placing all the activities related to the (student set/teacher) mentioned in the constraint

See the function I mentioned above (more precisely, lines 6108 and below, in FET-5.15.0).

I tried something similar to your idea, when searching for the perfect algorithm. The idea is not working, practically. It is also logical that it isn't good in practice.