This is an object that represents a villager (agent).
This class acts as an abstraction for handling villager-level logic. It can take a number of functions that run at each timestep. It also has an associated
as_table()Represents the current state of the agent as a tibble
get_age()Returns age in terms of years
get_gender()get_days_sincelast_birth()Get the number of days since the agent last gave birth
initialize()Create a new agent
propagate()Runs every day
Create a new agent
identifierA unique identifier that can be used to identify and find the agent
first_nameThe agent's first name
last_nameThe agent's last name
ageThe agent's age
mother_idThe identifier of the agent's mother
father_idThe identifier of the agent's father
professionThe agent's profession
partnerThe identifier of the agent's partner
genderThe agent's gender
aliveA boolean flag that represents whether the villager is alive or dead
childrenA list of children identifiers
healthA percentage value of the agent's current health
new()Used to created new agent objects.
identifierThe agent's identifier
first_nameThe agent's first name
last_nameThe agent's last name
ageThe age of the agent
mother_idThe identifier of the agent's mother
father_idThe identifier of the agent' father
partnerThe identifier of the agent's partner
childrenAn ordered list of of the children from this agent
genderThe gender of the agent
professionThe agent's profession
aliveBoolean whether the agent is alive or not
healthA percentage value of the agent's current health
as_table()I hope there's a more scalable way to do this in R; Adding every new attribute to this function isn't practical