Confused about Min, Max, stronger constraint wins

Started by Chafik Graiguer, September 21, 2010, 12:08:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chafik Graiguer

This is a quote from a previous thread:
Quote
Quotealfaromeo, I must enter individual constraints because in the case of min days for teachers, the specific constraints doesn't overwrite the general constraint. This only happens in other time constraints, but not in this one.

Liviu, if specific constraints overwrite general constraints in other cases, would it be possible that you make them overwrite also in min days for a teacher?

It was a misunderstanding: specific constraints don't overwrite general constraints. The rule is: stronger constraint wins, or: all constraints are satisfied. It is not nice, I found out recently because of your suggestions. I'll think about it.
But I am still confused about "stronger constraint wins"
Please, can you illustrate with the following examples? what is the "stronger" constraint in each case?:
1-
Max gaps for ALL teachers= 0
Max Gaps for Teacher T1= 2
What will happens for T1?

2-
Max gaps for ALL teachers= 2
Max Gaps for Teacher T1= 0
What will happens for T1?

3-
Min gaps for ALL teachers= 0
Min Gaps for Teacher T1= 2
What will happens for T1?

4-
Min gaps for ALL teachers= 2
Min Gaps for Teacher T1= 0
What will happens for T1?

5-
Two activities: A1 and A2 (each with some subactivities)
A1 and A2 have a tag TAG1
A1 has a second tag TAG2
Max periods with TAG1 = 1
Max periods with TAG2 = 2
(I mean Either A1 or A2, never both, due to limited labortory materials, but no problem for more than one A1 activities)
What will happen? will FET allow two A1 activities in a day where there is no A2 activities

Liviu Lalescu

#1
QuoteThis is a quote from a previous thread:
Quote
Quotealfaromeo, I must enter individual constraints because in the case of min days for teachers, the specific constraints doesn't overwrite the general constraint. This only happens in other time constraints, but not in this one.

Liviu, if specific constraints overwrite general constraints in other cases, would it be possible that you make them overwrite also in min days for a teacher?

It was a misunderstanding: specific constraints don't overwrite general constraints. The rule is: stronger constraint wins, or: all constraints are satisfied. It is not nice, I found out recently because of your suggestions. I'll think about it.
But I am still confused about "stronger constraint wins"
Please, can you illustrate with the following examples? what is the "stronger" constraint in each case?:

1-
Max gaps for ALL teachers= 0
Max Gaps for Teacher T1= 2
What will happens for T1?
T1=0

Quote
2-
Max gaps for ALL teachers= 2
Max Gaps for Teacher T1= 0
What will happens for T1?
T1=0

Quote
3-
Min gaps for ALL teachers= 0
Min Gaps for Teacher T1= 2
What will happens for T1?
You refer to min gaps between building changes, I think, there is no other min gaps constraint for teachers.
T1=2

Quote
4-
Min gaps for ALL teachers= 2
Min Gaps for Teacher T1= 0
What will happens for T1?
T1=2

Quote
5-
Two activities: A1 and A2 (each with some subactivities)
A1 and A2 have a tag TAG1
A1 has a second tag TAG2
Max periods with TAG1 = 1
Max periods with TAG2 = 2
(I mean Either A1 or A2, never both, due to limited labortory materials, but no problem for more than one A1 activities)
What will happen? will FET allow two A1 activities in a day where there is no A2 activities
No, FET will not allow two A1 activities, because it must respect max periods with TAG1, for A1.

I hope I am not mistaking. The best way to check is to make a small test file.

Chafik Graiguer

Thanks
Do, can we simply make a general rule:
"Individual constraint for a group's member overwite constraint for that group"
id this is true, why it didnot apply to Silvia's case:
QuoteI have tested this feature and it works, sure it does. The only thing that gives me a lot of problems is this:
I have like 50 teachers. Aproximately 10 of them work part time and should do a min and a max of 3 days. the other 40 teachers work a min and a max of 5 days. if I use this constraint for all teachers, there's no way that the specific restriction of "min/max days for a teacher" works. The min days is exclusive. I should enter min days for a teacher 50 times. Is there a way that min days for all teachers is overwritten by more specific restriction of min days for a teacher?
Is my question clear or is it cryptic?
thanks
Why she had to enter min days for a teacher 50 times?

Thanks again for your petience

Liviu Lalescu

No, you cannot make a rule like that. I think you misunderstood. The strongest constraint wins, not the individual one. See your question number 1 and the answer, T1=0.

It is not easy to make individual constraints override the universal ones. It is easy by programming, but incorrect and may have strange situations by logic reasoning.

Chafik Graiguer

Thanks a lot
Now I fully understood  :-[
When talking about Max, the lowest value wins
When talking about Min, the heighest value wins
Even for the same object: If we set two constraints:
1- Max periods.. for T1 = 4
2- Max periods.. for T1 = 2
The second one wins !!

Liviu Lalescu


Chafik Graiguer

#6
Quote
It is not easy to make individual constraints override the universal ones. It is easy by programming, but incorrect and may have strange situations by logic reasoning.
I was not talking about making "individual constraints override the universal ones"
I was only thinking of a way to speed up constraints input, so I for example can iput Min periods ... for ALL 50 teachers= 5, then set Min periods... for T1, T1 and T3 = 3

So here is my suggestion  :)
There is a handy feature when setting time not available or perfered time ...etc called : "Set all Allowed" and Set "All not allowed" so instead of clicking all rows or columns one by one, user can make all not allowed then make some slots allowed
or click All Allowed , then click some slot to make them Not Allowed
Why not extend this feature?
in the Max days per week for a teacher, after clicking Add button, is it possible to have a window like the one on the screenshot?
It will make all  Min periods.. for ALL..., Max gaps..for ALL... etc useless, and thus making drop down menus shorter, by using  a unique menu entry for each constraint
So instead of having double menu entries like: Max periods per day for a teacher and Max periods per day for all teachers We will have only Max periods per day for teachers
User will set the ALL flag only after clicking Add all button
Yes I know, Users are used to see constraints menu entries for ALL, but they will soon discover that it is still there, We only change its position to make it user freindlly  ;) 

Liviu Lalescu

#7
This was suggested in previous posts, it is wrote down.

It is not very difficult to add constraints for all teachers: click the "Down" arrow for each teacher, then press "Enter".