This function uses the current state of the environment to determine the values of a whole range of variables that are used within the utility functions.
This function uses the current state of the environment to determine the values of a whole range of variables that are used within the utility functions.
Usage
# S4 method for class 'agent'
compute_utility_variables(
object,
state,
background,
agent_specifications,
centers,
check,
cpp = TRUE
)
# S4 method for class 'data.frame'
compute_utility_variables(object, background)Arguments
- object
Object of the
agent-class.- state
Object of the
state-class.- background
Object of the
background-class.- agent_specifications
List created by the
create_agent_specificationsfunction. Contains all information of all agents within the currentstateand allows for the communication between thepredpedsimulation functions and them4mautility functions.- centers
Numerical matrix containing the coordinates at each position the object can be moved to. Should have one row for each cell.
- check
Logical matrix of dimensions 11 x 3 denoting whether an agent can move to a given cell (
TRUE) or not (FALSE).- cpp
Logical denoting whether to use the Rcpp alternative (
TRUE) or the R alternative of this function (FALSE). Defaults toTRUE.
Value
Data.frame containing all of the needed variables to be able to compute the values of the utility functions.
Data.frame containing all of the needed variables to be able to compute the values of the utility functions.
See also
simulate,
simulate.state,
update-agent,
update,
update_position,
update
simulate,
simulate.state,
update-agent,
update,
update_position,
update