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

impelement test for ill-formed networks #30

Open
mpadge opened this issue Jun 2, 2017 · 3 comments
Open

impelement test for ill-formed networks #30

mpadge opened this issue Jun 2, 2017 · 3 comments
Assignees
Labels

Comments

@mpadge
Copy link
Contributor

mpadge commented Jun 2, 2017

plus adress the possibly separate issue of finding out why some distances give huge (integer) values

@mpadge mpadge added the must do label Jun 2, 2017
@mpadge mpadge self-assigned this Jun 2, 2017
This was referenced Jun 2, 2017
@karpfen
Copy link
Member

karpfen commented Jun 3, 2017

Just as a thought on that: I tried a few things today and stumbled on this:

devtools::load_all (export_all = FALSE)
start_pt <- c (10.5350035429,47.6034937672)
end_pt <- c (10.5384796858,47.6071612749)
graph <- download_graph (start_pt, end_pt)
pts <- select_vertices_by_coordinates (graph, start_pt, end_pt)
route_start <- pts[1]
route_end <- pts [2]

prob <- get_probability (graph, route_start, route_end, eta = 0.1)
prob$d # 0.3704895

prob <- get_probability (graph, route_start, route_end, eta = 0.0001)
prob$d # 6.148642

sum (prob$probability$d) # 4.128129

If you set eta really low, the estimated mean length is longer than the sum of all edges present in the graph. Does this mean that they can potentially be counted more than once? If so, maybe that is the cause for those cases where d is so high.

@mpadge
Copy link
Contributor Author

mpadge commented Jun 3, 2017

That's a great thought. Check this out

start_pt <- c (10.5350035429,47.6034937672)
end_pt <- c (10.5384796858,47.6071612749)
graph <- download_graph (start_pt, end_pt)
pts <- select_vertices_by_coordinates (graph, start_pt, end_pt)
route_start <- pts[1]
route_end <- pts [2]

eta <- 10 ^ (-40:15 / 10)
d <- sapply (eta, function (i) get_probability (graph, route_start, route_end,
                                                eta = i)$d)
plot (eta, d, "l", log = 'xy')

junk

It's fine that values exceed the total sum of absolute distances, because random paths can include (potentially infinite) loops and circles. Even then, the end points of this graph seem perfectly sensible.

Only problem is the graphs that give extreme values do decrease with increasing eta, but nowhere near enough. And then my routing code crashes before they drop down to sensible levels, so i still have to investigate further. But feel free to ignore all of this (as well as the new #31) until after you're done writing.

@karpfen
Copy link
Member

karpfen commented Jun 4, 2017

Alright, that makes sense then!

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

No branches or pull requests

2 participants