Parameters are stored in the parameter dictionary `p`
### General parameters
-```"reflected"=>true```: if ```true``` then reflection occurs on the first trait -which should stand for geographic position. Depending on the agent type, reflections occurs in the domain $` [-1,1] `$ or between nodes 1 and `p["nodes"]`
-```"reflected"=>true```: if ```true``` then reflection occurs on the first trait -which should stand for geographic position. Depending on the agent type, reflections occurs in the domain `` [-1,1] `` or between nodes 1 and `p["nodes"]`
-```"alpha" => α```: is the competition function
-```"K" => K```: is the birth rate
-```"tend" => 1.5```: is the time to end simulation
...
...
@@ -30,16 +30,16 @@ Parameters are stored in the parameter dictionary `p`
### Mutation
If anisotropy in mutation, the following parameters should be declared as arrays where each entry corresponds to a dimension.
-```mu``` The probability of mutation.
-```D``` If mutation happens on the agent, the increment follows $`\mathcal{N}_{ 0, D}`$
-```D``` If mutation happens on the agent, the increment follows ``\mathcal{N}_{ 0, D}``
### Birth
#### Growth
-```K``` is the birth coefficient ( $`b(x) = K(x)`$ )
-```K``` is the birth coefficient ( ``b(x) = K(x)`` )
### Death
#### Competition
- Competition between agent with trait ```x``` and ```y``` is defined as
```α(x,y)```
- Death coefficient is defined as $`d(x^{(i)}) = \sum_j^{N(t)} \alpha(x^{(i)},x^{(j)})`$
- Death coefficient is defined as ``d(x^{(i)}) = \sum_j^{N(t)} \alpha(x^{(i)},x^{(j)})``
Each individual is assigned a birth $` b_i `$ and death $` d_i `$ rate. The total rate is given by the sum of all individual rates
Each individual is assigned a birth `` b_i `` and death `` d_i `` rate. The total rate is given by the sum of all individual rates
```math
R(t) = \left[ \sum_i b_i(t) + d_i(t) \right]
```
A particular event, birth or death, is chosen at random with a probability equal to the rate of this event divided by the total rate $`R`$
A particular event, birth or death, is chosen at random with a probability equal to the rate of this event divided by the total rate ``R``
> This has to be checked, we are still not hundred percent sure
### Time steps
An event is exponentiallly distributed in time, with parameter $`\lambda = U(t)`$. This makes events memoryless, meaning that the probability of having a birth or death event is always the same, no matter when ($`P(X > s_t | X > t) = P(X > s) `$.
> Let $`B(t) = \sum_i b_i(t)`$ and $`D(t) = \sum_i d_i(t)`$. Let $`T_b, T_d`$ the time for a birth or death event to occur. Then we have $`P(T_b < T_d) = \frac{B(t)}{B(t) + D(t)}`$ (competing exponentials).
An event is exponentiallly distributed in time, with parameter ``\lambda = U(t)``. This makes events memoryless, meaning that the probability of having a birth or death event is always the same, no matter when (``P(X > s_t | X > t) = P(X > s) ``.
> Let ``B(t) = \sum_i b_i(t)`` and ``D(t) = \sum_i d_i(t)``. Let ``T_b, T_d`` the time for a birth or death event to occur. Then we have ``P(T_b < T_d) = \frac{B(t)}{B(t) + D(t)}`` (competing exponentials).
#### Inversion method
Let $`U`$ be an $`\mathcal{U}_{(0,1)}`$-distributed random variable and $`F \colon \R \to [0,1]`$ be a distribution function. Then we have
Let ``U`` be an ``\mathcal{U}_{(0,1)}``-distributed random variable and ``F \colon \R \to [0,1]`` be a distribution function. Then we have
```math
P(I_F(U) \leq x ) = P(U \leq F(x)) = F(x)
```
Thanks to the ***inversion method*** we get the incremental time step $`dt`$, exponentially distributed with parameter $`\lambda = R(t)`$, as
Thanks to the ***inversion method*** we get the incremental time step ``dt``, exponentially distributed with parameter ``\lambda = R(t)``, as
At each time step, $`N`$ agents are picked up from previous generation to reproduce. Their number of offspring is proportional to their fitness, calculated as usual with **birth and death rates**.
At each time step, ``N`` agents are picked up from previous generation to reproduce. Their number of offspring is proportional to their fitness, calculated as usual with **birth and death rates**.
It takes thus **only one time step to go trough one generation**. Thus it is more suit- able for numerical simulations. In practice, the Moran and Wright–Fisher models give qualitatively similar results, but genetic drift runs twice as fast in the Moran model.
This Hessian matrix can possess positive eigenvalues depending on the variance of the Gaussian components $`\sigma_i`$ and the coordinates in the phenotypic space.
This Hessian matrix can possess positive eigenvalues depending on the variance of the Gaussian components ``\sigma_i`` and the coordinates in the phenotypic space.
## References
-[Evolutionary dynamics from deterministic microscopic ecological processes](https://journals.aps.org/pre/abstract/10.1103/PhysRevE.101.032411)
The Dirac mass in the integral stands for the fact that an individual is not in competition with itself. Hence when $`N_t = 1`$ the competition term cancels. When there is birth, with probability $`p(x)`$ the offspring has trait $`y = x + H`$ where $`H`$ is a random variablee with law $`m(x,h)\,dh`$.
The Dirac mass in the integral stands for the fact that an individual is not in competition with itself. Hence when ``N_t = 1`` the competition term cancels. When there is birth, with probability ``p(x)`` the offspring has trait ``y = x + H`` where ``H`` is a random variablee with law ``m(x,h)\,dh``.
## Assumptions
Assume that
#### Assumption 1 : bounds and parameters regularity.
- Functions $`b,c,d,p`$ are continuous and bounded, with positive are nul values
-$`\exists \bar{m}, \forall x \in D, h \in \R^d m(x,h) \leq \bar{m}(h)`$
- Functions ``b,c,d,p`` are continuous and bounded, with positive are nul values
-``\exists \bar{m}, \forall x \in D, h \in \R^d m(x,h) \leq \bar{m}(h)``
#### Assumption 2
$`\nu_t^K = \frac{1}{K}\nu_t`$ where $`\nu_t`$ is constructed such that $`c\equiv \frac{1}{K}c`$
``\nu_t^K = \frac{1}{K}\nu_t`` where ``\nu_t`` is constructed such that ``c\equiv \frac{1}{K}c``
...
...
@@ -33,7 +33,7 @@ Then we get the **large population limit without mutation scaling**
## Mutations
Assuming a small mutational variance $`\max \sigma^2_i << 1`$ and a mutation rate $`U`$, the mutational effects can be approximated by an elliptic operator $`\sum_{i=1}^{n} (\mu_i^2/x)\partial_{ii}`$ with $`\mu_i = \sigma_i\sqrt{U}`$
Assuming a small mutational variance ``\max \sigma^2_i << 1`` and a mutation rate ``U``, the mutational effects can be approximated by an elliptic operator ``\sum_{i=1}^{n} (\mu_i^2/x)\partial_{ii}`` with ``\mu_i = \sigma_i\sqrt{U}``
> :warning: check that with Burger
In other words (from Champagnat, Ferriere and Meleard 2006), we have