I'm scheduling lessons in a class room. The students learn 5 days a week but a certain teacher works only 4 days a week. The day off is nto predefined - the optimizer should give him a day off.
I tried doing it with IloElement, where an int var day == ilodiv(start_of_interval,24) is used in the element into an array of ints with a constraint that enforces the var in the last array corresponding to the day to 1. The sum of the last array =4.
This seams to cause very slow optimizations.
is there a better way?