osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Fix a bug caused by support OSM traffic signal directions

Open GitBenjamin opened this issue 2 years ago • 3 comments

I try fix a bug caused by support OSM traffic signal directions. With mjjbell's help, I learned a lot. I hope to get @mjjbell help and support.

Issue

https://github.com/Project-OSRM/osrm-backend/pull/6153#issuecomment-1763937197

  • Problem 1: When crossing a directed traffic signal, the directed traffic signal sometimes does not work.
  • Problem 2: There is a bug in the duration penalty of traffic signal, and the master branch also supports https://github.com/Project-OSRM/osrm-backend/pull/6339. When weight_name = duration or weight_name = routability, a crash of the macth_api may be triggered. Because the directed traffic signal sometimes does not work in the Edge-expanded Graph, but it does in the "duplicate" edges created for the restriction graph. Finally, the sum of the forwad_weight and reverse_weight is not equal to total_weight. Last but not least, they are not loop. https://github.com/Project-OSRM/osrm-backend/blob/31e31a63d062fb804f5f4695ed3036ca7a269ead/src/engine/routing_algorithms/routing_base_ch.cpp#L149 And then, it will crash in the line. https://github.com/Project-OSRM/osrm-backend/blob/31e31a63d062fb804f5f4695ed3036ca7a269ead/include/engine/routing_algorithms/routing_base.hpp#L182 https://github.com/Project-OSRM/osrm-backend/blob/31e31a63d062fb804f5f4695ed3036ca7a269ead/include/engine/routing_algorithms/routing_base.hpp#L184

Tasklist

Requirements / Relations

https://github.com/Project-OSRM/osrm-backend/pull/6153 https://github.com/Project-OSRM/osrm-backend/pull/6339 https://github.com/Project-OSRM/osrm-backend/pull/6153#issuecomment-1772192537

GitBenjamin avatar Oct 23 '23 14:10 GitBenjamin

Hi, @SiarheiFedartsou. I added CHANGELOG and removed the comment. Thanks!

GitBenjamin avatar Nov 01 '23 08:11 GitBenjamin

It would be beneficial to add minimal test cases to the Cucumber suite that capture the two problems you have identified.

mjjbell avatar Nov 01 '23 15:11 mjjbell

It would be beneficial to add minimal test cases to the Cucumber suite that capture the two problems you have identified.

Hi, @mjjbell. I added two test cases to the Cucumber suite, but it only capture one problems (Problem 1). Another problem may require a more complex routing network to catch.😔

GitBenjamin avatar Jan 04 '24 12:01 GitBenjamin

@GitBenjamin I'm going to add the fix to this PR for problem 1.

It's unclear if problem 2 would also be fixed, but we can address that in a separate PR once we have identified a minimal reproduction test case.

mjjbell avatar Mar 16 '24 19:03 mjjbell

@GitBenjamin I'm going to add the fix to this PR for problem 1.

It's unclear if problem 2 would also be fixed, but we can address that in a separate PR once we have identified a minimal reproduction test case.

Problem 2 no longer occurs when I call Match API again, after I modify the traffic light compressed logic. I can try to do an analysis of that part of osm data again.

GitBenjamin avatar Mar 17 '24 12:03 GitBenjamin