Implement CoreCH algorithm
This commit is contained in:
committed by
Patrick Niklaus
parent
922e155763
commit
7da86b5984
@@ -115,7 +115,9 @@ Status MatchPlugin::HandleRequest(const datafacade::ContiguousInternalMemoryData
|
||||
{
|
||||
if (!algorithms.HasMapMatching())
|
||||
{
|
||||
return Error("NotImplemented", "Map matching is not implemented for the chosen search algorithm.", json_result);
|
||||
return Error("NotImplemented",
|
||||
"Map matching is not implemented for the chosen search algorithm.",
|
||||
json_result);
|
||||
}
|
||||
|
||||
BOOST_ASSERT(parameters.IsValid());
|
||||
|
||||
@@ -35,7 +35,9 @@ Status TablePlugin::HandleRequest(const datafacade::ContiguousInternalMemoryData
|
||||
{
|
||||
if (!algorithms.HasManyToManySearch())
|
||||
{
|
||||
return Error("NotImplemented", "Many to many search is not implemented for the chosen search algorithm.", result);
|
||||
return Error("NotImplemented",
|
||||
"Many to many search is not implemented for the chosen search algorithm.",
|
||||
result);
|
||||
}
|
||||
|
||||
BOOST_ASSERT(params.IsValid());
|
||||
|
||||
@@ -149,11 +149,15 @@ Status TripPlugin::HandleRequest(const datafacade::ContiguousInternalMemoryDataF
|
||||
{
|
||||
if (!algorithms.HasShortestPathSearch())
|
||||
{
|
||||
return Error("NotImplemented", "Shortest path search is not implemented for the chosen search algorithm.", json_result);
|
||||
return Error("NotImplemented",
|
||||
"Shortest path search is not implemented for the chosen search algorithm.",
|
||||
json_result);
|
||||
}
|
||||
if (!algorithms.HasManyToManySearch())
|
||||
{
|
||||
return Error("NotImplemented", "Many to many search is not implemented for the chosen search algorithm.", json_result);
|
||||
return Error("NotImplemented",
|
||||
"Many to many search is not implemented for the chosen search algorithm.",
|
||||
json_result);
|
||||
}
|
||||
|
||||
BOOST_ASSERT(parameters.IsValid());
|
||||
|
||||
@@ -36,12 +36,18 @@ ViaRoutePlugin::HandleRequest(const datafacade::ContiguousInternalMemoryDataFaca
|
||||
|
||||
if (!algorithms.HasShortestPathSearch() && route_parameters.coordinates.size() > 2)
|
||||
{
|
||||
return Error("NotImplemented", "Shortest path search is not implemented for the chosen search algorithm. Only two coordinates supported.", json_result);
|
||||
return Error("NotImplemented",
|
||||
"Shortest path search is not implemented for the chosen search algorithm. "
|
||||
"Only two coordinates supported.",
|
||||
json_result);
|
||||
}
|
||||
|
||||
if (!algorithms.HasDirectShortestPathSearch() && !algorithms.HasShortestPathSearch())
|
||||
{
|
||||
return Error("NotImplemented", "Direct shortest path search is not implemented for the chosen search algorithm.", json_result);
|
||||
return Error(
|
||||
"NotImplemented",
|
||||
"Direct shortest path search is not implemented for the chosen search algorithm.",
|
||||
json_result);
|
||||
}
|
||||
|
||||
if (max_locations_viaroute > 0 &&
|
||||
@@ -95,18 +101,20 @@ ViaRoutePlugin::HandleRequest(const datafacade::ContiguousInternalMemoryDataFaca
|
||||
};
|
||||
util::for_each_pair(snapped_phantoms, build_phantom_pairs);
|
||||
|
||||
if (1 == raw_route.segment_end_coordinates.size() && algorithms.HasAlternativePathSearch() && route_parameters.alternatives)
|
||||
if (1 == raw_route.segment_end_coordinates.size() && algorithms.HasAlternativePathSearch() &&
|
||||
route_parameters.alternatives)
|
||||
{
|
||||
raw_route = algorithms.AlternativePathSearch(raw_route.segment_end_coordinates.front());
|
||||
}
|
||||
else if (1 == raw_route.segment_end_coordinates.size() && algorithms.HasDirectShortestPathSearch())
|
||||
else if (1 == raw_route.segment_end_coordinates.size() &&
|
||||
algorithms.HasDirectShortestPathSearch())
|
||||
{
|
||||
raw_route = algorithms.DirectShortestPathSearch(raw_route.segment_end_coordinates);
|
||||
raw_route = algorithms.DirectShortestPathSearch(raw_route.segment_end_coordinates.front());
|
||||
}
|
||||
else
|
||||
{
|
||||
raw_route = algorithms.ShortestPathSearch(raw_route.segment_end_coordinates,
|
||||
route_parameters.continue_straight);
|
||||
route_parameters.continue_straight);
|
||||
}
|
||||
|
||||
// we can only know this after the fact, different SCC ids still
|
||||
|
||||
Reference in New Issue
Block a user