Agent
EvoId.Agent — MethodAgent(s; ancestors=false)
Agent(s, pos, Rtype=Float32; ancestors=false)
Agent(s, pos_t, t, Rtype=Float32; ancestors=false)Returns an Agent living on the underlying space s with initial position pos. If pos not provided, initialises agent with 0 values everywhere
Arguments
spospos_tRtype: type of rate. Should correspond to the type
of the output birth and death function for code optimisation.
Keyword arguments
is required for the Gillepsie algorithm, but not for CFM algorithm
ancestors. Setancestors=truewhen you want to store ancestors traits.
EvoId.get_geo — Methodget_geo(a)Returns geotrait of agent a at time t.
EvoId.get_t — Methodget_t(a)Get time when agent born.
EvoId.get_x — Methodget_x(a::Agent)Returns trait i of the agent.
EvoId.increment_x! — Methodincrement_x!(a, s, D, mu, t)This function increments (i.e. mutates) agent a according to D, mu. Note: for a::AgentwithAncestors, an extra row is added, since increment_x! is called for birth events after copying the mum traits. Mum traits are therefore Ancestors traits.