simoncarrignon / mixed-transmission

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

Distance proportional migrations. #33

Open simoncarrignon opened 10 months ago

simoncarrignon commented 10 months ago

So far the choice of partenairs is made using the function matchingSingle which handle a correct pairing of available individual from different communities and opposit sex.

It's not a trivial operation and so far it's done via the line below:

https://github.com/simoncarrignon/mixed-transmission/blob/d5c533e19c630c5beafc546fa1be96a92f4de15a/R/marriage.R#L27-L32

among the potential single individual one is randomly chosen, a a partner is randomly selected in the pool of available single indviduals. This need to be modified to take into account the distance between the communities and favors unions between closer comunities. The choice of c2 (the comunity of the partner to be selected) should be modulated using the distance between c1 and all possible communities.