Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: flex - overlapping_zone_and_pickup_drop_off_window #1934

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

cka-y
Copy link
Contributor

@cka-y cka-y commented Dec 23, 2024

Summary

This PR addresses overlapping geometries and pickup/drop off windows.

Expected Behavior

The pull request ensures overlapping geometries are flagged and appropriate notices are generated during validation. Below are the detailed results for the relevant feeds determined from the :

1. For mdb-2160

The validation identifies overlapping geometries between area_1082 and area_897.

  • Example screenshot:
    image

  • Zoomed geometry view:
    Zoomed overlapping geometries mdb-2160

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with gradle test to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@cka-y cka-y linked an issue Dec 23, 2024 that may be closed by this pull request
@cka-y cka-y changed the title feat: flex - overlapping_zone_and_pickup_drop_off_window feat: flex - overlapping_zone_and_pickup_drop_off_window Dec 23, 2024
@MobilityData MobilityData deleted a comment from github-actions bot Dec 23, 2024
@MobilityData MobilityData deleted a comment from github-actions bot Dec 23, 2024
Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit 7e68a93
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (2 out of 1788 datasets, ~0%) ✅

Details of new errors due to code change, which is less than the provided threshold of 1%.

Dataset Notice Code
us-colorado-easy-ride-transportation-gtfs-1195 overlapping_zone_and_pickup_drop_off_window
us-washington-catholic-community-services-gtfs-2160 overlapping_zone_and_pickup_drop_off_window
Dropped Errors (0 out of 1788 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1788 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1788 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1788 sources (~0 %) are corrupted.

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 3.96 4.07 ⬆️+0.11
Median -- 1.38 1.47 ⬆️+0.08
Standard Deviation -- 11.36 11.55 ⬆️+0.18
Minimum in References Reports us-california-flex-v2-developer-test-feed-1-gtfs-1817 0.55 0.65 ⬆️+0.09
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 304.53 309.63 ⬆️+5.10
Minimum in Latest Reports us-california-city-of-wasco-gtfs-1788 0.60 0.53 ⬇️-0.07
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 304.53 309.63 ⬆️+5.10
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 488.73 MiB 462.81 MiB ⬇️-25.92 MiB
Median -- 243.83 MiB 242.95 MiB ⬇️-901.71 KiB
Standard Deviation -- 899.88 MiB 794.67 MiB ⬇️-105.21 MiB
Minimum in References Reports us-california-flex-v2-developer-test-feed-3-gtfs-1819 34.48 MiB 34.52 MiB ⬆️+40.00 KiB
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.11 GiB 10.13 GiB ⬆️+26.75 MiB
Minimum in Latest Reports us-california-flex-v2-developer-test-feed-1-gtfs-1817 34.49 MiB 34.48 MiB ⬇️-9.45 KiB
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.11 GiB 10.13 GiB ⬆️+26.75 MiB

@MobilityData MobilityData deleted a comment from github-actions bot Dec 24, 2024
@tzujenchanmbd
Copy link

Question:
Does this change consider pickup_type and drop_off_type? The notice should be triggered only when any 2 entities with the same pickup_type or drop_off_type

Reference:
#1809 (comment)
https://gtfs.org/documentation/schedule/examples/flex/#zone-overlap-constraint

@emmambd
Copy link
Contributor

emmambd commented Jan 16, 2025

@emmambd
Copy link
Contributor

emmambd commented Jan 20, 2025

Oh wait, now I see @tzujenchanmbd was right here - cc @davidgamez I don't see any logic that checks for same pickup and drop_off type, only that the windows overlap

@cka-y
Copy link
Contributor Author

cka-y commented Jan 22, 2025

Yes @tzujenchanmbd I missed the pick-up/drop-off type check. Should it be added to the fields displayed in the notice details section or is it ok to omit as there's already 9 fields?

@tzujenchanmbd
Copy link

@cka-y Since there are already 9 fields, I think we don't need to display the pickup/drop_off_type fields.

We can just mention in the description like "Two entities in stop_times.txt with the same trip_id have the same pickup_type or drop_off_type, overlapping pickup/drop-off windows, and overlapping zones in locations.geojson."

@cka-y
Copy link
Contributor Author

cka-y commented Jan 22, 2025

@tzujenchanmbd what should be the behaviour if both pickup/drop-off types are omitted?

Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit 5248c20
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (1 out of 1792 datasets, ~0%) ✅

Details of new errors due to code change, which is less than the provided threshold of 1%.

Dataset Notice Code
us-washington-catholic-community-services-gtfs-2160 overlapping_zone_and_pickup_drop_off_window
Dropped Errors (0 out of 1792 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1792 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1792 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1792 sources (~0 %) are corrupted.

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 3.61 3.70 ⬆️+0.09
Median -- 1.32 1.36 ⬆️+0.05
Standard Deviation -- 10.29 10.47 ⬆️+0.18
Minimum in References Reports ph-unknown-hm-transport-inc-and-robinsons-malls-gtfs-1105 0.46 0.60 ⬆️+0.14
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 277.47 279.24 ⬆️+1.77
Minimum in Latest Reports us-oregon-high-desert-point-gtfs-636 0.51 0.49 ⬇️-0.02
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 277.47 279.24 ⬆️+1.77
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 461.80 MiB 460.86 MiB ⬇️-956.28 KiB
Median -- 333.92 MiB 331.92 MiB ⬇️-2.00 MiB
Standard Deviation -- 754.29 MiB 759.52 MiB ⬆️+5.23 MiB
Minimum in References Reports us-iowa-sioux-city-transit-system-gtfs-191 39.27 MiB 407.92 MiB ⬆️+368.66 MiB
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.44 GiB 10.68 GiB ⬆️+241.66 MiB
Minimum in Latest Reports ro-vrancea-consiliul-judetean-vrancea-gtfs-1984 69.24 MiB 40.02 MiB ⬇️-29.23 MiB
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.44 GiB 10.68 GiB ⬆️+241.66 MiB

@tzujenchanmbd
Copy link

@cka-y Empty is considered equivalent to a value of 0. In other words, when the pickup_type (or drop_off_type) of two entities has the following combinations, the validator should proceed with further checks:

[empty, empty]
[0, empty]
[0, 0]

@cka-y cka-y requested a review from tzujenchanmbd January 23, 2025 16:00
Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit 8e05e00
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (2 out of 1792 datasets, ~0%) ✅

Details of new errors due to code change, which is less than the provided threshold of 1%.

Dataset Notice Code
de-unknown-postauto-ag-gtfs-2053 overlapping_zone_and_pickup_drop_off_window
us-washington-catholic-community-services-gtfs-2160 overlapping_zone_and_pickup_drop_off_window
Dropped Errors (0 out of 1792 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1792 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1792 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1792 sources (~0 %) are corrupted.

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 3.64 3.84 ⬆️+0.20
Median -- 1.32 1.42 ⬆️+0.10
Standard Deviation -- 10.41 10.63 ⬆️+0.22
Minimum in References Reports us-oregon-high-desert-point-gtfs-636 0.47 0.53 ⬆️+0.05
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 276.43 287.29 ⬆️+10.86
Minimum in Latest Reports us-california-taft-area-transit-gtfs-2236 0.50 0.50 ⬆️+0.00
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 276.43 287.29 ⬆️+10.86
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 469.49 MiB 459.41 MiB ⬇️-10.08 MiB
Median -- 335.92 MiB 333.92 MiB ⬇️-2.00 MiB
Standard Deviation -- 776.26 MiB 734.75 MiB ⬇️-41.51 MiB
Minimum in References Reports us-california-redding-area-bus-authority-raba-gtfs-114 38.79 MiB 38.79 MiB ⬆️+224 bytes
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.94 GiB 10.71 GiB ⬇️-235.98 MiB
Minimum in Latest Reports us-california-redding-area-bus-authority-raba-gtfs-114 38.79 MiB 38.79 MiB ⬆️+224 bytes
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.94 GiB 10.71 GiB ⬇️-235.98 MiB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flex: overlapping_zone_and_pickup_drop_off_window
4 participants