JensB
4/26/2012 4:50:00 AM
This is more of a theoretical question, as I can't seem to get my head
around how to do this. What I am hoping for is that someone could
define an approach - once I have that, I can code it.
The situation is as follows.
We have four possible positions, and each of those positions may have a
number of availabilities.
We have two canditates, who each have a valid score for each of those
positions. We need to establish if a candidate is required to fill a
position, based on what would give us the greatest total score - there
is no positional weighting.
It is best to explain with examples: -
Candidate 1 scores - P1:12, P2:29, P3:12, P4:9
Candidate 2 scores - P1:10, P2:29, P3:10, P4:9
1. No positions available. Neither candidate is assigned a position.
2. P1 Available only - C1 Assigned to P1, C2 Unassigned (12 Total)
3. 2 x P1 Available - C1 and C2 both assigned to P1
4. P1 and P2 Available - C1 Assigned to P1, C2 assigned to P2 (41
Total)
5. 2 x P1 and 1 x P2 Available - C1 Assigned to P1, C2 assigned to P2
(41 Total)
6. 1 x P1 and 2 x P2 Available - C1 and C2 both assigned to P2 (58
Total)
7. P1 and P3 Available - C1 Assigned to P1, C2 assigned to P3 (22 Total
- either combination will give same score, so order irrelivent)
8. P2 Available only - C1 Assigned to P2, C2 Unassigned (29 Total -
both have same score so either is acceptable - pick first)
9. P2 and P3 Available - C1 Assigned to P3, C2 assigned to P2 (41
Total)
A. P1, P2 and P3 Available - C1 Assigned to P1, C2 assigned to P2 (41
Total - again, same notes on C1 assignment - whether it is P1 or P3
does not change the score)
I could give more examples, but this should hopefully explain it
enough. If you have any further questions, please ask.
--
Michael Cole