simoncarrignon / mixed-transmission

GNU General Public License v3.0
1 stars 0 forks source link

Yeah so what I am saying is that `cid` should uniquely identify a couple ; then `fid` could/should identify only the children of this couple. We don't need the `fid` of the couple to match the `fid` of the childs. #17

Closed simoncarrignon closed 10 months ago

simoncarrignon commented 10 months ago
          Yeah so what I am saying is that `cid` should uniquely identify a couple ; then `fid` could/should identify only the children of this couple. We don't need the `fid` of the couple to match the `fid` of the childs.

Thus, at any given point in time, a nuclear family is given by all the individuals with the same fid --those are all the children, + the two individuals with the same cid, which match the fid of the childrens, those are the parents.

if we have:

p1 and p2 get married and got a new cid, 8 then:

Later on in time they have two kids

Later on k1 get married to a who move in k1,k2,p1,p2 communitys ; and a need to learn from one of k1's parents. we get those by doing:

k1.parents = population[population[,"cid"] == k1[,"fid"],]
a[,"traits"] = sociallearning(k1.parents)

in this case k1.parents should contain only p1 and p2 an noone else. What I say is that I think that we don't have to change p1 and p2 fid's. If don't change them we could even gets k1.greatparents doing:

k1.greatparents = population[ population[,"cid"] %in% k1.greatparents[,"fid"],]

Everything stays the same but we don't do:

population[c(c1,c2),"fid"]=maxcid

Originally posted by @simoncarrignon in https://github.com/simoncarrignon/mixed-transmission/issues/14#issuecomment-1823144878