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

Building a GtfsFlex V2 with stop_times referencing areas fails in removeRepeatedStops #5537

Closed
Kalmac opened this issue Nov 27, 2023 · 4 comments

Comments

@Kalmac
Copy link

Kalmac commented Nov 27, 2023

Expected behavior

When building graph (--loadStreet) with a gtfs flex v2 like the one below, it should work.

Observed behavior

The stop_id column in stop_times.txt references areas as allowed by the specs.

OTP tries to removeRepeatedStops and the getStop() for StopTime returns null. It fails with the error below :

11:51:33.187 WARN [main]  (OtpTransitServiceBuilder.java:272) Limiting transit service days to time period: [2022-11-27, 2026-11-27]
11:51:33.188 INFO [main]  (OtpTransitServiceBuilder.java:293) Limiting transit service days to time period complete.
11:51:33.192 INFO [main]  (FlexTripsMapper.java:59) Create flex trips progress tracking complete. 273 done in 0s (68,250 per second). 
11:51:33.192 INFO [main]  (FlexTripsMapper.java:60) Done creating flex trips. Created a total of 273 trips.
11:51:33.192 INFO [main]  (ValidateAndInterpolateStopTimesForEachTrip.java:62) Validate StopTimes progress tracking started.
11:51:33.195 ERROR [main]  (OTPMain.java:60) An uncaught error occurred inside OTP: Cannot invoke "Object.equals(Object)" because the return value of "org.opentripplanner.model.StopTime.getStop()" is null
java.lang.NullPointerException: Cannot invoke "Object.equals(Object)" because the return value of "org.opentripplanner.model.StopTime.getStop()" is null
        at org.opentripplanner.graph_builder.module.ValidateAndInterpolateStopTimesForEachTrip.removeRepeatedStops(ValidateAndInterpolateStopTimesForEachTrip.java:111)
        at org.opentripplanner.graph_builder.module.ValidateAndInterpolateStopTimesForEachTrip.run(ValidateAndInterpolateStopTimesForEachTrip.java:75)
        at org.opentripplanner.gtfs.graphbuilder.GtfsModule.validateAndInterpolateStopTimesForEachTrip(GtfsModule.java:228)
        at org.opentripplanner.gtfs.graphbuilder.GtfsModule.buildGraph(GtfsModule.java:146)
        at org.opentripplanner.graph_builder.GraphBuilder.run(GraphBuilder.java:175)
        at org.opentripplanner.standalone.OTPMain.startOTPServer(OTPMain.java:141)
        at org.opentripplanner.standalone.OTPMain.main(OTPMain.java:55)

I tried to set the removeRepeatedStops to false in the build-config.json but without any improvment (in gtfsDefaults and in transitFeeds)

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

2.5.0-SNAPSHOT (c93f528)

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

villefranche-flex-gtfs.zip

@leonardehrenfried
Copy link
Member

leonardehrenfried commented Dec 5, 2023

The use of areas in the flec spex has been reverted and we are back to separate location groups. Can you convert your feed and try again?

You can see the very latest version of the spec draft here: google/transit#388

@Kalmac
Copy link
Author

Kalmac commented Dec 6, 2023

Hi,

thanks for your answer. Is there a compatibility table between GTFS Flex versions and OTP versions ?
Which one to use to match the last public specifications of Flex : https://github.com/MobilityData/gtfs-flex/blob/master/spec/reference.md ?

Best regards,

@leonardehrenfried
Copy link
Member

No compatibility table exists because the spec doesn't really have versions.

The latest version that I implement against ist google/transit#388

@leonardehrenfried
Copy link
Member

I'm going to close this as area support is no longer in the spec and won't be implemented in OTP.

I've merged another flex PR recently that will at least give you a better error message.

Please reopen if you disagree.

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

No branches or pull requests

2 participants