Class StableMatching


public class StableMatching extends SatisfactionProblem
Stable Matching problem: Given n students and n companies, where each student (resp. company) has ranked each company (resp. student) with a unique number between 1 and n in order of preference (the lower the number, the higher the preference), say for summer internships, match the students and companies such that there is no pair of a student and a company who would both prefer to be matched with each other than with their actually matched ones. If there are no such pairs, then the matching is said to be stable. Wikipedia.
  • Field Details

    • n

      public final int n
    • rankCompanies

      public final int[][] rankCompanies
    • rankStudents

      public final int[][] rankStudents
    • student

      public IntVar[] student
    • company

      public IntVar[] company
    • studentPref

      public IntVar[] studentPref
    • companyPref

      public IntVar[] companyPref
  • Constructor Details

    • StableMatching

      public StableMatching(String instanceFilePath)
  • Method Details