This is the Hospitals/Residents algorithm that matches or reserves cadets to their Rated AFSCs depending on the
source of commissioning (SOCs).
Source code in afccp/main.py
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065 | def soc_rated_matching_algorithm(self, p_dict={}, printing=None):
"""
This is the Hospitals/Residents algorithm that matches or reserves cadets to their Rated AFSCs depending on the
source of commissioning (SOCs).
"""
if printing is None:
printing = self.printing
# Reset instance model parameters
self._reset_functional_parameters(p_dict)
# Get the solution and solution iterations we need
combined, reserves, matches = afccp.solutions.algorithms.soc_rated_matching_algorithm(
self, soc=self.mdl_p['soc'], printing=printing)
# Determine what to do with the solution(s)
for solution in [reserves, matches, combined]:
self._solution_handling(solution, printing=False) # Don't want print updates for this
return solution
|