A teacher can be available for 2 hours from selected ports...

Started by alex, September 20, 2015, 10:32:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alex

The problem:
My school: 5 days per week, 9 hours per day
A teacher is not available (AT ALL) for the 7th, 8th, 9th hours (this is the easy part for me).
The 1st hour is quite difficult for him (and me!!!). He can be available for the 1st hour for just two days (WHICH ARE NOT SPECIFIC) of the week. This means that he can work for two days for the 1st hour and I have the option to specify these exact two days.
What are the constraints that I should give in order to ensure his availability for just two days (AN NOT MORE) per week for the first hour WITHOUT giving a constraint for two specific days? I was thinking that a constraint of the type the teacher is not available for the 1st hour, with a weight percentage of 60% should give such a solution, but does the weight percentage work in this way? Thanks!

Liviu Lalescu

Quote from: alex on September 20, 2015, 10:32:21 AM
I was thinking that a constraint of the type the teacher is not available for the 1st hour, with a weight percentage of 60% should give such a solution, but does the weight percentage work in this way?

No, in this case percentage is just a weighting of the overall constraint.

But you have a perfect method with the famous constraint activities occupy max time slots from selection: all activities of this teacher, selected slots = all 5 first slots of the week, max selected = 2.

alex

Thank you Liviu! Your application is really GREAT! I thought that the number max selected hours should be at least equal to the total working hours per week of the teacher, but I was WRONG! Your solution works!

Liviu Lalescu

Sorry, there is a much easier solution: constraint teacher interval max days per week, interval = from first hour to the second.


Liviu Lalescu