pszufe / OpenStreetMapX.jl

OpenStreetMap (*.osm) support for Julia 1.0 and up
MIT License
118 stars 24 forks source link

Build ABMs with OpenStreetMapX.jl and Agents.jl #31

Closed fbanning closed 3 years ago

fbanning commented 3 years ago

Hi,

first of all thank you very much for your work on this package. It works as described and I find it pretty intuitive to navigate.

I would like to use OSM map data for some agent-based models and was wondering if it is possible to utilise the functionality of OpenStreetMapX.jl for this. I saw that you have done a simple Zombie apocalypse model in your JuliaCon 2020 example. This has been very helpful for me to understand the general idea how to build an ABM in combination with OpenStreetMapX.jl and plotting it via folium (such a nice tool!).

However, I would prefer to use the Agents.jl framework for building ABMs and would like to ask whether or not it is possible to use the functionality of those packages together? I've been tinkering around with it but couldn't get the desired outcome so far.

My aim would be to integrate the MapData generated by OpenStreetMapX.jl into the space component (GraphSpace) of a model created with Agents.jl. After some agents have been added within the bounds of MapData, I would then imagine to have two separate networks - one for the agents and one for the underlying map on which the agents move. When plotting the model, both graph networks could be accessed by Agents.jl and plotted normally (respecting bounds, relative location, etc.).

Would this be at all feasible? I'm looking forward to hear your thoughts on this. Maybe it's way too complex. Maybe it's really easy and I just miss the forest for the trees. I am fully aware that this might be a question better suited for the Agents.jl repo and I will ask there as well. As of now, I thought it wouldn't hurt to ask here as well because of your knowledge of the underlying functions and ABMs in general. :-)

Best wishes

Libbum commented 3 years ago

This can be closed, since we have implemented the solution in Agents.jl v4

fbanning commented 3 years ago

Sure, thanks for putting in the work! :)