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

agent.md 879 Bytes
Newer Older
Victor's avatar
Victor committed
1
2
# Agent properties

3
## The `Agent` structure
Victor's avatar
Victor committed
4
`Agent` is the atomic structure of ABMEv.jl. It has four attributes
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-  the ancestors' history of traits, and the corresponding time where the traits have changed,
- a death rate and a birth rate.
```julia
mutable struct Agent{A<:Ancestors,R<:Rates,T<:Tuple,U,V} <: AbstractAgent{A,R}
    # history of traits for geotraits
    x_history::Array{T,1}
    # birth time of ancestors
    t_history::Array{U,1}
    # death rate
    d::V
    #birth rate
    b::V
end
```
Victor's avatar
Victor committed
19
!!! note "Specificities"
20
21
22
23
24
    The type `Agent` has two important composite types

    - `Ancestors{bool}` : when `bool = true`, the ancestors traits are stored,
    - `Rates{bool}` : when `bool = true`, the rates `d` and `b` of agents are updated at each time step. This is need in e.g. Gillepsie Algorithm

Victor's avatar
Victor committed
25
26
27
28
```@autodocs
Modules = [ABMEv]
Pages   = ["ABMEv_Agent.jl"]
```