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

[Kraken] set nb_nearest_vertices to -1 #3039

Merged
merged 2 commits into from
Nov 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions source/georef/georef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,12 +698,10 @@ edge_t GeoRef::nearest_edge(const type::GeographicalCoord& coordinates,
float min_dist = 0., cur_dist = 0.;
double coslat = ::cos(coordinates.lat() * type::GeographicalCoord::N_DEG_TO_RAD);

// Magic Number!
// The number indicates the number of nearest vertices that should be returned by find_with
// This number is determined by balancing the performance and the practical results (Artemis)
// The bigger the number is, the better the projection will be and slower it will run.
// With 30, we have broken less than 1% tests on Artemis_idfm.
constexpr int nb_nearest_vertices = 30;
// TODO: set different nb for different modes
// we can set -1 for both walking and bike mode
// set smaller number (ex: 50) for car
constexpr int nb_nearest_vertices = -1;

for (const auto& u : prox.find_within<proximitylist::IndexOnly>(coordinates, horizon, nb_nearest_vertices)) {
BOOST_FOREACH (const edge_t& e, boost::out_edges(u, graph)) {
Expand Down