pgr_bdastar doesn't return the same result as pgr_astar
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
The issue is in the pgRouting library's bidirectional A* algorithm (pgr_bdastar) returning a different path than the unidirectional A* (pgr_astar). Start by examining the test data in edge_min_repro.zip to understand the graph structure. Look at the source code for both algorithms, likely in src/astar/ or similar directories. Compare the heuristics and bidirectional search logic. Run the provided queries on the sample data to reproduce the discrepancy. 'Done' is when both algorithms return identical paths and aggregate costs for the given input.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
pgr_bdastar doesn't return the same result as pgr_astar
To Reproduce
Using pgRouting docker image, import the following data:
Then run the following queries:
SELECT
seq, path_seq AS "pathSeq", node, edge, pgr.cost, agg_cost AS "aggCost"
FROM pgr_bdastar('SELECT * FROM edge', 1153548005, 558255664, true) as pgr
ORDER BY seq;
which returns:
1 1 1153548005 54256 0.000379723504336132 0
2 2 558255704 54146 0.000304523536838747 0.000379723504336132
3 3 558255705 54149 0.00138401927422877 0.00068424704117488
4 4 558255703 54142 0.000341445410931827 0.00206826631540365
5 5 558255702 54141 0.00148219733407846 0.00240971172633548
6 6 558255664 -1 0 0.00389190906041394
and
SELECT
seq, path_seq AS "pathSeq", node, edge, pgr.cost, agg_cost AS "aggCost"
FROM pgr_astar('SELECT * FROM edge', 1153548005, 558255664, true) as pgr
ORDER BY seq;
which returns:
1 1 1153548005 54256 0.00037972350433613237 0
2 2 558255704 54147 0.00027403899672301315 0.00037972350433613237
3 3 1037080644 54145 0.0002883815801048997 0.0006537625010591456
4 4 1037086594 54144 0.0005431804623754474 0.0009421440811640453
5 5 1037074188 54143 0.0003132688487491818 0.0014853245435394926
6 6 558255702 54141 0.001482197334078463 0.0017985933922886744
7 7 558255664 -1 0 0.0032807907263671375
Expectation
Result should be the same, with the same sequence and the same aggCost.
Sample Data
Uploaded above.
Platform/versions
docker images 11-2.5-2.6.2 or 12-3.0-3.1.0 or 13-3.1-3.1.3
- Ngôn ngữ chính
- C++
- Star
- 1.4k
- Fork
- 397
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pgRouting/pgrouting
-
Integer underflow and buffer overrun in detail::count_rows on disconnected distance matricesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Add details to CONTRIBUTING.mdĐang mởAdministrative Enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 3 ngày
-
points_input Developers docCó thể đã có người làm @withaman69 đã nhận 101 ngày trước. Đang mởC/C++ Developers Doc. good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pgRouting/pgrouting#973 · 10 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
get_check_data developers docCó thể đã có người làm @withaman69 đã nhận 103 ngày trước. Đang mởC/C++ Developers Doc. good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pgRouting/pgrouting#972 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của pgRouting/pgrouting
Issue tương tự
-
std::fdim drops partial derivative w.r.t second argument in forward and reverse modeCó thể đã có người làm @ADITYASINGH1206 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
vgvassilev/clad#2534 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
HAP.cpp fixĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
ardia-browser/ardia#1942 ·
Maintainer thường phản hồi trong vòng 1 ngày