Calculating durations is unavoidable due to tie-breaking minimums, but we can avoid accumulating distances if they're not requested.

This commit is contained in:
Daniel Patterson
2018-10-30 15:09:19 -07:00
parent 498259b220
commit a67c4bf84d
6 changed files with 58 additions and 36 deletions
+1 -4
View File
@@ -217,10 +217,7 @@ Status TripPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
// compute the duration table of all phantom nodes
auto result_duration_table = util::DistTableWrapper<EdgeWeight>(
algorithms
.ManyToManySearch(
snapped_phantoms, {}, {}, /*requestDistance*/ false, /*requestDuration*/ true)
.first,
algorithms.ManyToManySearch(snapped_phantoms, {}, {}, /*requestDistance*/ false).first,
number_of_locations);
if (result_duration_table.size() == 0)