Skip to content

Maximize Wishes

We try to grant as many wishes of the employees as possible. The employee can wish for a free shift or a complete free day.

Implemented using Google's OR Tools

src/cp/objectives/maximize_wishes.py
for ...
    for ...
        penalties.append(penalty)

return cast(LinearExpr, sum(penalties)) * self.weight

For each employee we penalize all wished shifts or days that are not granted.