Is there an extension of the Hungarian algorithm that caters for the assignment of multiple jobs per worker? In its simplest form, the algorithm assigns a single job to a single worker.
My application is a profit maximization problem, with 3 workers and 180 jobs. I'll add constraints as well (minimum of 50 jobs assigned to each worker).
I've managed to implement the Hungarian algorithm using the mungres library in Python, which works very well. I'm just struggling to find literature related to multiple assignments per worker.
https://pypi.python.org/pypi/munkres
https://en.wikipedia.org/wiki/Hungarian_algorithm
https://en.wikipedia.org/wiki/Generalized_assignment_problem
I've tried the standard numpy method listed in the comments, but was unable to extend it to multiple assignments per worker. If my matrix is rectangular (i.e. 3 workers and 4 jobs) only the first 3 jobs are assigned to the workers. I've also tried adding dummy variables to create a square matrix, but then jobs are assigned to those dummy workers rather than the actual workers
One simple way of doing this is to make, for example, 50 clones of each worker and solve the problem as normal.
To find worker 1's jobs, you can then collect all the jobs assigned to the clones of worker 1. There are only 50 clones, so worker 1 will be assigned to at most 50 jobs.
This kind of assignment problem can be expressed as a min-cost flow problem where there is flow from a worker to a job if the worker does a job.
In this formulation, each worker is supplied with a capacity of 1 flow unit. You can then increase the number of jobs by simply increasing the capacity as required.
This approach is likely to be more efficient (as the graph is smaller) but requires modification of the underlying algorithm, whereas approach 1 should be trivial to implement.