CityChrone / public-transport-analysis

Public transport analysis in cities.
MIT License
11 stars 7 forks source link

Problem in finding the shortest paths #8

Open medourahou opened 1 month ago

medourahou commented 1 month ago

Hi, We have identified an issue in the ICSA algorithm implementation for computing sociality scores. Our analysis, conducted using various hyperparameters (maximum walking times of 15 and 30 minutes, and velocity speeds of 1.39 m/s and 0.8 m/s), revealed unexpected inconsistencies. Some hexagons are paradoxically more accessible at lower speeds, and there are cases where decreasing velocity enhances hexagon accessibility, which is logically incorrect. Additionally, the algorithm considers paths where the first stop is not a neighbour of the origin hexagon's centroid. This deviates from the expected behaviour, which should only account for direct walking paths between origin and destination, or paths where the first stop is a reachable neighbour within the maximum walk time.

medourahou commented 2 days ago

During our troubleshooting process, we selected a hexagon and identified reachable hexagons using two different walking velocities (1.39 m/s and 1.00 m/s). The results revealed an inconsistency where certain hexagons are reachable with a walking velocity of 1.00 m/s but not reachable with 1.39 m/s, which contradicts expected behaviour. To further investigate this issue, we selected a destination hexagon that was marked as reachable with a walking velocity of 1.00 m/s and examined the path generated by the algorithm. The algorithm considers this hexagon reachable because the travel time, calculated as (arrival time - departure time)/3600 = (28268-25200) = 3068 seconds, is less than the maximum travel time of 3600 seconds. However, we discovered a critical flaw in the implementation. The algorithm is making reachability determinations solely based on whether the total travel time is less than the maximum travel time. When examining the generated path, we observed that the arrival time at the first stop from the origin is set to 10000000. This indicates that the algorithm is not considering the first stop among neighbours stops of the origin centroid.

Solution To make sure that algorithm considers only the paths that satisfy the previous conditions, we added a condition to the implementation of ICSA algorithm "only account for direct walking paths between origin and destination, or paths where the first stop is a reachable neighbour within the maximum walk time" Group 63 Group 65 .