GBFS in Opentripplanner

443 views
Skip to first unread message

combit...@gmail.com

unread,
Mar 29, 2018, 11:00:10 AM3/29/18
to OpenTripPlanner Users
Hi everyone!

I'm trying to have OTP use GBFS data. According to the documentation this should be possible with the latest version. When using OTP at locations where rental bikes are available it says "rentedBike":false. The planner runs well with GTFS, GTFS-RT and OSM. Every help/comment is more than welcome!

I'm running the latest version of OTP: otp-1.2.0-shaded.jar

This is the snippet of the GBFS settings in the configuration file:

--->
        {
  type: "bike-rental",
  frequencySec: 120,
  sourceType: "gbfs",
        },
--->

This is the output of the log:

--->
14:27:23.028 INFO (BikeRentalUpdater.java:127) Setting up bike rental updater.
14:27:23.028 INFO (BikeRentalUpdater.java:131) Creating bike-rental updater running every 120 seconds : org.opentripplanner.updater.bike_rental.GbfsBikeRentalDataSource@69f5a73c
14:27:23.029 INFO (GraphUpdaterConfigurator.java:130) Configured GraphUpdater: org.opentripplanner.updater.bike_rental.BikeRentalUpdater@291dbe83
--->

and further in the log this is what I see:

--->
14:27:31.296 ERROR (GraphUpdaterManager.java:153) Error while setting up updater org.opentripplanner.updater.bike_rental.BikeRentalUpdater:
java.util.ConcurrentModificationException: null
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437) ~[na:1.8.0_131]
at java.util.HashMap$ValueIterator.next(HashMap.java:1466) ~[na:1.8.0_131]
at org.opentripplanner.routing.graph.Graph.getEdges(Graph.java:337) ~[otp-1.2.0-shaded.jar:1.1]
at org.opentripplanner.graph_builder.linking.SimpleStreetSplitter.<init>(SimpleStreetSplitter.java:106) ~[otp-1.2.0-shaded.jar:1.1]
at org.opentripplanner.graph_builder.linking.SimpleStreetSplitter.<init>(SimpleStreetSplitter.java:123) ~[otp-1.2.0-shaded.jar:1.1]
at org.opentripplanner.updater.bike_rental.BikeRentalUpdater.setup(BikeRentalUpdater.java:137) ~[otp-1.2.0-shaded.jar:1.1]
at org.opentripplanner.updater.GraphUpdaterManager$1.run(GraphUpdaterManager.java:146) ~[otp-1.2.0-shaded.jar:1.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
--->

The server at the remote address that has the GBFS data does not see any requests from the OTP server. Therefore I don't think the problem lies in the GBFS data.

Much thanks in advance!

Andrew Byrd

unread,
Apr 2, 2018, 6:21:45 AM4/2/18
to combit...@gmail.com, OpenTripPlanner Users
Hello Combitrip OTP users,

Thanks for reporting this. You're probably configuring the updater correctly, and this ConcurrentModificationException should never happen even if you receive bad data. This is a bug in OpenTripPlanner. We’re apparently trying to modify the collection of vertices in the graph while reading through that same collection.

Based on your error message and an inspection of the code, I think OTP is making vertices to represent bike rental stations or parking lots while it’s still iterating over the set of existing vertices to make a spatial index.

This prompted me to do a broad review of the GraphUpdater code looking for places that conflicting operations can happen simultaneously. I have created a ticket for this and hope to get these problems resolved in the coming days or weeks. https://github.com/opentripplanner/OpenTripPlanner/issues/2545

Can you tell us if you’re running multiple graph updaters on the same graph, and supply your entire graph updater configuration section? I’m specifically wondering if you might be running a bike parking updater at the same time as the bike station updater.

Regards,
Andrew

--
You received this message because you are subscribed to the Google Groups "OpenTripPlanner Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Andrew Byrd

unread,
May 10, 2018, 4:49:15 PM5/10/18
to combit...@gmail.com, OpenTripPlanner Users
Hi again,

We have taken steps toward resolving this concurrent modification exception when you have multiple graph updaters configured.

Please test your configuration with the current head of the master branch (commit 544e1b1e48f73ee4b3c38f2752845a949384d0a6 or after). Based on my testing it should work correctly now. 

Please add any additional comments to the ticket: https://github.com/opentripplanner/OpenTripPlanner/issues/2545

Regards,
Andrew

On Apr 2, 2018, at 20:07, combit...@gmail.com wrote:

Dear Andrew,

Thank you very much for your quick and elaborated response. Please find below the entire configuration file:

// router-config.json
{


    routingDefaults: {
        numItineraries: 6,
stationTransfers: true,
        walkSpeed: 2.0,
        stairsReluctance: 4.0,
        carDropoffTime: 240
    },

    updaters: [

        {
            type: "real-time-alerts",
            frequencySec: 30,
            url: "http://some_url/gtfs-rt/alerts.pb",
            feedId: "NL"
        },
        {
            type: "stop-time-updater",
            frequencySec: 60,
            // this is either http or file... shouldn't it default to http or guess from the presence of a URL?
            sourceType: "gtfs-http",
            url: "http://some_url/gtfs-rt/tripUpdates.pb",
            feedId: "NL"
        },
        {
  type: "bike-rental",
  frequencySec: 120,
  sourceType: "gbfs",
        },
        {
            type: "stop-time-updater",
            frequencySec: 60,
            // this is either http or file... shouldn't it default to http or guess from the presence of a URL?
            sourceType: "gtfs-http",
            url: "http://some_url/gtfs-rt/trainUpdates.pb",
            feedId: "NL"
        }

    ]
 }


Op maandag 2 april 2018 12:21:45 UTC+2 schreef Andrew Byrd:
Andrew

To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner-users+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Andrew Byrd

unread,
May 18, 2018, 6:41:22 AM5/18/18
to Bastiaan van 't Westeinde | CombiTrip.com, OpenTripPlanner Users
Hello,

We are not likely to cut a new release in the immediate future, but every commit to OTP is built automatically and deployed to the Sonatype OSS staging repository. You should be able to find shaded JAR builds here:

However, in this case the build appears to be failing due to memory constraints. Until we fix that it’s not being built. I will let you know when I get this fixed.

It should also be straightforward to build a copy of OTP from source using git and Maven, see:

-Andrew

On May 16, 2018, at 16:15, Bastiaan van 't Westeinde | CombiTrip.com <bast...@combitrip.com> wrote:

Hi Andrew,

Thanks for this. I always use jar executables, is it possible  to create an executable shaded JAR? I always use OTP updates from here: https://repo1.maven.org/maven2/org/opentripplanner/otp/ Is it possible to create a new version there so everyone can use it who are looking into using GBFS? 

Best regards,





Andrew

To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner-users+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "OpenTripPlanner Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner-users+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




-- 


Worldwide door to door Journeyplanner

e:  bast...@combitrip.com
w: 
www.combitrip.com


Andrew Byrd

unread,
May 19, 2018, 1:41:28 PM5/19/18
to Bastiaan van 't Westeinde | CombiTrip.com, OpenTripPlanner Users
The build is fixed now. It was running out of memory due to some resource-hungry tests.

You should be able to grab the latest stand-alone build at:

-Andrew

Combi Trip

unread,
May 31, 2018, 6:48:35 AM5/31/18
to Andrew Byrd, OpenTripPlanner Users
Dear Andrew, Thank you. With this build there are no errors wrt the GBFS updaters. However, we struggle to get bike rental results, but that may be due to the data itself, however we are investigating this. 

Best,

-Andrew


-Andrew


Worldwide door to door Journeyplanner

e:  bast...@combitrip.com
w: 
www.combitrip.com

Reply all
Reply to author
Forward
0 new messages