Agent properties

The Agent structure

Agent is the atomic structure of ABMEv.jl. It has four attributes

  • the ancestors' history of traits, and the corresponding time where the traits have changed,
  • a death rate and a birth rate.
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
Specificities

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 needed in e.g. Gillepsie Algorithm
ABMEv.AgentType
mutable struct Agent{A<:ABMEv.Ancestors, R<:ABMEv.Rates, T<:Tuple, U, V} <: AbstractAgent{A<:ABMEv.Ancestors,R<:ABMEv.Rates}
source
ABMEv.AgentMethod
Agent(s; ancestors, rates)
Agent(s, pos; ancestors, rates)
Initialises agent with `pos` provided
source
ABMEv.AgentMethod
Agent(s; ancestors, rates)
Initialises agent with 0 values everywhere
source
ABMEv.get_xMethod
get_x(a, t, i)

Returns trait i of the agent. Geotrait corresponds to dimension i=0.

source
ABMEv.increment_x!Method
increment_x!(a, s, p, t)

This function increments agent by random numbers specified in p ONLY FOR CONTINUOUS DOMAINS

source