1212# we want initialisation to be identical across all processes
1313#randomSeed(1)
1414
15- replicate = sys .argv [1 ] if len (sys .argv )>= 2 else 1
15+ numReplicants = 100
16+
17+ replicate = numReplicants * int (sys .argv [1 ]) if len (sys .argv )>= 2 else numReplicants
1618
1719# we want the array operations to have a different seed across processes
1820array_urand .seed (int (1024 * random ()))
@@ -35,7 +37,7 @@ def av(x):
3537#mut_max=float(sys.argv[3]) # mutation rate
3638#migration=float(sys.argv[4]) # initial migration rate
3739
38- print ("Replicate, Area, Mutation rate, Migration rate, Number of species, Interaction strength^2" ,flush = True )
40+ print ("Replicate, Area, Max mutation, Init. Mig, Init. num sp, Mutation rate, Migration rate, Number of species, Interaction strength^2" ,flush = True )
3941for A in [1 , 2 , 4 , 6 , 9 , 12 , 16 ]:
4042 for mut_max in [1e-5 , 1e-4 , 1e-3 ]:
4143 for migration in [1e-6 , 1e-5 ]:
@@ -71,11 +73,12 @@ def av(x):
7173 ecolab .mutation (nsp * [mut_max ])
7274 ecolab .migration (nsp * [migration ])
7375
74- for i in range (100 ):
76+ for i in range (1000 ):
7577 step ()
7678
77- conn = sum ([x * x for x in ecolab .interaction .val ()])/ len (ecolab .species )** 2 if len (ecolab .species )> 0 else 0
78- print (replicate ,numX * numY , av (ecolab .mutation ()), av (ecolab .migration ()), len (ecolab .species ), conn , flush = True ,sep = ',' )
79-
79+ for i in range (numReplicants ):
80+ step ()
81+ conn = sum ([x * x for x in ecolab .interaction .val ()])/ len (ecolab .species )** 2 if len (ecolab .species )> 0 else 0
82+ print (replicate + i ,numX * numY , mut_max , migration , nsp , av (ecolab .mutation ()), av (ecolab .migration ()), len (ecolab .species ), conn , flush = True ,sep = ',' )
8083
8184
0 commit comments