Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev-2.x' into clean-up-test-re…
Browse files Browse the repository at this point in the history
…sources
  • Loading branch information
leonardehrenfried committed Sep 28, 2023
2 parents 78ca61d + 60ccdb4 commit 60261b0
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 23 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ GTFS and OpenStreetMap). It applies real-time updates and alerts with immediate
clients, finding itineraries that account for disruptions and service changes.

Note that this branch contains **OpenTripPlanner 2**, the second major version of OTP, which has
been under development since Q2 2018. The latest version of OTP is v2.2.0, released in November 2022.
been under development since 2018. The latest version of OTP is v2.4.0, released in September 2023.

If you do not want to test or explore this version, please switch to the final 1.x release
tag `v1.5.0` or the `dev-1.x` branch for any patches and bugfixes applied to the v1.5.0 release.
If you do not want to use this version, please switch to the final 1.x release
tag `v1.5.0` or the `dev-1.x` branch.

## Performance Test

Expand Down
14 changes: 14 additions & 0 deletions docs/ReleaseChecklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ manually is more tedious, but keeps eyes on each step and is less prone to failu
* Mention the new version number.
* Provide links to the new developer documentation.
* Provide links to the artifacts directory on Maven Central.
* Prepare for the next release in GitHub by renaming the released milestone and creating a new
milestone for the next release. Then make sure all issues and PRs are tagged with the correct
milestone.
* Close open PRs older than 2 years, make sure the milestone is set to `Rejected`.
* Rename the old milestone from `x.y (Next Release)` to `x.y`. All issues and PRs assigned to
this milestone are automatically updated.
* Create a new milestone: `x.y+1 (Next Release)`
* All PullRequests SHOULD have a milestone (except some very old ones)
* Assign all *open* PRs to this new milestone `x.y+1 (Next Release)`.
* Assign all *closed* PRs without a milestone in the release to the released milestone
`x.y`. Make sure NOT to include very old PRs or PRs merged after the release(if any).
* Some issues have a milestone, but not all.
* Move all open issues with the released milestone `x.y` to the next release
`x.y+1 (Next Release)`.

## Artifact Signing

Expand Down
2 changes: 1 addition & 1 deletion docs/RoutingModes.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Used for street-level cable cars where the cable runs beneath the car.

Private car trips shared with others.

This is currently not specified in GTFS so we use the mode type values 1500-1560 which are in the range of private taxis.
This is currently not specified in GTFS so we use the mode type values 1550-1560 which are in the range of private taxis.


<h4 id="COACH">COACH</h4>
Expand Down
5 changes: 3 additions & 2 deletions docs/Version-Comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ the EU profile, and generalization to the EU profile should be feasible once it
| SIRI Realtime | no | yes |
| Elevation data | TIFF and NED | TIFF and NED |
| One-to-many routing,<br> isochrones and scripting | yes | no |
| Java version | 8+ | 11+ |
| Isochrones | yes | yes |
| Java version | 8+ | 17+ |
| Multiple regions per server | yes | no |
| Hot reloading of graphs | yes | no |
| Street (OSM) routing algorithm | Generalized cost A* | Generalized cost A* |
Expand Down Expand Up @@ -125,7 +126,7 @@ OTP2 to simplify the code base and make it easier to reason about security.
Less parameters are available on the OTP2 REST API than in OTP1. Often there is no practical loss of
functionality, just a different way of expressing things due to the new routing algorithms. A
summary of parameters that have been removed and their replacements can be found in the [migration
guide](Version-Comparison.md#Migration guide)
guide](Version-Comparison.md#migration-guide)

## OTP Trip planning and Transit index APIs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public boolean hasCrossingTrafficLight() {
* @return true if it is
*/
public boolean isMotorVehicleBarrier() {
var barrier = this.getTag("barrier");
return barrier != null && MOTOR_VEHICLE_BARRIERS.contains(barrier);
return isOneOfTags("barrier", MOTOR_VEHICLE_BARRIERS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public String enumValueDescription() {
case CARPOOL -> """
Private car trips shared with others.
This is currently not specified in GTFS so we use the mode type values 1500-1560 which are in the range of private taxis.
This is currently not specified in GTFS so we use the mode type values 1550-1560 which are in the range of private taxis.
""";
case TAXI -> "Using a taxi service";
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.opentripplanner.routing.impl.GraphPathFinder;
import org.opentripplanner.street.model.edge.Edge;
import org.opentripplanner.street.model.edge.StreetEdge;
import org.opentripplanner.street.model.vertex.BarrierVertex;
import org.opentripplanner.street.model.vertex.IntersectionVertex;
import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex;
import org.opentripplanner.street.model.vertex.Vertex;
Expand Down Expand Up @@ -298,11 +299,10 @@ void createArtificalEntrancesToUnlikedParkingLots() {
}

/**
* Test that a barrier vertex created when street ends to an access restriction
* will not prevent routing to that vertex
* Test that a barrier vertex at ending street will get no access limit
*/
@Test
private void testBarrierAtEnd() {
void testBarrierAtEnd() {
var deduplicator = new Deduplicator();
var graph = new Graph(deduplicator);

Expand All @@ -311,20 +311,16 @@ private void testBarrierAtEnd() {
OsmModule loader = OsmModule.of(provider, graph).build();
loader.buildGraph();

RouteRequest request = new RouteRequest();

// Route along a simple 3 vertex highway which ends to a 'access=none' node
Vertex start = graph.getVertex(VertexLabel.osm(1));
Vertex end = graph.getVertex(VertexLabel.osm(3));

GraphPathFinder graphPathFinder = new GraphPathFinder(null);
List<GraphPath<State, Edge, Vertex>> pathList = graphPathFinder.graphPathFinderEntryPoint(
request,
Set.of(start),
Set.of(end)
);
assertNotNull(pathList);
assertFalse(pathList.isEmpty());
assertNotNull(start);
assertNotNull(end);
assertEquals(end.getClass(), BarrierVertex.class);
var barrier = (BarrierVertex) end;

// assert that pruning removed traversal restrictions
assertEquals(barrier.getBarrierPermissions(), ALL);
}

@Nonnull
Expand Down

0 comments on commit 60261b0

Please sign in to comment.