From 16ca8da4382d538bce70085f624e3bd736c0da1e Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Fri, 25 Apr 2014 13:31:08 +0200 Subject: [PATCH] remove deactivated debug out for good --- DataStructures/PhantomNodes.h | 30 ---------------------- Descriptors/DescriptionFactory.cpp | 20 --------------- RoutingAlgorithms/AlternativePathRouting.h | 30 ---------------------- 3 files changed, 80 deletions(-) diff --git a/DataStructures/PhantomNodes.h b/DataStructures/PhantomNodes.h index 04380d53a..c7b8517c4 100644 --- a/DataStructures/PhantomNodes.h +++ b/DataStructures/PhantomNodes.h @@ -63,9 +63,7 @@ struct PhantomNode { return 0; } - // SimpleLogger().Write(logDEBUG) << "->fwd_offset: " << forward_offset << ", weight: " << forward_weight; const int result = (forward_offset + forward_weight); - // SimpleLogger().Write(logDEBUG) << "forward queue weight: " << result; return result; } @@ -75,9 +73,7 @@ struct PhantomNode { return 0; } - // SimpleLogger().Write(logDEBUG) << "->rev_offset: " << reverse_offset << ", weight: " << reverse_weight; const int result = (reverse_offset + reverse_weight); - // SimpleLogger().Write(logDEBUG) << "reverse queue weight: " << result; return result; } @@ -151,32 +147,6 @@ struct PhantomNodes { return source_phantom == target_phantom; } - - // bool ComputeForwardQueueOffset() const - // { - // if (source_phantom.forward_node_id == target_phantom.forward_node_id) - // { - // const int forward_queue_weight = source_phantom.GetForwardWeightPlusOffset(); - // const int reverse_queue_weight = target_phantom.GetForwardWeightPlusOffset(); - // const int weight_diff = (forward_queue_weight - reverse_queue_weight); - // SimpleLogger().Write(logDEBUG) << "fwd queue offset: " << std::max(0, weight_diff); - // return 0;//std::max(0, weight_diff); - // } - // return 0; - // } - - // bool ComputeReverseQueueOffset() const - // { - // if (source_phantom.reverse_node_id == target_phantom.reverse_node_id) - // { - // const int forward_queue_weight = source_phantom.GetReverseWeightPlusOffset(); - // const int reverse_queue_weight = target_phantom.GetReverseWeightPlusOffset(); - // const int weight_diff = (forward_queue_weight - reverse_queue_weight); - // SimpleLogger().Write(logDEBUG) << "rev queue offset: " << std::max(0, weight_diff); - // return 0;//std::max(0, weight_diff); - // } - // return 0; - // } }; inline std::ostream& operator<<(std::ostream &out, const PhantomNodes & pn) diff --git a/Descriptors/DescriptionFactory.cpp b/Descriptors/DescriptionFactory.cpp index be69d5fb8..1db3fca2e 100644 --- a/Descriptors/DescriptionFactory.cpp +++ b/Descriptors/DescriptionFactory.cpp @@ -60,20 +60,11 @@ double DescriptionFactory::GetBearing(const FixedPointCoordinate & A, const Fixe { result -= 360.; } - - // SimpleLogger().Write(logDEBUG) << "bearing between " << A << " and " << B << " is " << result; - return result; } void DescriptionFactory::SetStartSegment(const PhantomNode & source, const bool source_traversed_in_reverse) { - // int fwd_weight = source.forward_weight; - // int rev_weight = source.reverse_weight; - // int fwd_offset = source.forward_offset; - // int rev_offset = source.reverse_offset; - // SimpleLogger().Write(logDEBUG) << "df source, traversed in reverse: " << (source_traversed_in_reverse ? "y" : "n") << ", location: " << source.location << ", fwd_weight: " << fwd_weight << ", fwd_offset: " << fwd_offset << ", rev_weight: " << rev_weight << ", rev_offset: " << rev_offset; - // SimpleLogger().Write(logDEBUG) << "duration of first segment: " << (source_traversed_in_reverse ? source.GetReverseWeightPlusOffset() : source.GetForwardWeightPlusOffset()); start_phantom = source; AppendSegment( source.location, @@ -83,13 +74,6 @@ void DescriptionFactory::SetStartSegment(const PhantomNode & source, const bool void DescriptionFactory::SetEndSegment(const PhantomNode & target, const bool target_traversed_in_reverse) { - // int fwd_weight = target.forward_weight; - // int rev_weight = target.reverse_weight; - // int fwd_offset = target.forward_offset; - // int rev_offset = target.reverse_offset; - // SimpleLogger().Write(logDEBUG) << "df target, traversed in reverse: " << (target_traversed_in_reverse ? "y" : "n") << ", location: " << target.location << ", fwd_weight: " << fwd_weight << ", fwd_offset: " << fwd_offset << ", rev_weight: " << rev_weight << ", rev_offset: " << rev_offset; - // SimpleLogger().Write(logDEBUG) << "duration of last segment: " << (target_traversed_in_reverse ? target.GetReverseWeightPlusOffset() : target.GetForwardWeightPlusOffset()); - target_phantom = target; pathDescription.push_back( SegmentInformation( @@ -152,9 +136,5 @@ void DescriptionFactory::BuildRouteSummary( ) { summary.startName = start_phantom.name_id; summary.destName = target_phantom.name_id; - - // SimpleLogger().Write(logDEBUG) << "phantom start name: " << start_phantom.name_id << ", path: " << pathDescription.front().name_id; - // SimpleLogger().Write(logDEBUG) << "phantom target name: " << target_phantom.name_id << ", path: " << pathDescription.back().name_id; - summary.BuildDurationAndLengthStrings(distance, time); } diff --git a/RoutingAlgorithms/AlternativePathRouting.h b/RoutingAlgorithms/AlternativePathRouting.h index adc97126e..9d5983c8c 100644 --- a/RoutingAlgorithms/AlternativePathRouting.h +++ b/RoutingAlgorithms/AlternativePathRouting.h @@ -148,17 +148,6 @@ public: ); } - // const int forward_offset = phantom_node_pair.ComputeForwardQueueOffset(); - // const int forward_offset = super::ComputeEdgeOffset( - // phantom_node_pair.source_phantom - // ); - // const int reverse_offset = phantom_node_pair.ComputeReverseQueueOffset(); - // const int reverse_offset = super::ComputeEdgeOffset( - // phantom_node_pair.target_phantom - // ); - - // SimpleLogger().Write(logDEBUG) << "fwd_offset: " << forward_offset << ", reverse_offset: " << reverse_offset; - //search from s and t till new_min/(1+epsilon) > length_of_shortest_path while(0 < (forward_heap1.Size() + reverse_heap1.Size())){ if(0 < forward_heap1.Size()){ @@ -183,9 +172,7 @@ public: } } - // SimpleLogger().Write(logDEBUG) << "found " << via_node_candidate_list.size() << " unique via node candidates"; sort_unique_resize( via_node_candidate_list ); - // SimpleLogger().Write(logDEBUG) << "found " << via_node_candidate_list.size() << " unique via node candidates"; std::vector packed_forward_path; std::vector packed_reverse_path; @@ -203,8 +190,6 @@ public: //TODO: leave early when no path found: - // SimpleLogger().Write(logDEBUG) << "ub: " << upper_bound_to_shortest_path_distance; - boost::unordered_map approximated_forward_sharing; boost::unordered_map approximated_reverse_sharing; @@ -315,19 +300,6 @@ public: { BOOST_ASSERT(!packed_shortest_path.empty()); raw_route_data.unpacked_path_segments.resize(1); - // SimpleLogger().Write() << "fwd offset1: " << phantom_node_pair.source_phantom.fwd_segment_position; - // SimpleLogger().Write() << "fwd offset2: " << phantom_node_pair.source_phantom.rev_segment_position; - // SimpleLogger().Write() << "rev offset1: " << phantom_node_pair.target_phantom.fwd_segment_position; - // SimpleLogger().Write() << "rev offset2: " << phantom_node_pair.target_phantom.rev_segment_position; - - // int start_offset = ( packed_shortest_path.front() == phantom_node_pair.source_phantom.forward_node_id ? 1 : -1 )*phantom_node_pair.source_phantom.fwd_segment_position; - // SimpleLogger().Write(logDEBUG) << "unpacking from index " << phantom_node_pair.source_phantom.fwd_segment_position; - - // SimpleLogger().Write(logDEBUG) << "phantom_node_pair.source_phantom.forward_node_id: " << phantom_node_pair.source_phantom.forward_node_id; - // SimpleLogger().Write(logDEBUG) << "phantom_node_pair.source_phantom.reverse_node_id: " << phantom_node_pair.source_phantom.reverse_node_id; - // SimpleLogger().Write(logDEBUG) << "phantom_node_pair.target_phantom.packed_geometry_id: " << phantom_node_pair.target_phantom.packed_geometry_id; - // SimpleLogger().Write(logDEBUG) << "packed_shortest_path.back(): " << packed_shortest_path.back(); - raw_route_data.source_traversed_in_reverse = (packed_shortest_path.front() != phantom_node_pair.source_phantom.forward_node_id); raw_route_data.target_traversed_in_reverse = (packed_shortest_path.back() != phantom_node_pair.target_phantom.forward_node_id); @@ -340,7 +312,6 @@ public: raw_route_data.unpacked_path_segments.front() ); raw_route_data.lengthOfShortestPath = upper_bound_to_shortest_path_distance; - // SimpleLogger().Write(logDEBUG) << "upper_bound_to_shortest_path_distance: " << upper_bound_to_shortest_path_distance; } if( SPECIAL_NODEID != selected_via_node ) { @@ -367,7 +338,6 @@ public: ); raw_route_data.lengthOfAlternativePath = length_of_via_path; - // SimpleLogger().Write(logDEBUG) << "length_of_via_path: " << length_of_via_path; } }