pyworkforce
pyworkforce copied to clipboard
Allow for partially feasible MinRequiredResources solutions
Is your feature request related to a problem? Please describe.
This library has been extremely helpful for handling staffing problems at a high level. We have a use case where we determine what the required resources are for a period using erlang c and we feed that result into the required_resources
parameter of MinRequiredResources
along with shifts coverage. In some cases, we will have a resource requirement for a period without shifts coverage.
Describe the solution you'd like
For example, MinRequiredResources.solve()
would take an optional argument, called something like allow_unmet_resource_requirements
which changes the behavior to return the solution as normal with an extra key, unmet_resource_requirements
, which could be an array of integers representing the indices of required_resources
Describe alternatives you've considered
As a workaround, we can have special handling which sets required resource value to 0
for the hours without overlapping shifts coverage, but it would be nicer to just be able to solve without having to do that and have returned some type of data around which periods were not feasible based on shifts coverage. MinAbsDifference
solver will also work in these situations, but causes the results for the solvable periods to sometimes fall below min requirements even if it is feasible
Additional context The workaround is fine for now, but if there is a general desire for such a feature, I'd be interested in offering some help :)