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

Remove default accessegress penalty for car modes that use transit #6414

Open
wants to merge 1 commit into
base: dev-2.x
Choose a base branch
from

Conversation

VillePihlava
Copy link
Contributor

Summary

This PR removes the default accessegress penalty for car modes that use transit.

Issue

This is a follow-up PR related to issue #5875

Documentation

Automatically generated changes.

@VillePihlava VillePihlava requested a review from a team as a code owner January 30, 2025 12:08
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.84%. Comparing base (fe5c570) to head (a618a01).

Files with missing lines Patch % Lines
...pi/request/preference/AccessEgressPreferences.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6414   +/-   ##
==========================================
  Coverage      69.84%   69.84%           
- Complexity     18124    18125    +1     
==========================================
  Files           2069     2069           
  Lines          77268    77269    +1     
  Branches        7855     7855           
==========================================
+ Hits           53965    53966    +1     
  Misses         20546    20546           
  Partials        2757     2757           

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

@@ -171,7 +171,9 @@ private static TimeAndCostPenaltyForEnum<StreetMode> createDefaultCarPenalty() {
// Add penalty to all car variants with access and/or egress.
Copy link
Member

Choose a reason for hiding this comment

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

This comment should be updated.

Copy link
Member

@t2gran t2gran left a comment

Choose a reason for hiding this comment

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

I searched for more information on this, but could not find any.

Comment on lines +174 to +176
if (
it.includesDriving() && (it.accessAllowed() || it.egressAllowed()) && !it.transferAllowed()
) {
Copy link
Member

@t2gran t2gran Jan 30, 2025

Choose a reason for hiding this comment

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

Suggested change
if (
it.includesDriving() && (it.accessAllowed() || it.egressAllowed()) && !it.transferAllowed()
) {
// Apply car-penalty to all car modes allowed in access/egress only. Exclude car modes(CAR) used
// in direct street routing and car modes used when you bring the car with you onto transit. This is
// a bit limited and will not work if we combine car access/egress modes like CAR_TO_PARK with CAR
// in the same search. This is currently not possible, but if we enable this in the future this logic must be
// looked at again.
if (
it.includesDriving() && (it.accessAllowed() || it.egressAllowed()) && it != CAR
) {

@t2gran
Copy link
Member

t2gran commented Jan 30, 2025

I tried, but did not find any issue discussing the issues around penalty on CAR and other street modes.

@leonardehrenfried
Copy link
Member

We discussed it (very lightly) in the original PR: #6302

@t2gran
Copy link
Member

t2gran commented Jan 30, 2025

Yes I fount it, but I was almost sure there was a issue with a more in dept discussion. The PR was not very helpful, but good to reference it anyway.

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.

4 participants