Modeling Trail Use and Crowding. How to?

Skip to first unread message

Kevin Bracy Knight

Oct 10, 2019, 1:10:09 PM10/10/19
to SpaDES Users
Hi there, 

I'm a big R nerd for my job. But, as a hobby, I'm trying to help plan recreation management in my area of Colorado (in the USA). My goal is to bring in maps of trails (I have shape files for these) and demonstrate how different management techniques might change interactions between people. In particular, we have a problem of perceived crowding and I'd like to model how making loop trails directional may reduce this crowding problem, even with users traveling at different speeds.

Can someone direct me to an example that I might adapt to my purposes? Or, if someone out there is interested in collaboration, I think there is a strong demand for this type of use modeling here in the US and I would love to publish on this topic with other coauthors!


Kevin Bracy Knight
Boulder, CO

Alex Chubaty

Oct 11, 2019, 10:08:42 AM10/11/19
to SpaDES Users
Kevin, this sounds like an interesting problem.

The caribouMovement module (at provides an example of an individual based model which is likely useful in your case too. You could simulate, e.g., random arrivals at trail heads and define the movement rules so that individuals follow the direction of the path and move at random speeds along the paths, presumably weighted by congestion so that lots of people move more slowly through the trails.


Eliot McIntire

Oct 11, 2019, 7:31:11 PM10/11/19
to SpaDES Users

I think the short answer is, "no", we haven't worked on that type of model yet, so don't have a similar example. If you know NetLogo, we made a package, NetLogoR, on CRAN, which lets you think like NetLogo, but write in R. We use this in combination with SpaDES to do individual based models of movement. In my opinion, because you are moving people on linear trails, you may want to think of it as a graph model, with nodes and edges. You can define each node by its length, and other features, like steepness (uphill, downhill etc.), then you can set up agents that can move along the edges along set routes, where the agent can adapt their route choice by crowdedness, or whatever.

Anyway, I don't think I would have time to help too much on this, BUT, if you need some other thoughts, I am happy to respond. 

Summarize, I would use SpaDES, igraph, sf, and data.table packages. With these 3 packages, you can set up the nodes and edges from the GIS, set up agents using a data.table or the NetLogoR::agentMatrix class (which is a bit faster than data.table because it is a matrix -- fast in R).  Thinking through this, the biggest challenge for me would be the fact that you will likely want near "continuous" time for your agents, not discrete time. Hmm. 

Anyway, my thoughts.

Reply all
Reply to author
0 new messages