Fix inversion of sign
This commit is contained in:
		
							parent
							
								
									8ade26b4a4
								
							
						
					
					
						commit
						5c77bb7c67
					
				| @ -103,8 +103,8 @@ class AlternativeRouting final | |||||||
|         int upper_bound_to_shortest_path_distance = INVALID_EDGE_WEIGHT; |         int upper_bound_to_shortest_path_distance = INVALID_EDGE_WEIGHT; | ||||||
|         NodeID middle_node = SPECIAL_NODEID; |         NodeID middle_node = SPECIAL_NODEID; | ||||||
|         const EdgeWeight min_edge_offset = |         const EdgeWeight min_edge_offset = | ||||||
|             std::min(phantom_node_pair.source_phantom.GetForwardWeightPlusOffset(), |             std::min(-phantom_node_pair.source_phantom.GetForwardWeightPlusOffset(), | ||||||
|                      phantom_node_pair.source_phantom.GetReverseWeightPlusOffset()); |                      -phantom_node_pair.source_phantom.GetReverseWeightPlusOffset()); | ||||||
| 
 | 
 | ||||||
|         if (phantom_node_pair.source_phantom.forward_node_id != SPECIAL_NODEID) |         if (phantom_node_pair.source_phantom.forward_node_id != SPECIAL_NODEID) | ||||||
|         { |         { | ||||||
|  | |||||||
| @ -93,8 +93,8 @@ class ShortestPathRouting final | |||||||
|             const bool allow_u_turn = current_leg > 0 && uturn_indicators.size() > current_leg && |             const bool allow_u_turn = current_leg > 0 && uturn_indicators.size() > current_leg && | ||||||
|                                       uturn_indicators[current_leg - 1]; |                                       uturn_indicators[current_leg - 1]; | ||||||
|             const EdgeWeight min_edge_offset = |             const EdgeWeight min_edge_offset = | ||||||
|                 std::min(phantom_node_pair.source_phantom.GetForwardWeightPlusOffset(), |                 std::min(-phantom_node_pair.source_phantom.GetForwardWeightPlusOffset(), | ||||||
|                          phantom_node_pair.source_phantom.GetReverseWeightPlusOffset()); |                          -phantom_node_pair.source_phantom.GetReverseWeightPlusOffset()); | ||||||
| 
 | 
 | ||||||
|             // insert new starting nodes into forward heap, adjusted by previous distances.
 |             // insert new starting nodes into forward heap, adjusted by previous distances.
 | ||||||
|             if ((allow_u_turn || search_from_1st_node) && |             if ((allow_u_turn || search_from_1st_node) && | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user