daffidwilde/matching

resident oriented versus hospital oriented

pySRURGS opened this issue · 1 comments

Hi

Great project!
I wanted to confirm with you, is the hospital-residency matching resident oriented as opposed to hospital oriented?

Hi there, both orientations are included in the library but the default behaviour is to use the resident-optimal algorithm 👍

If you want to use the hospital-oriented algorithm, pass optimal="hospital" to HospitalResident.solve:

    def solve(self, optimal="resident"):
        """ Solve the instance of HR using either the resident- or
        hospital-oriented algorithm. Return the matching. """


        self._matching = Matching(
            hospital_resident(self.residents, self.hospitals, optimal)
        )
        return self.matching