Don't force loops in MLD

Related commit 0972ec9115
This commit is contained in:
Michael Krasnyk 2017-10-02 12:34:58 +02:00
parent 708b47938d
commit d0936dc7fd
2 changed files with 8 additions and 13 deletions

View File

@ -255,7 +255,8 @@ void routingStep(const DataFacade<Algorithm> &facade,
auto reverse_weight = reverse_heap.GetKey(node);
auto path_weight = weight + reverse_weight;
// if loops are forced, they are so at the source
// MLD uses loops forcing only to prune single node paths in forward and/or
// backward direction (there is no need to force loops in MLD but in CH)
if (!(force_loop_forward && forward_heap.GetData(node).parent == node) &&
!(force_loop_reverse && reverse_heap.GetData(node).parent == node) &&
(path_weight >= 0) && (path_weight < path_upper_bound))

View File

@ -456,9 +456,6 @@ void unpackPackedPaths(InputIt first,
util::static_assert_iter_category<OutIt, std::output_iterator_tag>();
util::static_assert_iter_value<InputIt, WeightedViaNodePackedPath>();
const bool force_loop_forward = needsLoopForward(phantom_node_pair);
const bool force_loop_backward = needsLoopBackwards(phantom_node_pair);
const Partition &partition = facade.GetMultiLevelPartition();
Heap &forward_heap = *search_engine_data.forward_heap_1;
@ -530,8 +527,8 @@ void unpackPackedPaths(InputIt first,
facade,
forward_heap,
reverse_heap,
force_loop_forward,
force_loop_backward,
DO_NOT_FORCE_LOOPS,
DO_NOT_FORCE_LOOPS,
INVALID_EDGE_WEIGHT,
sublevel,
parent_cell_id);
@ -587,9 +584,6 @@ makeCandidateVias(SearchEngineData<Algorithm> &search_engine_data,
// we're over factor * weight. We have to set the weight for routingStep to INVALID_EDGE_WEIGHT
// so that stepping will continue even after we reached the shortest path upper bound.
const bool force_loop_forward = needsLoopForward(phantom_node_pair);
const bool force_loop_backward = needsLoopBackwards(phantom_node_pair);
EdgeWeight forward_heap_min = forward_heap.MinKey();
EdgeWeight reverse_heap_min = reverse_heap.MinKey();
@ -615,8 +609,8 @@ makeCandidateVias(SearchEngineData<Algorithm> &search_engine_data,
reverse_heap,
overlap_via,
overlap_weight,
force_loop_forward,
force_loop_backward,
DO_NOT_FORCE_LOOPS,
DO_NOT_FORCE_LOOPS,
phantom_node_pair);
if (!forward_heap.Empty())
@ -641,8 +635,8 @@ makeCandidateVias(SearchEngineData<Algorithm> &search_engine_data,
forward_heap,
overlap_via,
overlap_weight,
force_loop_forward,
force_loop_backward,
DO_NOT_FORCE_LOOPS,
DO_NOT_FORCE_LOOPS,
phantom_node_pair);
if (!reverse_heap.Empty())