4. Use of a graph to constraint the movements of people
This fourth step illustrates how to use a graph to constraint the movements of agents
Formulation​
- Define a new global variable: the road network (graph).
- Build the road network graph from the road agents
- Add new attribute to the people agents (target)
- Define a new reflex for people agents: stay.
- Modify the move reflex of the people agents.