Eva
Eva

Reputation: 11

Using Hungarian algorithm when workers are in rank order

I'm not sure if the application of the Hungarian Algorithm is correct in this situation. I need to assign a job to a ranked order list of employees (ordered by seniority) based on their preferences - where they have ranked every option.

So the most senior person gets their first choice, the second most senior person gets their first choice (unless already chosen then they get their second choice), the third most senior person gets their first choice (unless already chosen, then their second choice unless already chosen, then their third choice) and so on.

I've tried using what I think is just a general application of the Hungarian Algorithm where my selection matrix contains waited values of choices, but this doesn't seem to produce the desired result. Each row represents an employee and each column is the work assignment.

selection_matrix = [[1,2,3,4,5],[4,2,6,10,8],[3,9,15,12,6],[12,16,20,8,4],[15,5,20,10,25]] 

Upvotes: 1

Views: 105

Answers (0)

Related Questions