예제 #1
0
def singleRun():
    params = transmission.Params()
    params.transmissionType = 'prestige'
    params.nAgents = 30
    params.nSteps = 10
    params.output = 'output_tr_0.csv'
    transmission.run(params)
예제 #2
0
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)
예제 #3
0
def singleRun():  
    params = transmission.Params()
    params.transmissionType = 'prestige'
    params.nAgents = 30
    params.nSteps = 10
    params.output = 'output_tr_0.csv'
    transmission.run(params)
예제 #4
0
def singleRun():  
    params = transmission.Params()
    params.transmissionType = 'prestige'
    params.nAgents = 30
    params.nSteps = 100
    params.output = 'output.csv'
    params.oneFile = False 
    transmission.run(params)
예제 #5
0
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)
예제 #6
0
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)
예제 #7
0
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)
예제 #8
0
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)