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

StreetEdges split for floating bike rentals are never unsplit after the vehicle is removed #2787

Closed
evansiroky opened this issue Jul 1, 2019 · 1 comment · Fixed by ibi-group/OpenTripPlanner#5

Comments

@evansiroky
Copy link
Contributor

Expected behavior

StreetEdges that were split in order to insert bike rental vertices and edges are not "unsplitted" after they are removed from the bike rental feed. This will lead to a large accumulation of unneeded StreetEdges in graphs that have many floating bike rentals.

Observed behavior

There is a TODO in the comments that describe where this should take place.

/* remove existing stations that were not present in the update */
List<BikeRentalStation> toRemove = new ArrayList<BikeRentalStation>();
for (Entry<BikeRentalStation, BikeRentalStationVertex> entry : verticesByStation.entrySet()) {
BikeRentalStation station = entry.getKey();
if (stationSet.contains(station))
continue;
BikeRentalStationVertex vertex = entry.getValue();
if (graph.containsVertex(vertex)) {
graph.removeVertexAndEdges(vertex);
}
toRemove.add(station);
service.removeBikeRentalStation(station);
// TODO: need to unsplit any streets that were split
}

Version of OTP used (exact commit hash or JAR name)

3579765

Data sets in use (links to GTFS and OSM PBF files)

See https://maps.trimet.org/m/

Command line used to start OTP

java -jar otp-1.3.0.jar --autoScan --server --port 8888 --basePath /Users/evansiroky/workspace/portland-otp/

Router config and graph build config JSON

See https://maps.trimet.org/m/

Steps to reproduce the problem

Create a mock GBFS bike rental updater that includes a free_bike_status.json endpoint and then after the stations have been loaded for the first time, remove one of the free bikes from the feed and observed that streets that were split for the deleted free bike remain split.

@jwoyame
Copy link

jwoyame commented Jul 2, 2019

This is definitely an issue for us too. Here's our street network on a fresh instance of OTP, and then after 12 days of scooter rentals 😆

image (3)
image (4)

evansiroky added a commit to ibi-group/OpenTripPlanner that referenced this issue Jul 10, 2019
evansiroky added a commit to ibi-group/OpenTripPlanner that referenced this issue Jul 11, 2019
evansiroky added a commit to ibi-group/OpenTripPlanner that referenced this issue Jul 11, 2019
evansiroky added a commit to ibi-group/OpenTripPlanner that referenced this issue Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants