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

Bike walking through bike no thru traffic areas #6286

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,21 @@ else if (s0.currentMode() == TraverseMode.BICYCLE) {

State state = editor != null ? editor.makeState() : null;

// Add an explicit bike-walking state for no-thru-traffic edges, so that dismounting and walking
// is an option to avoid the restriction
if (
s0.currentMode() == TraverseMode.BICYCLE &&
canTraverse(TraverseMode.BICYCLE) &&
isBicycleNoThruTraffic() &&
!s0.hasEnteredNoThruTrafficArea()
) {
var bikeWalk = doTraverse(s0, TraverseMode.WALK, true);
if (bikeWalk != null) {
State forkState = bikeWalk.makeState();
return State.ofNullable(forkState, state);
}
}

// we are transitioning into a no-drop-off zone therefore we add a second state for dropping
// off the vehicle and walking
if (state != null && !fromv.rentalDropOffBanned(s0) && tov.rentalDropOffBanned(s0)) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static void beforeClass() {
}

@Test
public void test_trip_planning_with_walk_only() {
public void testTripPlanningWithWalkOnly() {
RouteRequest request = createTestRequest(2009, 11, 17, 10, 0, 0);

request.journey().direct().setMode(StreetMode.WALK);
Expand All @@ -77,7 +77,7 @@ public void test_trip_planning_with_walk_only() {
}

@Test
public void test_trip_planning_with_walk_only_stop() {
public void testTripPlanningWithWalkOnlyStop() {
RouteRequest request = createTestRequest(2009, 11, 17, 10, 0, 0);

request.journey().access().setMode(StreetMode.WALK);
Expand All @@ -93,7 +93,7 @@ public void test_trip_planning_with_walk_only_stop() {
}

@Test
public void test_trip_planning_with_walk_only_stop_collection() {
public void testTripPlanningWithWalkOnlyStopCollection() {
RouteRequest request = createTestRequest(2009, 11, 17, 10, 0, 0);

request.journey().access().setMode(StreetMode.WALK);
Expand All @@ -110,7 +110,7 @@ public void test_trip_planning_with_walk_only_stop_collection() {
}

@Test
public void test_trip_planning_with_transit() {
public void testTripPlanningWithTransit() {
RouteRequest request = createTestRequest(2009, 11, 17, 10, 0, 0);

request.journey().access().setMode(StreetMode.WALK);
Expand All @@ -126,7 +126,23 @@ public void test_trip_planning_with_transit() {
}

@Test
public void test_trip_planning_with_transit_stop() {
public void testTripPlanningWithBikeTransit() {
RouteRequest request = createTestRequest(2009, 11, 17, 10, 0, 0);

request.journey().access().setMode(StreetMode.WALK);
request.journey().egress().setMode(StreetMode.WALK);
request.journey().direct().setMode(StreetMode.WALK);
request.journey().transfer().setMode(StreetMode.BIKE);
request.journey().transit().setFilters(List.of(AllowAllTransitFilter.of()));

request.setFrom(p1);
request.setTo(p2);

expectRequestResponseToMatchSnapshot(request);
}

@Test
public void testTripPlanningWithTransitStop() {
RouteRequest request = createTestRequest(2009, 11, 17, 10, 0, 0);

request.journey().access().setMode(StreetMode.WALK);
Expand All @@ -143,7 +159,7 @@ public void test_trip_planning_with_transit_stop() {

@Test
@Disabled
public void test_trip_planning_with_transit_stop_collection() {
public void testTripPlanningWithTransitStopCollection() {
RouteRequest request = createTestRequest(2009, 11, 17, 10, 0, 0);

request.journey().access().setMode(StreetMode.WALK);
Expand Down
Loading
Loading