OpenStreetMapX.jl
OpenStreetMapX.jl copied to clipboard
MethodError: no method matching nv(::Graphs.SimpleGraphs.SimpleDiGraph{Int64})
Hi! When I ran the https://pszufe.github.io/OpenStreetMapX_Tutorial/JuliaCon2020/ , the part that took 10 cars an let them drive between randomly selected pairs of points, gives the following error. I installed all the required packages though.
Hi, LightGraphs.jl
is no longer maintained and has been replaced by Graphs.jl
.
Hence all you need to do is to replace the line:
using LightGraphs
with
using Graphs
After the change restart Julia in the Jupyter so you do not have the name clash.
Let me know if it works after the replacement.
@pszufe Thanks! that one resolved, however, later it gives error regarding plotting
Change:
ns = LightGraphs.neighbors(s.m.g, agent.current_node)
to
ns = Graphs.neighbors(s.m.g, agent.current_node)
Perfect! So, all the codes are the same, and just need to change the older LightGraphs to Graphs. Is there any comprehensive documentation for using OpenStreetMapX.jl in addition to STABLE one. These are a bit brief.
Thanks again!
Yes they are unfortunately brief - we look for volunteers here!
For time being have a look https://openstreetmapjl.readthedocs.io/en/stable/ This is the project that OpenStreetMapX.jl took most of the code (and most of it has been rewritten and extended later). Everything that used to work in OpenStreetMap.jl will also work with OpenStreetMapX.jl maybe with slight naming changes.
Thanks a lot @pszufe for your help. If I gain expertise I'll be happy to extend it.