Function determine_agents_neighbours()

Function Documentation

void determine_agents_neighbours()

Updates the list of neighbors for each agent in the crowd.

This function creates the lists based on the proximity of each agent to other agents and to walls. We will consider all agents within a certain distance from one another, ie the maximum distance that can be traveled by an agent within dt seconds at max speed vMaxAgent. We multiply it by 2 in the "extreme" case of two pedestrians walking (running) fast towards each other. All this ensures that all agents who can potentially collide within dt are taken into account.