Re:What happened when Boston Public Schools tried for equity...
by ThrustVectoring on Monday September 24, 2018 @05:28PM
(#18061618)
Note that this is the "stable roommates problem" and does not necessarily have an "optimal" solution (where "optimal" means "no unmatched pair of people would've rather been matched together". Eg, if Albert prefers Bob over Charles, Bob prefers Charles over Albert, and Charles prefers Albert over Bob, and all three prefer being matched with the last person over anyone else).
If I had to do it today, I'd probably put the list of pair scores on one sheet (e.g. Snuffy/Smith at +5, Smith/Jones at -3) and perform iterative swapping as you suggested.