|
From: Joane E. <joa...@al...> - 2019-07-04 05:48:34
|
Hello,
I have several subpopulations. I'd like to set up one infofield that would represent the subpopulation where the individual was born (the infofield is called 'origin'). It seems to me that during-mating taggers only allow to assign infofields to offspring based on parents' infofields, not something independent from parents (like the subpopulation of birth).
Alternatively I found a way to add the information right after reproduction using Infoexec, but with 12 subpopulations it looks bulky and inefficient:
postOps=[
sim.InfoExec('origin=0', subPops=[(0,0)]),
sim.InfoExec('origin=1', subPops=[(1,0)]),
sim.InfoExec('origin=2', subPops=[(2,0)]),
sim.InfoExec('origin=3', subPops=[(3,0)]),
sim.InfoExec('origin=4', subPops=[(4,0)]),
sim.InfoExec('origin=5', subPops=[(5,0)]),
sim.InfoExec('origin=6', subPops=[(6,0)]),
sim.InfoExec('origin=7', subPops=[(7,0)]),
sim.InfoExec('origin=8', subPops=[(8,0)]),
sim.InfoExec('origin=9', subPops=[(9,0)]),
sim.InfoExec('origin=10', subPops=[(10,0)]),
sim.InfoExec('origin=11', subPops=[(11,0)]),
(By the way, all subpopulations are age-structured and virtual subpopulation 0 correspond to the newborns)
Is there a 1-line solution that I overlooked?
Thank you!
Joane Elleouet
|