diff --git a/cucumber.js b/cucumber.js index 3314d17ba..101bf8e95 100644 --- a/cucumber.js +++ b/cucumber.js @@ -3,5 +3,5 @@ module.exports = { verify: '--strict --tags ~@stress --tags ~@todo -f progress --require features/support --require features/step_definitions', todo: '--strict --tags @todo --require features/support --require features/step_definitions', all: '--strict --require features/support --require features/step_definitions', - mld: '--strict --tags ~@stress --tags ~@todo --tags ~@match --tags ~@alternative --tags ~@matrix --tags ~@trip --require features/support --require features/step_definitions -f progress' + mld: '--strict --tags ~@stress --tags ~@todo --tags ~@alternative --tags ~@matrix --tags ~@trip --require features/support --require features/step_definitions -f progress' } diff --git a/include/engine/routing_algorithms/routing_base.hpp b/include/engine/routing_algorithms/routing_base.hpp index 1ca880f90..dd43cc824 100644 --- a/include/engine/routing_algorithms/routing_base.hpp +++ b/include/engine/routing_algorithms/routing_base.hpp @@ -310,7 +310,7 @@ void annotatePath(const FacadeT &facade, } } -template +template double getPathDistance(const datafacade::ContiguousInternalMemoryDataFacade &facade, const std::vector unpacked_path, const PhantomNode &source_phantom, diff --git a/include/engine/routing_algorithms/routing_base_mld.hpp b/include/engine/routing_algorithms/routing_base_mld.hpp index 4b00afedf..fe475a97b 100644 --- a/include/engine/routing_algorithms/routing_base_mld.hpp +++ b/include/engine/routing_algorithms/routing_base_mld.hpp @@ -370,22 +370,31 @@ inline double getNetworkDistance(const datafacade::ContiguousInternalMemoryDataFacade &facade, SearchEngineData::QueryHeap &forward_heap, SearchEngineData::QueryHeap &reverse_heap, - SearchEngineData::QueryHeap &forward_core_heap, - SearchEngineData::QueryHeap &reverse_core_heap, + SearchEngineData::QueryHeap & /*forward_core_heap*/, + SearchEngineData::QueryHeap & /*reverse_core_heap*/, const PhantomNode &source_phantom, const PhantomNode &target_phantom, - int duration_upper_bound = INVALID_EDGE_WEIGHT) + int /*duration_upper_bound*/) { - (void)facade; - (void)forward_heap; - (void)reverse_heap; - (void)forward_core_heap; - (void)reverse_core_heap; - (void)source_phantom; - (void)target_phantom; - (void)duration_upper_bound; + forward_heap.Clear(); + reverse_heap.Clear(); - return 0.; // TODO: unimplemented + const PhantomNodes phantom_nodes{source_phantom, target_phantom}; + insertNodesInHeaps(forward_heap, reverse_heap, phantom_nodes); + + EdgeWeight weight; + NodeID source_node, target_node; + std::vector unpacked_edges; + std::tie(weight, source_node, target_node, unpacked_edges) = search( + facade, forward_heap, reverse_heap, DO_NOT_FORCE_LOOPS, DO_NOT_FORCE_LOOPS, phantom_nodes); + + if (weight == INVALID_EDGE_WEIGHT) + return std::numeric_limits::max(); + + std::vector unpacked_path; + annotatePath(facade, source_node, target_node, unpacked_edges, phantom_nodes, unpacked_path); + + return getPathDistance(facade, unpacked_path, source_phantom, target_phantom); } } // namespace mld