Reputation: 401
I am trying to implement a team selection algorithm - say we have n people each having skills ordered based on their execellence: P1 {ruby, python, java} meaning he is more proficient in ruby than java, similarly P2.. so on. I have projects Proj1 that requires people having some skills {say ruby, python etc.}, Proj2, etc. How do I distribute the people among the projects for a fair distribution (lets assume one person can work on only one project)?
Upvotes: 1
Views: 1394
Reputation: 19621
Here is another linear programming approach, based on the theory that nobody notices if you finish early, but you're in big trouble if you finish late.
For each project, estimate the number of standard programmer hours of each skill required.
For each programmer and each skill, estimate how long (because of their particular skill level) they have to work to produce one standard programmer-hour's worth.
You then need to solve a linear program where most of the unknowns are of the form Pijk, where Pijk is the number of elapsed hours programmer i spends working on skill j of project k.
You immediately have the constraint that SUM_j,k Pijk <= Qi, where Qi is the total amount of time programmer i has to spare, on all projects.
The total amount of work done on skill j of project k is SUM_i Pijk*Eij, where Eij depends on how good programmer i is at skill j. The amount of slack for a particular activity, given the Pijk, is Sjk = SUM_i Pijk * Eij - Wjk, where Wjk is the total amount of work to do for that skill and project. If the minimum amount of slack on any skill of any project is S, then we have the constraint that S <= Sjk.
Because missing deadlines is expensive, I claim that a good objective function is to maximise S, the minimum amount of slack on any skill of any project. All this is given as a set of linear inequalities, so you should be able to find the Pijk that lead to a maximum possible S as a linear programming problem.
Upvotes: 0
Reputation: 2594
Here is my proposal with problem definition gaps filled with my assumptions. This is similar to linear programming approach in Ankush's answer
You assign weight to every skill in programmer's possession:
P1{java,ruby,python} -- P1{1, 0.5, 0.25}
P2{ruby,python} -- P2{1, 0.5}
P3{python,ruby,java} -- P3{1, 0.5, 0.25}
Now your project requirement is:
Project{java,python}
So, you take every programmer's weights, multiply each by 1 (skill required) or 0 (skill not required):
P1_suitability = 1*1 + 0.5*0 + 0.25*1 = 1.25
P2_suitability = 1*0 + 0.5*1 = 1
P3_suitability = 1*1 + 0.5*0 + 0.25*1 = 1.25
You choose P1 and P3 to your project
Another project requires:
Project{ruby,python}
calculating suitability:
P1_suitability = 1*0 + 0.5*1 + 0.25*1 = 0.75
P2_suitability = 1*1 + 0.5*1 = 1.5
P3_suitability = 1*1 + 0.5*1 + 0.25*0 = 1.5
You enlist P2 and P3 for your other project
Again, this is very speculative solution, because the problem definition is not complete. Anyway, was not a bad exercise..
Upvotes: 1
Reputation: 2554
Linear programming can be applied here. You need to define fair distribution in term of a goal which can be maximized or minimized. Then add constraints according to projects. You can solve this using any LP solver, e.g. lpsolve. Quoting history of LP from wikipedia
Dantzig's original example was to find the best assignment of 70 people to 70 jobs.
Hope this helps.
Upvotes: 1