def setup_app():
    applist=[]
    for qualty in [100,20,90,80,50,30,40,10,70,60]:
        name = App()
        name.quality = qualty
        name.name = 'a'+str(qualty)
        applist.append(name)
    return applist
def setup_app():
    applist = []
    for qualty in [100, 20, 90, 80, 50, 30, 40, 10, 70, 60]:
        name = App()
        name.quality = qualty
        name.name = 'a' + str(qualty)
        applist.append(name)
    return applist
def setup_app():
    applist=[]
    for qualty in [100,20,90,80,50,30,40,10,70,60, 25,95,85,55,35, 45, 15, 75, 65, 15, 10, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9]:
        name = App()
        name.quality = qualty
        name.observed_1 = .8
        name.observed_2 = 1.25
        name.applied_to = 3
        name.name = 'a'+str(qualty)
        applist.append(name)
    return applist
示例#4
0
        self.number_to_interview = 10 * tname.openings
        self.observe_1 = r.gauss(1, .2)
        self.observe_2 = tname.observe_2 = (r.gauss(1, .1)- tname.observe_1)
        self.observed_1 = r.gauss(1, .2)
        self.observed_2 = (r.gauss(1, .1)- tname.observed_1) # based on applicant interviewed, percentage
        self.num_to_rank = 7 * tname.openings
        self.accept_range = [.7, None] # as a % [.5, 1.5] if [.7, None] then there is no upper limit

#Make the list of Applicants

print('Make a list of Applicants')
all_applicants = []
for x in range(1, 5000):
    tname = 'app'+str(x)
    tname = Applicant()
    tname.name = x
    # Comment out the Following to use defualt
    tname.quality = max(min(r.gauss(50, 20), 100), 1) # on a scale 0-100
    tname.observe_1 = r.gauss(1, .2) # as a percentage, Applicant error in observing the institutions quality
    tname.observe_2 = (r.gauss(1, .1)- tname.observe_1)
    tname.observed_1 = r.gauss(1, .2) # as a percentage, Institutions error (as seen) in observing the applicants quality
    tname.observed_2 = (r.gauss(1, .1)- tname.observed_1) # CORRECT change to observed_1 after interview default = 1
    tname.applied_to_range = [.8, 1.2] # as a percentage, for example [0.8, 1.2]
    tname.num_applied_to = 12 # the maximum number that the applicant applies to

    all_applicants.append(tname) #Add Applicant to the list of Applicants

# Import institution mAtch data
# Make the list of Institutions
print('importing institution data')
data2008 = InstitutionData('/Users/vmd/Dropbox/Match/residency-match-simulation/matchdata2008.csv', 140, 'C', 1)
示例#5
0
import sys
import random as r
from applicant import Applicant
from institution import Institution
from importdata import InstitutionData
from match import Match
from results import StatsAndplots

sys.path.append('/Users/vmd/Dropbox/Match/rms')

print('Make a list of Applicants')
all_applicants = []
for x in range(1, 5000):
    tname = Applicant()
    tname.name = str(x)
    ##### Comment out the Following to use defualt
    tname.quality = max(min(r.gauss(50, 20), 100), 1)  # on a scale 0-100
    tname.observe_1 = r.gauss(
        1, .3
    )  # as a percentage, Applicant error in observing the institutions quality
    tname.observe_2 = (r.gauss(1, .3) - tname.observe_1)
    tname.observed_1 = r.gauss(
        1, .3
    )  # as a percentage, Institutions error "as seen" in observing the applicants quality
    tname.observed_2 = (
        r.gauss(1, .3) - tname.observed_1
    )  # CORRECT change to observed_1 after interview default = 1
    tname.applied_to_range = [.25,
                              1.75]  # as a percentage, for example [0.8, 1.2]
    tname.num_applied_to = 12  # the maximum number that the applicant applies to
    tname.verbose = True