Description Usage Arguments Value Algorithm Who can mate?
We draw a box of 'radius' k
around the agent.
k
is an ABC parameter and usually between 11m to 100m.
Note that here we mainly deal with ID number, an actual data.table variable,
and not the agent's index in the main data.table.
1 | find_mate(femID, k, max_daily_mates, mozzie.dt)
|
femID |
ID of female looking for mate. |
k |
Distance within which female mosquito 'searches' for mate. ABC parameter. |
max_daily_mates |
Number of times a male can mate in a day. |
mozzie.dt |
Data.table of adult mosquitoes. |
mateID
of agent, or -1 if agent does not find a mate.
Algorithm for finding a mate:
If there are no males within box, return -1 for no mate.
If there is 1 male, that is the new mate.
If there is >1 male, randomly choose one.
Note that there is a max. number of agents that a male can mate with in a day,
given by max_daily_mates
.
It is important in testing to ensure that the gonoCycle
variable for
each male mate is properly updated on a global scope.
We assume that females only mate once.
Recall that in order to mate, a female mosquito must have:
enzyme
between 1.2 and 1.8 inclusive
gonoCycle
1, 2 or 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.