This is a model of agents who try to leave the room through the
exit on the right hand side. The model also records the frequency of
each cell being chosen as a path and draws the result into a path graph,
which can be exported to GIS for further analysis.
Here is a graph showing the path graph opened in GIS:
In order to calculate the “elevation”, each patch calculates its
distance to each exit patch, and set the lowest distance as elevation.
When running the model, people always try to move to lower elevation.
This algorithm can also be used to build a rainfall model to analyze the
movement of rain drops on the ground.