File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,7 @@ def __init__(
6161 self .w_mort_scale = config .get ("w_mort_scale" , 500 )
6262 self .K = config .get ("K" , 25000 ) #carrying capacity
6363
64- self .imm = config .get ("imm" , 1000 ) #colonization/immigration rate
65- self .theta = 5 #dispersion parameter for immigration
64+ self .imm = config .get ("imm" , 5000 ) # mean colonization/immigration rate
6665
6766 self .r = config .get ("r" , 1 ) #intrinsic rate of growth
6867
@@ -156,12 +155,9 @@ def step(self,action):
156155 if self .curr_month > 11 :
157156 new_adults = [np .random .binomial (size_freq [k ,0 ],self .w_mort_exp [k ]) for k in range (self .nsize ) ]
158157
159- #simulate new recruits for next year?
158+ #simulate new recruits for next year
160159 local_recruits = np .random .normal (self .dd_growth (size_freq [:]),self .env_stoch )
161- mu = self .imm
162- r = self .theta
163- p = r / (r + mu )
164- nonlocal_recruits = np .random .negative_binomial (r ,p )* (1 - np .sum (size_freq [:])/ self .K )
160+ nonlocal_recruits = self .imm * np .random .lognormal ()* (1 - np .sum (size_freq [:])/ self .K )
165161 recruit_total = local_recruits + nonlocal_recruits
166162
167163 logging .debug ('local recruits = {}' .format (local_recruits ))
You can’t perform that action at this time.
0 commit comments