Skip to content

Minimize hidden employees

Hidden employees are employees that do not exist. Shifts should only be assigned to them if otherwise a valid solution cannot be found. This for example happens, if there is a shortage on skilled employees. Hidden employees do not have the same rules as real employees, they can work multiple shifts per day. They should indicate how many employees / how many shifts are missing to get a valid schedule.

Implemented using Google's OR Tools

src/cp/objectives/minimize_hidden_employees.py
    possible_hidden_employee_variables.append(possible_hidden_employee_variable)

return sum(possible_hidden_employee_variables) * self._weight

We minimize the total number of assigned shifts of all hidden employees.