Skip to contents

<AgentCondition> is an S4 class describing the status of an agent at the end of a simulation delta_time (e.g. end of day). It encapsulates key spatio-temporal and physiological metrics, including location, body mass, energy expenditure, state budgets, and survival status.

Details

Currently this class is intended for internal use within the model, and it is not expected to be user-facing.

Slots

location

object of class XY, specifying the agent's spatial coordinates at the end of the current time-step.

grid_cell

object of class XY, representing the AOC's grid-cell occupied by the agent (currently ignored).

timestep

integer, indicating the current simulation time-step index.

timestamp

a <POSIXct> object, the date-time at the end of the current time-step.

body_mass

a <units> object, defining the agent's body mass at the end of the current time-step.

states_budget

a named list, detailing the agent's time allocation across the different behavioural/activity states during the time-step. Each element (of type <units>) is named after a specific state and stores the duration (e.g. hours) the agent spent in that state.

states_cost

a named list, specifying the energy costs (e.g. KJ/hr) associated with each state defined in state_budget. List elements are of type <units>.

energy_expenditure

a <units> object, representing the total energy (e.g. KJ/g) expended across all states during the time-step.

foraging_success

a <units> object, the mass of prey (e.g. grams) consumed by the agent in the current time-step.

mass_change_value

a <units> object, capturing the net change in the agent’s body mass (e.g., grams) over the current time-step.

mortality_prob

numeric, the probability of the agent dying within the the current time-step (currently ignored).

alive

a logical value (TRUE if alive, FALSE if dead), indicating whether the agent has survived the time-step.

track

object of class sf, storing a time-series of location points tracking the agent's movement within the current time-step.

See also

Helper function AgentCondition() to create <AgentCondition> objects