Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

precomputing dijkstra_states throws an UndefVarError #87

Open
ctlbau opened this issue Oct 31, 2022 · 0 comments
Open

precomputing dijkstra_states throws an UndefVarError #87

ctlbau opened this issue Oct 31, 2022 · 0 comments

Comments

@ctlbau
Copy link

ctlbau commented Oct 31, 2022

From https://github.com/DeloitteOptimalReality/LightOSM.jl/blob/master/benchmark/benchmarks.jl

point = GeoLocation(-37.8142176, 144.9631608) # Melbourne, Australia
radius = 5 # km
data_file = joinpath(@__DIR__, "benchmark_map.osm")

g_losm = LightOSM.graph_from_download(:point,
                                      point=point,
                                      radius=radius,
                                      weight_type=:distance,
                                      download_format=:osm,
                                      save_to_file_location=data_file)

# g_losm = LightOSM.graph_from_file(data_file, weight_type=:distance)
@time g_losm_precompute = LightOSM.graph_from_file(data_file, weight_type=:distance, precompute_dijkstra_states=true)

throws and UndefVarError blaming a parameter n in src/graph.jl:455 which simply initialises a vector to hold g.dijkstra_states = Vector{Vector{U}}(undef,n)
Shouldn't this be g.dijkstra_states = Vector{Vector{U}}(undef,length(g.nodes)) ?

g.dijkstra_states = Vector{Vector{U}}(undef, n)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant