Skip to content

Commit

Permalink
Merge pull request #202 from ibi-group/upstream-merge-2024-02-05
Browse files Browse the repository at this point in the history
Upstream merge 2024-02-05
  • Loading branch information
miles-grant-ibigroup authored Feb 8, 2024
2 parents f5d95c6 + c2afe26 commit accd32c
Show file tree
Hide file tree
Showing 67 changed files with 713 additions and 549 deletions.
2 changes: 2 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle
- Introduce `generalizedCostPlusPenalty` to make cost comparsion fairer [#5483](https://github.com/opentripplanner/OpenTripPlanner/pull/5483)
- Separate walk time from non-transit time [#5648](https://github.com/opentripplanner/OpenTripPlanner/pull/5648)
- Remove "fare" [#5645](https://github.com/opentripplanner/OpenTripPlanner/pull/5645)
- Refactor GroupStopBuilder addLocation method [#5651](https://github.com/opentripplanner/OpenTripPlanner/pull/5651)
- Remove `VehicleToStopHeuristics` [#5381](https://github.com/opentripplanner/OpenTripPlanner/pull/5381)
[](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE)

## 2.4.0 (2023-09-13)
Expand Down
1 change: 0 additions & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ Here is a list of all features which can be toggled on/off and their default val
| `SandboxAPIParkAndRideApi` | Enable park-and-ride endpoint. | | ✓️ |
| `SandboxAPITravelTime` | Enable the isochrone/travel time surface API. | | ✓️ |
| `TransferAnalyzer` | Analyze transfers during graph build. | | ✓️ |
| `VehicleToStopHeuristics` | Enable improved heuristic for park-and-ride queries. | | ✓️ |

<!-- OTP-FEATURE-TABLE END -->

Expand Down
15 changes: 10 additions & 5 deletions docs/RouteRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ and in the [transferRequests in build-config.json](BuildConfiguration.md#transfe
|       [safety](#rd_bicycle_triangle_safety) | `double` | Relative importance of safety (range 0-1). | *Optional* | `0.0` | 2.0 |
|       time | `double` | Relative importance of duration of travel (range 0-1). | *Optional* | `0.0` | 2.0 |
|    walk | `object` | Preferences for walking a vehicle. | *Optional* | | 2.5 |
|       [hopCost](#rd_bicycle_walk_hopCost) | `integer` | The cost of hopping on or off a vehicle. | *Optional* | `0` | 2.0 |
|       [hopTime](#rd_bicycle_walk_hopTime) | `duration` | The time it takes the user to hop on or off a vehicle. | *Optional* | `"PT0S"` | 2.0 |
|       [mountDismountCost](#rd_bicycle_walk_mountDismountCost) | `integer` | The cost of hopping on or off a vehicle. | *Optional* | `0` | 2.0 |
|       [mountDismountTime](#rd_bicycle_walk_mountDismountTime) | `duration` | The time it takes the user to hop on or off a vehicle. | *Optional* | `"PT0S"` | 2.0 |
|       reluctance | `double` | A multiplier for how bad walking with a vehicle is, compared to being in transit for equal lengths of time. | *Optional* | `5.0` | 2.1 |
|       speed | `double` | The user's vehicle walking speed in meters/second. Defaults to approximately 3 MPH. | *Optional* | `1.33` | 2.1 |
|       stairsReluctance | `double` | How bad is it to walk the vehicle up/down a flight of stairs compared to taking a detour. | *Optional* | `10.0` | 2.3 |
Expand Down Expand Up @@ -406,7 +406,12 @@ since the search-window is increased with the same amount as the maximum penalty
the access legs used. In other cases where the access(CAR) is faster than transit the
performance will be better.

The default is no penalty, if not configured.
The default values are

- `car-to-park` = (timePenalty: 20m + 2.0 t, costFactor: 1.50)
- `car-rental` = (timePenalty: 20m + 2.0 t, costFactor: 1.50)
- `car-hailing` = (timePenalty: 20m + 2.0 t, costFactor: 1.50)
- `flexible` = (timePenalty: 20m + 2.0 t, costFactor: 1.50)

Example: `"car-to-park" : { "timePenalty": "10m + 1.5t", "costFactor": 2.5 }`

Expand Down Expand Up @@ -525,7 +530,7 @@ This factor can also include other concerns such as convenience and general cycl
preferences by taking into account road surface etc.


<h3 id="rd_bicycle_walk_hopCost">hopCost</h3>
<h3 id="rd_bicycle_walk_mountDismountCost">mountDismountCost</h3>

**Since version:** `2.0`**Type:** `integer`**Cardinality:** `Optional`**Default value:** `0`
**Path:** /routingDefaults/bicycle/walk
Expand All @@ -536,7 +541,7 @@ There are different parameters for the cost of renting or parking a vehicle and
not meant for controlling the cost of those events.


<h3 id="rd_bicycle_walk_hopTime">hopTime</h3>
<h3 id="rd_bicycle_walk_mountDismountTime">mountDismountTime</h3>

**Since version:** `2.0`**Type:** `duration`**Cardinality:** `Optional`**Default value:** `"PT0S"`
**Path:** /routingDefaults/bicycle/walk
Expand Down
1 change: 0 additions & 1 deletion docs/SandboxExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ nearby stops generated by routing via OSM data.
- [Park and Ride API](sandbox/ParkAndRideApi.md) - Park and Ride API
- [Data Overlay](sandbox/DataOverlay.md) - StreetEdge grid data populating affecting the route planning
- [Vehicle Parking](sandbox/VehicleParking.md) - Vehicle Parking updaters
- [Vehicle-to-stop heuristics](sandbox/VehicleToStopHeuristics.md) - Speeding up Park+Ride, Bike+Ride and Bike+Transit searches
- [Travel Time (Isochrone & Surface) API](sandbox/TravelTime.md) - Travel Time API
- [IBI accessibility score](sandbox/IBIAccessibilityScore.md) - IBI accessibility score
- [Fares](sandbox/Fares.md) - Fare calculation
Expand Down
2 changes: 1 addition & 1 deletion docs/apis/Apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ entities on a vector map.
The [Actuator API](../sandbox/ActuatorAPI.md) provides endpoints for checking the health status of the
OTP instance and reading live application metrics.

The [Geocoder API](../sandbox/GeocoderAPI.md) allows you to geocode stop names.
The [Geocoder API](../sandbox/GeocoderAPI.md) allows you to geocode stop names and codes.

## Legacy APIs (to be removed)

Expand Down
3 changes: 1 addition & 2 deletions docs/examples/entur/otp-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"OptimizeTransfers": true,
"TransferConstraints": true,
"ParallelRouting": false,
"ReportApi" : true,
"VehicleToStopHeuristics": true
"ReportApi" : true
}
}
8 changes: 4 additions & 4 deletions docs/sandbox/GeocoderAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To enable this you need to add the feature to `otp-config.json`.

The required geocode API for Stop and From/To searches in the debug client.

Path: `/otp/routers/{routerId}/geocode`
Path: `/otp/geocode`

It supports the following URL parameters:

Expand All @@ -40,12 +40,12 @@ It supports the following URL parameters:
#### Stop clusters

A stop cluster is a deduplicated groups of stops. This means that for any stop that has a parent
station only the parent is returned and for stops that have identical names and are very close
station only the parent is returned and for stops that have _identical_ names and are very close
to each other, only one is returned.

This is useful for a general purpose fuzzy "stop" search.
This is useful for a general purpose fuzzy stop search.

Path: `/otp/routers/{routerId}/geocode/stopClusters`
Path: `/otp/geocode/stopClusters`

It supports the following URL parameters:

Expand Down
77 changes: 0 additions & 77 deletions docs/sandbox/VehicleToStopHeuristics.md

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ nav:
- Park and Ride API: 'sandbox/ParkAndRideApi.md'
- Data Overlay: 'sandbox/DataOverlay.md'
- Vehicle Parking Updaters: 'sandbox/VehicleParking.md'
- Vehicle-to-stop Heuristics: 'sandbox/VehicleToStopHeuristics.md'
- Geocoder API: 'sandbox/GeocoderAPI.md'
- Travel Time Isochrones: 'sandbox/TravelTime.md'
- IBI Accessibility Score: 'sandbox/IBIAccessibilityScore.md'
Expand Down
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@


<properties>
<otp.serialization.version.id>141</otp.serialization.version.id>
<otp.serialization.version.id>144</otp.serialization.version.id>
<!-- Lib versions - keep list sorted on property name -->
<geotools.version>30.1</geotools.version>
<geotools.version>30.2</geotools.version>
<google.dagger.version>2.50</google.dagger.version>
<jackson.version>2.16.1</jackson.version>
<jersey.version>3.1.5</jersey.version>
<junit.version>5.10.1</junit.version>
<micrometer.version>1.12.1</micrometer.version>
<junit.version>5.10.2</junit.version>
<micrometer.version>1.12.2</micrometer.version>
<netcdf4.version>5.5.3</netcdf4.version>
<logback.version>1.4.14</logback.version>
<lucene.version>9.9.1</lucene.version>
<slf4j.version>2.0.11</slf4j.version>
<slf4j.version>2.0.12</slf4j.version>
<netex-java-model.version>2.0.15</netex-java-model.version>
<siri-java-model.version>1.26</siri-java-model.version>
<jaxb-runtime.version>4.0.4</jaxb-runtime.version>
Expand Down Expand Up @@ -552,7 +552,7 @@
<!-- This make sure all google libraries are using compatible versions. -->
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.27.0</version>
<version>26.31.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -720,7 +720,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.9.0</version>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -746,7 +746,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.3-jre</version>
<version>33.0.0-jre</version>
</dependency>
<!-- Jersey annotation-driven REST web services (JAX-RS implementation) -->
<dependency>
Expand Down Expand Up @@ -890,7 +890,7 @@
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.3</version>
<version>5.3.1</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
Expand Down
8 changes: 8 additions & 0 deletions smoke-tests/atlanta/router-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"unknownCost": 600,
"inaccessibleCost": 3600
}
},
"accessEgress": {
"penalty": {
"FLEXIBLE" : {
"timePenalty" : "10m + 1.3t",
"costFactor" : 1.2
}
}
}
}
}
2 changes: 1 addition & 1 deletion smoke-tests/seattle/build-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{
"type" : "gtfs",
"feedId" : "monorail",
"source" : "https://github.com/transitland/gtfs-archives-not-hosted-elsewhere/raw/master/seattlemonorail-wa-us.zip"
"source" : "https://gtfs.sound.obaweb.org/prod/96_gtfs.zip"
}
],
"transferRequests": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.routing.api.RoutingService;
import org.opentripplanner.routing.api.request.RouteRequest;
import org.opentripplanner.routing.api.request.framework.TimeAndCostPenalty;
import org.opentripplanner.routing.api.request.request.filter.AllowAllTransitFilter;
import org.opentripplanner.routing.graph.Graph;
import org.opentripplanner.transit.service.TransitModel;
Expand Down Expand Up @@ -224,6 +225,11 @@ private static List<Itinerary> getItineraries(
request.setTo(to);
request.setNumItineraries(10);
request.setSearchWindow(Duration.ofHours(2));
request.withPreferences(p ->
p.withStreet(s ->
s.withAccessEgress(ae -> ae.withPenalty(Map.of(FLEXIBLE, TimeAndCostPenalty.ZERO)))
)
);

var modes = request.journey().modes().copyOf();
modes.withEgressMode(FLEXIBLE);
Expand Down
Loading

0 comments on commit accd32c

Please sign in to comment.