def singleRun(): params = transmission.Params() params.transmissionType = 'prestige' params.nAgents = 30 params.nSteps = 10 params.output = 'output_tr_0.csv' transmission.run(params)
def experiment(): numRuns = 100 transmissionTypeSweep = ['vertical','encounter','prestige','conformist'] params = transmission.Params() params.xDim = 10 params.yDim = 10 params.replacementRate = 0.1 params.moveDistance = 1.0 params.interactionRadius = 1.0 params.innovationRate = 0.01 params.nTraits = 3 params.nTraitRange = 5 params.prestigeIndex = 1 params.nSteps = 1000 params.storeAllSteps = True params.oneFile = False totalRuns = 0 # perform numRuns of each type, randomly sampling from nAgents 10 to 500 for i in transmissionTypeSweep: for j in range(0, numRuns): print('run:',totalRuns+1,'of:',numRuns*len(transmissionTypeSweep)) params.numRun = totalRuns params.transmissionType = i params.nAgents = random.randint(50,500) params.output = 'output_tr_'+str(params.numRun)+'.csv' totalRuns += 1 transmission.run(params)
def singleRun(): params = transmission.Params() params.transmissionType = 'prestige' params.nAgents = 30 params.nSteps = 100 params.output = 'output.csv' params.oneFile = False transmission.run(params)
def multiple(): numRuns = 30 params = transmission.Params() params.transmissionType = 'prestige' params.nAgents = 100 params.nSteps = 1000 params.output = 'output_tr_0.csv' for j in range(0, numRuns): print('run:', j + 1, 'of:', numRuns) params.numRun = j params.output = 'output_tr_' + str(j) + '.csv' transmission.run(params)
def multiple(): numRuns = 30 params = transmission.Params() params.transmissionType = 'prestige' params.nAgents = 100 params.nSteps = 1000 params.output = 'output_tr_0.csv' for j in range(0, numRuns): print('run:',j+1,'of:',numRuns) params.numRun = j params.output = 'output_tr_'+str(j)+'.csv' transmission.run(params)
def exploreNumberOfAgents(): numRuns = 4 transmissionTypeSweep = ['vertical','encounter','prestige','conformist'] params = transmission.Params() totalRuns = 0 # perform numRuns of each type, randomly sampling from nAgents 10 to 500 for i in transmissionTypeSweep: for j in range(0, numRuns): print('run:',totalRuns+1,'of:',numRuns*len(transmissionTypeSweep)) params.numRun = totalRuns params.transmissionType = i params.nAgents = random.randint(10,500) params.output = 'output_tr_'+str(params.numRun)+'.csv' totalRuns += 1 transmission.run(params)
def exploreNumberOfAgents(): numRuns = 50 transmissionTypeSweep = ['vertical','encounter','prestige','conformist'] params = transmission.Params() params.nSteps = 1000 totalRuns = 0 # perform numRuns of each type, randomly sampling from nAgents 10 to 500 for i in transmissionTypeSweep: for j in range(0, numRuns): print('run:',totalRuns+1,'of:',numRuns*len(transmissionTypeSweep)) params.numRun = totalRuns params.transmissionType = i params.nAgents = random.randint(50,500) params.output = 'output_tr_'+str(params.numRun)+'.csv' totalRuns += 1 transmission.run(params)