Staff planning must be some kind of optimization problem with an added social component.