Closed janavanhu closed 7 years ago
The mating scheme itself does not provide this feature so you would have to use multiple mating schemes for this purpose. Basically, you can do something like:
for gen in range(1000):
pop.evolve(...
HeteroMating(..., weight=weight_func(gen), ...),
gen = 1)
Dear Bo Peng,
thank you very much! That solves my issue!
All the Best, Vanessa
Great. The only problem is that if you have operators in preOps
and postOps
, they will need to be moved outside of the loop to avoid applying these operators repeatedly for each generation.
Dear Bo Peng,
thank you first of all for a great programme!
I am trying to simulate a population with overlapping generations and age specific female fecundity. I use a heteroMating Scheme with CloneMating and HomoMatings that use different parentChoosers and Offspring generators to have females of different age classes produce different numbers of offspring. I would like to determine the weight again each generation, as it depends on the number of females currently within each age group. Is it possible to do that?
Kind regards, Vanessa