This function is the Rcpp equivalent of utility-agent.
This function uses the operational-level utility functions to compute the
utility of moving to any given potential cell in centers. Here, we
assume that none of the utility variables (i.e., the variables that serve as
input to the utility functions) is precomputed, so that it will first compute
their values. This input is then provided to
utility-data.frame for the actual computation
of the utility.
Arguments
- agent
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).
See also
simulate,
simulate.state,
update-agent,
update,
utility-data.frame,
compute_utility_variables,
update_position