Skip to contents

The parameters that are used by this function – and which are defined in params_from_csv – are a_group_centroid and b_group_centroid.

Usage

gc_utility(
  a_group_centroid,
  b_group_centroid,
  radius,
  cell_distances,
  stop_utility,
  number_agents
)

Arguments

a_group_centroid

Numeric denoting the power to which to take the utility.

b_group_centroid

Numeric denoting the slope of the utility function.

radius

Numeric denoting the radius of the agent.

cell_distances

Numeric vector denoting the distance of each cell in the centers to the predicted group centroid.

stop_utility

Numeric denoting the utility of stopping. Is used to ensure the agents do not freeze when they are too far away from each other.

number_agents

Numeric denoting the number of ingroup members.

Value

Numeric vector containing the group-centroid-related utility for each cell.

See also