Skip to content

Minor improvements in vertex to area linking - #6826

Merged
vesameskanen merged 8 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:fix-area-edge-props
Sep 1, 2025
Merged

Minor improvements in vertex to area linking#6826
vesameskanen merged 8 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:fix-area-edge-props

Conversation

@vesameskanen

@vesameskanen vesameskanen commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

Summary

  • No through traffic properties are now assigned more accurately to created edges
  • Area safety properties are now assigned as well
  • Walkable area builder uses consistent parent entity in vertex generation. previously, a random entity from the area group was used.
  • Some method renaming

Unit tests

One unit test added to verify that area safety factors are considered

NOTE: The test is a bit flaky, apparently because of double to float conversion. Test values are chosen to avoid value drifting.

Documentation

Javadoc added to explain the no through logic.

@vesameskanen
vesameskanen requested a review from a team as a code owner August 27, 2025 13:21
Comment thread application/src/main/java/org/opentripplanner/routing/linking/VertexLinker.java Outdated

@leonardehrenfried leonardehrenfried left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, I'm fine with this but would probably use a float everywhere.

@optionsome
optionsome requested a review from miklcct August 28, 2025 13:53
@codecov

codecov Bot commented Aug 29, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.00%. Comparing base (c5fd182) to head (7864bd1).
⚠️ Report is 28 commits behind head on dev-2.x.

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6826   +/-   ##
==========================================
  Coverage      71.99%   72.00%           
+ Complexity     19437    19426   -11     
==========================================
  Files           2100     2099    -1     
  Lines          78774    78729   -45     
  Branches        7963     7961    -2     
==========================================
- Hits           56717    56686   -31     
+ Misses         19249    19235   -14     
  Partials        2808     2808           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…reation

New barrier processing duplicates vertices when parent entity changes

@leonardehrenfried leonardehrenfried left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are probably a few more places where we could use floats instead of doubles when constructing the graph but that is beyond the scope of the PR.

@leonardehrenfried leonardehrenfried added !Bug Apply to issues describing a bug and PRs witch fixes it. !Technical Debt Improve code quality, no functional changes. labels Aug 29, 2025
@vesameskanen

Copy link
Copy Markdown
Contributor Author

I added one more somewhat related fix: walkable area builder passes the correct parent reference of each node when generating vertices. Previously part of the code used a common, randomly picked area group member. This did not have any effect because area group consists of entities at the same level. However, PR #6826 will introduce barrier logic which will get confused when node parent references are not consistent.

@miklcct

miklcct commented Sep 1, 2025

Copy link
Copy Markdown
Contributor

It looks good now but give me a day or two to put this on our test bed to see if it still works well with the barrier PR.

@vesameskanen
vesameskanen merged commit b7cdbb0 into opentripplanner:dev-2.x Sep 1, 2025
7 checks passed
@vesameskanen
vesameskanen deleted the fix-area-edge-props branch September 1, 2025 12:39
t2gran pushed a commit that referenced this pull request Sep 1, 2025
@t2gran t2gran added this to the 2.8 (next release) milestone Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Bug Apply to issues describing a bug and PRs witch fixes it. !Technical Debt Improve code quality, no functional changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants