|
static |
Finds optimal assignments for a matrix of agents and costed tasks.
The optimization looks for the best assignment of the first index from the input data using the Hungarian Method.
Note that the column/row model for agents and tasks is just a mental model. It depends on your input data, whether the first index or the second index represents the agent or the task. However, we will optimize for the first index. Original code provided in 2010 by Alex Regueiro under MIT License.
costs | A cost matrix; each row contains elements that represent the associated costs of each task for the agent. |