I am trying to write a JMP script to create mentee/mentor matches for a mentoring program at my company. I've got the portion that accounts for mentee and mentor ranking preferences that results in a matrix of preferred mentor for each mentee by rank (1 being the best and 10 being the worst). The issue I'm running into is how to handle it if there are multiple mentees with the same mentor at a given rank (example Mentee 1, Mentee 4, and Mentee 7 all have Mentor 2 at Rank 1). The decisions aren't difficult to do manually, but I can't figure out how to script them. Manual decisions work for the initial pilot with a small group of test participants, but I would like to script something if possible for when the program is expanded. Is this something that's possible in JMP?
Please see the attached table for the structure of the matrix matching table. In the table I used M# to designate mentors, E# to designate mentees, and R# to designate ranks.