remove deactivated debug out for good
This commit is contained in:
parent
ca6515c58a
commit
16ca8da438
@ -63,9 +63,7 @@ struct PhantomNode
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// SimpleLogger().Write(logDEBUG) << "->fwd_offset: " << forward_offset << ", weight: " << forward_weight;
|
|
||||||
const int result = (forward_offset + forward_weight);
|
const int result = (forward_offset + forward_weight);
|
||||||
// SimpleLogger().Write(logDEBUG) << "forward queue weight: " << result;
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,9 +73,7 @@ struct PhantomNode
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// SimpleLogger().Write(logDEBUG) << "->rev_offset: " << reverse_offset << ", weight: " << reverse_weight;
|
|
||||||
const int result = (reverse_offset + reverse_weight);
|
const int result = (reverse_offset + reverse_weight);
|
||||||
// SimpleLogger().Write(logDEBUG) << "reverse queue weight: " << result;
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,32 +147,6 @@ struct PhantomNodes
|
|||||||
{
|
{
|
||||||
return source_phantom == target_phantom;
|
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)
|
inline std::ostream& operator<<(std::ostream &out, const PhantomNodes & pn)
|
||||||
|
@ -60,20 +60,11 @@ double DescriptionFactory::GetBearing(const FixedPointCoordinate & A, const Fixe
|
|||||||
{
|
{
|
||||||
result -= 360.;
|
result -= 360.;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SimpleLogger().Write(logDEBUG) << "bearing between " << A << " and " << B << " is " << result;
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DescriptionFactory::SetStartSegment(const PhantomNode & source, const bool source_traversed_in_reverse)
|
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;
|
start_phantom = source;
|
||||||
AppendSegment(
|
AppendSegment(
|
||||||
source.location,
|
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)
|
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;
|
target_phantom = target;
|
||||||
pathDescription.push_back(
|
pathDescription.push_back(
|
||||||
SegmentInformation(
|
SegmentInformation(
|
||||||
@ -152,9 +136,5 @@ void DescriptionFactory::BuildRouteSummary(
|
|||||||
) {
|
) {
|
||||||
summary.startName = start_phantom.name_id;
|
summary.startName = start_phantom.name_id;
|
||||||
summary.destName = target_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);
|
summary.BuildDurationAndLengthStrings(distance, time);
|
||||||
}
|
}
|
||||||
|
@ -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
|
//search from s and t till new_min/(1+epsilon) > length_of_shortest_path
|
||||||
while(0 < (forward_heap1.Size() + reverse_heap1.Size())){
|
while(0 < (forward_heap1.Size() + reverse_heap1.Size())){
|
||||||
if(0 < forward_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 );
|
sort_unique_resize( via_node_candidate_list );
|
||||||
// SimpleLogger().Write(logDEBUG) << "found " << via_node_candidate_list.size() << " unique via node candidates";
|
|
||||||
|
|
||||||
std::vector<NodeID> packed_forward_path;
|
std::vector<NodeID> packed_forward_path;
|
||||||
std::vector<NodeID> packed_reverse_path;
|
std::vector<NodeID> packed_reverse_path;
|
||||||
@ -203,8 +190,6 @@ public:
|
|||||||
|
|
||||||
//TODO: leave early when no path found:
|
//TODO: leave early when no path found:
|
||||||
|
|
||||||
// SimpleLogger().Write(logDEBUG) << "ub: " << upper_bound_to_shortest_path_distance;
|
|
||||||
|
|
||||||
boost::unordered_map<NodeID, int> approximated_forward_sharing;
|
boost::unordered_map<NodeID, int> approximated_forward_sharing;
|
||||||
boost::unordered_map<NodeID, int> approximated_reverse_sharing;
|
boost::unordered_map<NodeID, int> approximated_reverse_sharing;
|
||||||
|
|
||||||
@ -315,19 +300,6 @@ public:
|
|||||||
{
|
{
|
||||||
BOOST_ASSERT(!packed_shortest_path.empty());
|
BOOST_ASSERT(!packed_shortest_path.empty());
|
||||||
raw_route_data.unpacked_path_segments.resize(1);
|
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.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);
|
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.unpacked_path_segments.front()
|
||||||
);
|
);
|
||||||
raw_route_data.lengthOfShortestPath = upper_bound_to_shortest_path_distance;
|
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 ) {
|
if( SPECIAL_NODEID != selected_via_node ) {
|
||||||
@ -367,7 +338,6 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
raw_route_data.lengthOfAlternativePath = length_of_via_path;
|
raw_route_data.lengthOfAlternativePath = length_of_via_path;
|
||||||
// SimpleLogger().Write(logDEBUG) << "length_of_via_path: " << length_of_via_path;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user