To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 7f6e65a7 authored by Victor's avatar Victor
Browse files

replaced backticks

parent 84def283
Pipeline #74908 failed with stage
in 59 minutes and 55 seconds
......@@ -21,7 +21,7 @@ using ABMEv
## Parameters of the simulation
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)})``
### Fitness
Fitness is defined internally as ```b - d```.
......
......@@ -7,24 +7,24 @@
### 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
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
```math
dt(\omega) = -\frac{\log(U(\omega))}{R(t)} \iff X(\omega) = \exp(-U(t)dt(\omega))
......
......@@ -5,7 +5,7 @@ The Wright Fisher process is an individual based model where the number of agent
![alt text](https://upload.wikimedia.org/wikipedia/commons/0/0b/Random_sampling_genetic_drift.svg)
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.
......
......@@ -33,7 +33,7 @@ Which has Hessian matrix
\frac{\partial^2 f}{\partial y_i \partial y_j}(x,y) = -w_i(x)w_j(x) + w_j(x) x_i^3 - 2 x_i^3x_j^3 - \left(3 x_i^2 - \frac{1}{\sigma_i^2} \right) \delta_{ij}
```
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)
......
......@@ -2,25 +2,25 @@
# Equivalence with PDE models
> HDR Champagnat Theorem 2.5 Section 2.2
> Recall that the IBM is a Markov process in $`\mathcal{M}^1`$ which state at time $`t`$ is the measure
> Recall that the IBM is a Markov process in ``\mathcal{M}^1`` which state at time ``t`` is the measure
```math
\nu_t = \sum_{i=1}^{N_t} \delta_{x_i}
```
> Hence an individual with trait $`x`$ in population $`\nu_t`$ gives birth to a new individual at rate $`b(x)`$ and dies at rate
> Hence an individual with trait ``x`` in population ``\nu_t`` gives birth to a new individual at rate ``b(x)`` and dies at rate
```math
d(x) + \int c(x,y)(\nu_t(dy) - \delta_x(dy)) = d(x) - c(x,x) + \sum_{i=1}^{N_t} c(c,x_i)
```
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment