Gtfs Realtime in OTP (master branch)

1,288 views
Skip to first unread message

Niccolò Perra

unread,
Nov 18, 2013, 2:48:55 PM11/18/13
to opentrippl...@googlegroups.com
Hey,

I've created a websocket trip updates provider using 


it seems to work and I can connect to it using the simple websocket chrome extension

I now need to tell otp to connect to the websocket but I could not find any example for doing so.

I see that org.opentripplanner.updater.stoptime.WebsocketGtfsRealtimeUpdater should do the job but I don't know where and how I should specify it.

I've tried adding

<bean class="org.opentripplanner.updater.stoptime.WebsocketGtfsRealtimeUpdater">
<property name="url" value="http://localhost:8081/tripUpdate"/>
</bean>
in application-context but it seems that it has its own way of specifying the parameters. I also tried to hardcode the url to see if it does work but I don't see in console anithing saying it's doing so.

Anyone can help?

Thanks
niccolo

Ricardo

unread,
Nov 25, 2013, 10:32:27 AM11/25/13
to opentrippl...@googlegroups.com
Hi Niccolo,

I'm sorry for highjacking your post, but I have a complementary question to yours and thought it would be better not to create a new topic and try to keep things together.


I'm also trying to test GTFS-RT with OTP and have encounter some doubts. I've created an alerts provider using:

https://github.com/OneBusAway/onebusaway-gtfs-realtime-alerts-producer-demo/wiki

I've also created a test GTFS file using the same route IDs as the one in the alerts GTFS-RT. I've changed the application-context file and it seems the alert information is being consumed (I see the GTFS-RT server info on the logs and when I start the OTP server without the GTFS-RT server running I get errors).

However I don't see the alerts anywhere. I would expect them to be on the trip description. Am I missing something? Can someone post a print screen of GTFS-RT alert information being displayed on OTP please.

Thanks a lot
Ricardo

Carlos

unread,
Dec 1, 2013, 5:54:47 PM12/1/13
to opentrippl...@googlegroups.com
I have the same problem.

I have alerts....but can't see on my itinerary.

How can we solve ?

Arjun V

unread,
Dec 11, 2013, 4:25:37 AM12/11/13
to opentrippl...@googlegroups.com

Hi guys,

By any chance, did you find out a way to solve this?
If you did, it would be great to mention it here for the benefit of the whole group.

Thanks
Arjun

Ricardo

unread,
Dec 13, 2013, 6:20:13 AM12/13/13
to opentrippl...@googlegroups.com
Hi Arjun,

I don't have an answer yet, nor did I figure out the problem...but have to confess that for the last weeks, didn't have the time to look at it again. I'm planning to take a fresh look starting next week, maybe I'll figure out something or maybe meanwhile someone posts some hint.

Cheers,
Ricardo

Arjun

unread,
Jan 8, 2014, 3:01:35 PM1/8/14
to opentrippl...@googlegroups.com
Hi,

We could use onebusaway exporter to delay a particular train/bus and see if it is 
getting updated in the graph (you could use the api to get the details for the train-station pair or bus-stand pair).

@Niccolo:
Using the master branch, all you need to do is create a file called Graph.properties in the same folder as your Graph.obj with the following details to consume GTFS real-time feed. (Jus paste as is except for the url and agencyid if you have to change)

rt.type = stop-time-updater
rt.sourceType = gtfs-http
rt.frequencySec = 60
rt.defaultAgencyId = GT

With this setup you should see scheduled polling logs being consumed. 

P.S : I haven't tried generating the realtime feeds using onebusaway. So, if someone does, please update how things work out.

Thanks

Niccolò Perra

unread,
Jan 9, 2014, 1:55:46 AM1/9/14
to opentrippl...@googlegroups.com
Thanks, I got it work but I'm now using the mmri-rt branch!

Daniel

unread,
Feb 19, 2014, 4:30:49 PM2/19/14
to opentrippl...@googlegroups.com
How do you start the server using the master branch? Do you execute it in Eclipse? If yes, how do you set the paths of the Graph.obj and Graph.properties in the master branch?
Thanks in advance!

Andrew Byrd

unread,
Feb 20, 2014, 4:57:31 AM2/20/14
to opentrippl...@googlegroups.com
Hi,

The master branch should only add new capabilities to the older versions
or stable. In master you now have the option of starting a built-in
server (class OTPMain, which will run automatically if you run the
otp.jar file or use the otp shell script in the root of the project), or
you can use OTP as a servlet and drop it into a container like Tomcat.

It is possible to run servlet containers inside Eclipse. It is also
possible to run the OTPMain class inside Eclipse.

When using OTP as a servlet you have to modify data-sources.xml to
indicate where your graph is. When running the stand-alone JAR you can
provide the path to the graphs with the -g command line switch.

For a simple startup, see
https://github.com/opentripplanner/OpenTripPlanner/wiki/TwoMinutes

-Andrew

On 02/19/2014 10:30 PM, Daniel wrote:
> How do you start the server using the master branch? Do you execute it
> in Eclipse? If yes, how do you set the paths of the Graph.obj and
> Graph.properties in the master branch?
> Thanks in advance!
>
>
> Am Mittwoch, 8. Januar 2014 15:01:35 UTC-5 schrieb Arjun:
>
> Hi,
>
> We could use onebusaway exporter to delay a particular train/bus and
> see if it is
> getting updated in the graph (you could use the api to get the
> details for the train-station pair or bus-stand pair).
>
> @Niccolo:
> Using the master branch, all you need to do is create a file called
> Graph.properties in the same folder as your Graph.obj with the
> following details to consume GTFS real-time feed. (Jus paste as is
> except for the url and agencyid if you have to change)
>
> *rt.type = stop-time-updater*
> *rt.sourceType = gtfs-http*
> *rt.url = *http://localhost:8081/tripUpdate
> <http://localhost:8081/tripUpdate>
> *rt.frequencySec = 60*
> *rt.defaultAgencyId = GT*
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FOneBusAway%2Fonebusaway-gtfs-realtime-exporter&sa=D&sntz=1&usg=AFQjCNFCCZeqvQHdv7qglzcbfwR1OVJ-rA>
>
> it seems to work and I can connect to it using the
> simple websocket chrome extension
>
> I now need to tell otp to connect to the websocket
> but I could not find any example for doing so.
>
> I see
> that org.opentripplanner.updater.stoptime.WebsocketGtfsRealtimeUpdater
> should do the job but I don't know where and how I
> should specify it.
>
> I've tried adding
>
> <bean
> class="org.opentripplanner.updater.stoptime.WebsocketGtfsRealtimeUpdater">
> <property name="url"
> value="http://localhost:8081/tripUpdate
> <http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A8081%2FtripUpdate&sa=D&sntz=1&usg=AFQjCNFpU-ClUEuH3FKEbPyCMbNHNx2pmA>"/>
> </bean>
> in application-context but it seems that it has its
> own way of specifying the parameters. I also tried
> to hardcode the url to see if it does work but I
> don't see in console anithing saying it's doing so.
>
> Anyone can help?
>
> Thanks
> niccolo
>
> --
> 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/groups/opt_out.

Daniel

unread,
Feb 20, 2014, 4:00:21 PM2/20/14
to opentrippl...@googlegroups.com
Hi Andrew,
thanks for your help, I was just used to the standalone version where I only need to adapt the XML configuration and execute the batch files.
Now I got it with the help of the Two-Minutes-Introduction, just installed GIT for Windows, (Maven for Windows was previously installed), and executed the commands. Works fine, thanks!!
Btw, is there also a documentation how to execute for example the graph visualisation or other tools in the master branch?

Andrew Byrd

unread,
Feb 21, 2014, 8:24:08 AM2/21/14
to opentrippl...@googlegroups.com
On 02/20/2014 10:00 PM, Daniel wrote:
> Hi Andrew,
> thanks for your help, I was just used to the standalone version where I
> only need to adapt the XML configuration and execute the batch files.
> Now I got it with the help of the Two-Minutes-Introduction, just
> installed GIT for Windows, (Maven for Windows was previously installed),
> and executed the commands. Works fine, thanks!!
> Btw, is there also a documentation how to execute for example the graph
> visualisation or other tools in the master branch?

Honestly, no there is not adequate documentation for these features.
They are not yet part of any official release of OTP but will be in the
upcoming version 1.0, for which we are preparing proper documentation.

To answer your specific question though, there is a --visualize switch
for otp.jar which starts the graph visualizer.

-Andrew
Message has been deleted

Daniel

unread,
Feb 21, 2014, 1:28:47 PM2/21/14
to opentrippl...@googlegroups.com
Thanks for this information!

I got this graph.properties file from Thomas for including GTFS realtime information from Netherlands:

myalert.type = real-time-alerts
myalert.frequencySec = 60
myalert.url = http://gtfs.ovapi.nl/new/alerts.pb
myalert.earlyStartSec = 3600
myalert.defaultAgencyId = ARR 
gtfsrt.type = stop-time-updater 
gtfsrt.sourceType = gtfs-http
gtfsrt.defaultAgencyId = ARR
gtfsrt.url = http://gtfs.ovapi.nl/new/tripUpdates.pb
gtfsrt.tripTimeUpdater = continuesDelay

When I start the server, I now get the ERROR message that stop-time-updater is unknown:

13:03:11.102 INFO (Graph.java:584) This graph was built with the currently runni
ng version and commit of OTP.
13:11:17.324 INFO (Graph.java:536) Main graph read. |V|=3732021 |E|=8963653
13:11:57.593 INFO (GraphServiceFileImpl.java:196) Loading config from file C:\Op
enTripPlanner\var\otp\graphs\Graph.properties
13:11:57.608 INFO (GraphUpdaterConfigurator.java:69) Using configurations: [main
]
13:11:57.608 ERROR (GraphUpdaterConfigurator.java:137) Unknown updater type: sto
p-time-updater
13:11:57.608 INFO (GtfsRealtimeAlertsUpdater.java:78) Creating real-time alert u
pdater running every 60 seconds : http://gtfs.ovapi.nl/new/alerts.pb
13:11:57.608 INFO (OTPComponentProviderFactory.java:125) Calling post-construct
private void org.opentripplanner.analyst.request.SPTCache.runAfterInjection()
13:11:57.640 INFO (OTPComponentProviderFactory.java:125) Calling post-construct
private void org.opentripplanner.analyst.request.TileCache.runAfterInjection()
13:11:57.640 INFO (OTPComponentProviderFactory.java:125) Calling post-construct
public void org.opentripplanner.analyst.core.GeometryIndex.initialzeComponent()
13:12:04.301 INFO (GrizzlyServer.java:107) Starting OTP Grizzly server on port 8
080 using graphs at C:\OpenTripPlanner\var\otp\graphs
13:12:08.076 INFO (GrizzlyServer.java:99) Serving static client files from C:\Us
ers\STEINE~1.DAN\AppData\Local\Temp\1393006326064-0
13:12:08.201 INFO (NetworkListener.java:614) Started listener bound to [0.0.0.0:
8080]
13:12:08.201 INFO (HttpServer.java:286) [HttpServer] Started.
13:12:08.201 INFO (GrizzlyServer.java:139) Grizzly server running.


13:17:02.848 INFO (GtfsRealtimeAlertsUpdater.java:104) Ignoring feed with an old
 timestamp.
13:18:03.628 INFO (GtfsRealtimeAlertsUpdater.java:104) Ignoring feed with an old
 timestamp.


What does this mean?

Thomas Koch

unread,
Feb 21, 2014, 2:16:17 PM2/21/14
to opentrippl...@googlegroups.com
Not sure stop-time-update should work... https://github.com/opentripplanner/OpenTripPlanner/blob/master/otp-core/src/main/java/org/opentripplanner/updater/GraphUpdaterConfigurator.java#L116

Op vrijdag 21 februari 2014 19:28:47 UTC+1 schreef Daniel:

Daniel

unread,
Feb 21, 2014, 2:21:51 PM2/21/14
to opentrippl...@googlegroups.com
Does it depend on how I created the graph or how I started the server?

build graph:
c:\OpenTripPlanner>java -server -Xmx25G -jar otp-core/target/otp.jar -a --transitIndex -l -b --build C:\OpenTripPlanner\var\otp\downloads

start server:
java -Xmx29G -jar otp-core/target/otp.jar –s –a –l –g C:\OpenTripPlanner\var\otp\graphs --server

this is how I executed the commands. I don't really know what the shortcuts mean, besides -g to show in which directory the graph is located.
Could there be any error using wrong shortcuts?

Laurent Gregoire

unread,
Feb 22, 2014, 2:01:28 PM2/22/14
to opentrippl...@googlegroups.com
On 21/02/14 20:21, Daniel wrote:
> Does it depend on how I created the graph or how I started the server?

I do not think your error (stop-time-updater unknown) is related to how
you start your server, as long as the config is loaded that should be
fine. And according to your logs the configurator is indeed loading your
Graph.properties file.

It's a bit strange though that it does not recognize
"stop-time-updater", it should be so in the master version. Are you sure
about the code version you are running? Can you also set a breakpoint in
GraphUpdaterConfigurator in the applyConfigurationToGraph method and see
why this type is not recognized. It may also be due to bogus characters
in the config string, you can double-check that too.

HTH,

--
Laurent GRÉGOIRE
laurent....@gmail.com

Daniel

unread,
Feb 24, 2014, 1:03:54 PM2/24/14
to opentrippl...@googlegroups.com
I just started the whole process with the "master" branch, and I get the same error again:


12:45:06.780 INFO (Graph.java:528) Main graph read. |V|=2950790 |E|=8535549
12:45:44.091 INFO (GraphServiceFileImpl.java:196) Loading config from file C:\Op
enTripPlanner master\var\otp\graphs\Graph.properties
12:45:44.107 INFO (GraphUpdaterConfigurator.java:69) Using configurations: [main
]
12:45:44.107 ERROR (GraphUpdaterConfigurator.java:137) Unknown updater type: sto
p-time-updater
12:45:44.107 INFO (GtfsRealtimeAlertsUpdater.java:78) Creating real-time alert u

pdater running every 60 seconds : http://gtfs.ovapi.nl/new/alerts.pb
12:45:44.122 INFO (GrizzlyServer.java:107) Starting OTP Grizzly server on port 8
080 using graphs at C:\OpenTripPlanner master\var\otp\graphs
12:45:47.024 INFO (GrizzlyServer.java:99) Serving static client files from C:\Us
ers\STEINE~1.DAN\AppData\Local\Temp\1393263945963-0
12:45:47.071 INFO (NetworkListener.java:614) Started listener bound to [0.0.0.0:
8080]
12:45:47.071 INFO (HttpServer.java:286) [HttpServer] Started.
12:45:47.071 INFO (GrizzlyServer.java:139) Grizzly server running.
12:47:57.104 INFO (GtfsRealtimeAlertsUpdater.java:104) Ignoring feed with an old
 timestamp.
12:51:02.697 INFO (GtfsRealtimeAlertsUpdater.java:104) Ignoring feed with an old
 timestamp.

I gonna try to debug the code, but it could take some time.

Daniel

unread,
Feb 24, 2014, 2:13:17 PM2/24/14
to opentrippl...@googlegroups.com
The error was apparently in the graph.properties file, I completely re-wrote it and now it seems that the information will be gathered in the console: 

this is my new file:

myalert.type = real-time-alerts
myalert.frequencySec = 60
myalert.url = http://gtfs.ovapi.nl/new/alerts.pb
myalert.earlyStartSec = 3600
myalert.defaultAgencyId = ARR
rt.type = stop-time-updater
rt.sourceType = gtfs-http
rt.defaultAgencyId = ARR
rt.url = http://gtfs.ovapi.nl/new/tripUpdates.pb
rt.tripTimeUpdater = continuesDelay


planning a trip is possible, but there is neither an information about alerts or trip updates in the route. This is what is now continuously appearing in my console:


13:40:33.355 WARN (TimetableSnapshotSource.java:191) No pattern found for tripId
 ARR_9290339, skipping TripUpdate.
13:40:33.355 WARN (TimetableSnapshotSource.java:138) Failed to apply TripUpdateL
ist: tripId: ARR_9290339
Update trip ARR_9290339 Stop #0:ARR_132045 (PREDICTION) A146263 D146263
Update trip ARR_9290339 Stop #1:ARR_46623 (PREDICTION) A146296 D146296
Update trip ARR_9290339 Stop #2:ARR_41243 (PREDICTION) A146392 D146405
Update trip ARR_9290339 Stop #3:ARR_158821 (PREDICTION) A146482 D146482
Update trip ARR_9290339 Stop #4:ARR_74663 (PREDICTION) A146516 D146516
Update trip ARR_9290339 Stop #5:ARR_43414 (PREDICTION) A146569 D146586
Update trip ARR_9290339 Stop #6:ARR_158851 (PREDICTION) A146678 D146700
Update trip ARR_9290339 Stop #7:ARR_34145 (PREDICTION) A146799 D146822
Update trip ARR_9290339 Stop #8:ARR_46022 (PREDICTION) A146957 D146974
Update trip ARR_9290339 Stop #9:ARR_44286 (PREDICTION) A147025 D147068
Update trip ARR_9290339 Stop #10:ARR_37881 (PREDICTION) A147123 D147145
Update trip ARR_9290339 Stop #11:ARR_158854 (PREDICTION) A147255 D147255
Update trip ARR_9290339 Stop #12:ARR_47963 (PREDICTION) A147347 D147375
Update trip ARR_9290339 Stop #13:ARR_43288 (PREDICTION) A147517 D147517
Update trip ARR_9290339 Stop #15:ARR_47954 (PREDICTION) A147544 D147867
Update trip ARR_9290339 Stop #16:ARR_103649 (PREDICTION) A147976 D148014
Update trip ARR_9290339 Stop #17:ARR_43057 (PREDICTION) A148109 D148124
Update trip ARR_9290339 Stop #18:ARR_48350 (PREDICTION) A148189 D148206
Update trip ARR_9290339 Stop #19:ARR_46032 (PREDICTION) A148249 D148260
Update trip ARR_9290339 Stop #20:ARR_158859 (PREDICTION) A148327 D148359
Update trip ARR_9290339 Stop #21:ARR_36882 (PREDICTION) A148431 D148447
Update trip ARR_9290339 Stop #22:ARR_35721 (PREDICTION) A148510 D148510
Update trip ARR_9290339 Stop #23:ARR_47800 (PREDICTION) A148567 D148584
Update trip ARR_9290339 Stop #24:ARR_34849 (PREDICTION) A148671 D148693
Update trip ARR_9290339 Stop #25:ARR_36861 (PREDICTION) A148896 D148896
Update trip ARR_9290339 Stop #26:ARR_36269 (PREDICTION) A148933 D148933
Update trip ARR_9290339 Stop #27:ARR_39522 (PREDICTION) A148999 D149015
Update trip ARR_9290339 Stop #28:ARR_43839 (PREDICTION) A149059 D149081
Update trip ARR_9290339 Stop #29:ARR_35162 (PREDICTION) A149196 D149212
Update trip ARR_9290339 Stop #30:ARR_49384 (PREDICTION) A149400 D149400
Update trip ARR_9290339 Stop #31:ARR_45049 (PREDICTION) A149453 D149453
Update trip ARR_9290339 Stop #32:ARR_91192 (PREDICTION) A149524 D149548
Update trip ARR_9290339 Stop #33:ARR_44556 (PREDICTION) A149595 D149595
Update trip ARR_9290339 Stop #34:ARR_48396 (PREDICTION) A149627 D149627
Update trip ARR_9290339 Stop #35:ARR_34988 (PREDICTION) A149677 D149677
Update trip ARR_9290339 Stop #36:ARR_132225 (PREDICTION) A149858 D149871
Update trip ARR_9290339 Stop #37:ARR_91717 (PREDICTION) A149967 D149983
Update trip ARR_9290339 Stop #38:ARR_36407 (PREDICTION) A150181 D150197
Update trip ARR_9290339 Stop #39:ARR_34939 (PREDICTION) A150382 D150394
Update trip ARR_9290339 Stop #43:ARR_34446 (PREDICTION) A150443 D150600
Update trip ARR_9290339 Stop #44:ARR_38563 (PREDICTION) A150968 D150992
Update trip ARR_9290339 Stop #45:ARR_103340 (PREDICTION) A151176 D151214
Update trip ARR_9290339 Stop #46:ARR_36566 (PREDICTION) A151291 D151291
Update trip ARR_9290339 Stop #47:ARR_35980 (PREDICTION) A151320 D151320
Update trip ARR_9290339 Stop #48:ARR_44694 (PREDICTION) A151362 D151380
Update trip ARR_9290339 Stop #49:ARR_44092 (PREDICTION) A151429 D151449
Update trip ARR_9290339 Stop #50:ARR_40212 (PREDICTION) A151515 D151537
Update trip ARR_9290339 Stop #51:ARR_42931 (PREDICTION) A151569 D151586
Update trip ARR_9290339 Stop #52:ARR_41953 (PREDICTION) A151630 D151630
Update trip ARR_9290339 Stop #53:ARR_47400 (PREDICTION) A151657 D151657
13:40:33.386 WARN (TimetableSnapshotSource.java:191) No pattern found for tripId
 ARR_9422853, skipping TripUpdate.
13:40:33.386 WARN (TimetableSnapshotSource.java:138) Failed to apply TripUpdateL
ist: tripId: ARR_9422853
Update trip ARR_9422853 Stop #1:ARR_23087 (PREDICTION) A153600 D153600
Update trip ARR_9422853 Stop #2:ARR_73880 (PREDICTION) A153783 D153783
Update trip ARR_9422853 Stop #3:ARR_125857 (PREDICTION) A153821 D153821
13:40:33.386 WARN (TripUpdateList.java:249) Update block matching failed complet
ely.
13:40:33.386 WARN (TripUpdateList.java:250) Have a look at the pattern and block
:
Stop 00 1010 A0 D



Jorden Verwer

unread,
Feb 25, 2014, 3:51:39 AM2/25/14
to opentrippl...@googlegroups.com
Thomas' feed won't work (correctly) on the master branch. You'll need to use the mmri-rt branch for multi-agency GTFS-RT support. You can then also remove the last line of your properties file.

Jorden

Daniel

unread,
Feb 25, 2014, 11:30:00 AM2/25/14
to opentrippl...@googlegroups.com
using the mmri/rt branch, I get the same error, also after removing the last line of the graph.properties file. Although it is interesting that some random trips contain some tripUpdate information in the OTP Web interface.
Is there any documentation about all the parameters that can be set in the graph.properties file?

11:20:43.554 WARN (TimetableSnapshotSource.java:196) No pattern found for tripId
 ARR_9520041, skipping TripUpdate.
11:20:43.554 WARN (TimetableSnapshotSource.java:170) Failed to apply TripUpdate:
trip {
  trip_id: "9520041"
  start_date: "20140225"
  schedule_relationship: SCHEDULED
  1003: "\n\016ARR:10176:1014"
}
stop_time_update {
  stop_sequence: 1
  arrival {
    delay: 0
    time: 1393344840
  }
  departure {
    delay: 45
    time: 1393344885
  }
  stop_id: "5201"
}
stop_time_update {
  stop_sequence: 5
  arrival {
    delay: 0
    time: 1393345980
  }
  stop_id: "4850"
  schedule_relationship: SCHEDULED
}
vehicle {
  id: "ARR:8381"
  label: "8381"
}
timestamp: 1393345187
11:20:43.570 WARN (TimetableSnapshotSource.java:196) No pattern found for tripId
 ARR_9420077, skipping TripUpdate.
11:20:43.570 WARN (TimetableSnapshotSource.java:170) Failed to apply TripUpdate:
trip {
  trip_id: "9420077"
  start_date: "20140225"
  schedule_relationship: SCHEDULED
  1003: "\n\020SYNTUS:902:10673"
}
stop_time_update {
  stop_sequence: 1
  departure {
    delay: 27
    time: 1393344387
  }
  stop_id: "140060"
}
stop_time_update {
  stop_sequence: 2
  arrival {

Jorden Verwer

unread,
Feb 25, 2014, 12:53:49 PM2/25/14
to opentrippl...@googlegroups.com
That error can also occur when the static GTFS feed gets out of sync with the GTFS-RT feed. If most other updates do get applied, the code is working correctly. You could try rebuilding the graph with the latest GTFS feed from OVapi, although that doesn't guarantee that the errors will go away. The feed isn't perfect yet.

Jorden

Thomas Koch

unread,
Feb 26, 2014, 7:29:21 AM2/26/14
to opentrippl...@googlegroups.com
That would mean in this case that the the particular GTFS filed was downloaded before the 18th of February.
The feed going out of sync is hard to counter with the way trip_id's are put up in GTFS. I have actually added the column realtime_trip_id in the GTFS-RT feed which matches with the realtime_trip_id column in trips.txt

Op dinsdag 25 februari 2014 18:53:49 UTC+1 schreef Jorden Verwer:
Message has been deleted

Daniel

unread,
Feb 27, 2014, 12:51:09 PM2/27/14
to opentrippl...@googlegroups.com
Thanks, that helped me a lot, because my feed was from Feb 12.

The next thing I want to try is to evaluate the impact of real-time information to routes in comparison with static information. For this, I set up a local Apache Web-Server that provides archived alerts and tripUpdates. The problem is that the RT information becomes obsolete very quick ("Ignoring feed with an old timestamp."). Even if I set the local clock back to the time the RT data was downloaded, this information still exists in the console. Is there any way to analyze archived data, e.g. converting the .pb-files into shp files with trip lines and time information or using OTP to plan a route with static GTFS information and the same route with RT information? Would that make sense?

Besides...is it true that initially not all tripUpdates will be loaded into OTP? Because in the console there is always the following information: "Applied ##### trip updates."

12:44:27.269 INFO (TimetableSnapshotSource.java:174) Applied 404000 trip updates.
12:44:27.296 INFO (TimetableSnapshotSource.java:174) Applied 406000 trip updates.
12:44:27.323 INFO (TimetableSnapshotSource.java:174) Applied 408000 trip updates.
12:44:27.349 INFO (TimetableSnapshotSource.java:174) Applied 410000 trip updates.
12:45:15.320 INFO (GtfsRealtimeAlertsUpdater.java:104) Ignoring feed with an old timestamp.
12:45:27.249 INFO (TimetableSnapshotSource.java:174) Applied 412000 trip updates.
12:45:27.284 INFO (TimetableSnapshotSource.java:174) Applied 414000 trip updates.
12:45:27.310 INFO (TimetableSnapshotSource.java:174) Applied 416000 trip updates.
12:45:27.337 INFO (TimetableSnapshotSource.java:174) Applied 418000 trip updates.
12:46:15.334 INFO (GtfsRealtimeAlertsUpdater.java:104) Ignoring feed with an old timestamp.
12:46:27.424 INFO (TimetableSnapshotSource.java:174) Applied 420000 trip updates.
12:46:27.468 INFO (TimetableSnapshotSource.java:174) Applied 422000 trip updates.
12:46:27.496 INFO (TimetableSnapshotSource.java:174) Applied 424000 trip updates.
12:46:27.524 INFO (TimetableSnapshotSource.java:174) Applied 426000 trip updates.
12:46:27.552 INFO (TimetableSnapshotSource.java:174) Applied 428000 trip updates

Jorden Verwer

unread,
Feb 28, 2014, 4:02:49 AM2/28/14
to opentrippl...@googlegroups.com

Hello Daniel,

If you just want to suppress the message saying an alerts update was ignored, you can simply remove that line from the source code.

> Besides...is it true that initially not all tripUpdates will be loaded into OTP? Because in the console there is always the following information: "Applied ##### trip updates."

I'm not sure what you mean here... The message you're referring to is printed for every 2000 trip updates applied. Updates won't be ignored silently, barring bugs and other unintentional modes of failure.

Regards,

Jorden

Daniel

unread,
Mar 3, 2014, 2:18:24 PM3/3/14
to opentrippl...@googlegroups.com
Hi Jorden,


> If you just want to suppress the message saying an alerts update was ignored, you can simply remove that line from the source code.

But what does it mean if I try to create a route with a departure timestamp of exactly that minute where I locally archived the alerts and tripUpdate file. If i start the OTP server instance using that local RT files, does OTP ignore the RT information from an older timestamp than now? Even if I set the local time of the server back to this timestamp?


For me, the message:


12:46:27.424 INFO (TimetableSnapshotSource.java:174) Applied 420000 trip updates.
12:46:27.468 INFO (TimetableSnapshotSource.java:174) Applied 422000 trip updates.
12:46:27.496 INFO (TimetableSnapshotSource.java:174) Applied 424000 trip updates.
12:46:27.524 INFO (TimetableSnapshotSource.java:174) Applied 426000 trip updates.
12:46:27.552 INFO (TimetableSnapshotSource.java:174) Applied 428000 trip updates

sounds like that every minute, altogether 8000 trip updates will be loaded into OTP to get 8000 additional RT information that will be considered during route calculation for different trips. So when I obtain archived trip updates from a local web server, I assume that not all trip updates will be initialised when starting the OTP server instance. But I think this assumption is wrong, isn't it?


Daniel

unread,
Jul 21, 2014, 6:26:25 AM7/21/14
to opentrippl...@googlegroups.com
Hi,

I have the following problem now: on 28 May I achieved some tripUpdates as well as the GTFS feed from NL. Using the feed, I created a graph, and additionally loaded the tripUpdate file into a local webserver. The URL of the webserver is defined in the graph.properties file. When I'm starting the OTP instance on a random port and plan a route, there is no realtime information available in the trip itinerary. Since I've stored the feed and the tripUpdate information in a database, I know which trips are affected of the tripUpdate, where I have to set my start and end points in the web interface for that particular trip, but the output of the trip times are the same like in the original stop_times.txt.
The console output says:

06:16:58.931 ERROR (TripTimes.java:393) Negative hop time in TripTimes at index 10.
06:16:58.931 ERROR (Timetable.java:576) TripTimes are non-increasing after applying GTFS-RT delay propagation.

06:16:58.932 WARN (TimetableSnapshotSource.java:170) Failed to apply TripUpdate:
trip {
  trip_id: "12308641"
  start_date: "20140528"
  schedule_relationship: SCHEDULED
  1003: "\n\tGVB:63:32"
}


and

06:18:57.676 WARN (TimetableSnapshotSource.java:196) No pattern found for tripId ARR_11492736, skipping TripUp
date.
06:18:57.676 WARN (TimetableSnapshotSource.java:170) Failed to apply TripUpdate:
trip {
  trip_id: "11492736"
  start_date: "20140528"
  schedule_relationship: SCHEDULED
  1003: "\n\017ARR:14372:31028"

I know that the second error occurs because the tripID is not available in trips.txt and that the first error is not supposed to have any effects on applying tripUpdates, but these errors are very numerous in the console output every minute...
So my general question is if my approach of applying archieved tripUpdates does work in general or are there any issues in OTP regarding past trip planning times?

Daniel

Jorden Verwer

unread,
Jul 22, 2014, 3:45:25 AM7/22/14
to opentrippl...@googlegroups.com
Updates that are more than one (service) day in the past will be thrown out. OTP is aimed at transit riders, not historians. ;)

Having said that, you could easily set back your computer's clock to cheat, just like in the shareware days... :P

Regards,

Jorden

Op maandag 21 juli 2014 12:26:25 UTC+2 schreef Daniel:

Daniel

unread,
Jul 22, 2014, 9:14:47 AM7/22/14
to opentrippl...@googlegroups.com
Ooh thank you so much for this hint Jorden!! I couldn't figure that out cause there was no error message about that, neither in the console nor in the web interface. Now it works! ;)

Ian Rees

unread,
Jul 22, 2014, 4:30:12 PM7/22/14
to Daniel, opentrippl...@googlegroups.com
OTP is very useful to historians. I am reconstructing GTFS feeds for
some historical and proposed-unrealized transit services. :)

Ian
> --
> 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.

Patrick Sunter

unread,
Jul 22, 2014, 7:40:23 PM7/22/14
to Ian Rees, Daniel, opentrippl...@googlegroups.com
On Wed, Jul 23, 2014 at 6:30 AM, Ian Rees <i...@ianrees.net> wrote:
OTP is very useful to historians. I am reconstructing GTFS feeds for
some historical and proposed-unrealized transit services. :)

Indeed.
Being able to compare quality of service when your agency rolls out a new timetable against previous ones and seeing how its evolved over time could be a nice thing to do to.

A quick note here that doing graph analyst comparisons between these different schedules could be interesting, the patched version of 0.10.x that I enabled this on is working fine so far:
https://github.com/opentripplanner/OpenTripPlanner/issues/703

i...@ianrees.net

unread,
Jul 22, 2014, 8:10:21 PM7/22/14
to Patrick Sunter, Daniel, opentrippl...@googlegroups.com
Yup. I am looking to use this feature in Analyst soon, to model the number of jobs, housing, etc., accessible from various points before and after proposed transit service improvements. Thank you for the good work on this powerful tool.

Ian

Andrew Byrd

unread,
Jul 24, 2014, 5:07:46 PM7/24/14
to opentrippl...@googlegroups.com
Historians... and planners. It's also useful to compare with service
that doesn't yet exist and hypothetical situations (which is one of
Conveyal's main interests). We're currently working on tools to perform
these analyses.

However, neither of these cases (at least as we're currently framing
them) requires real time updates, which is currently more targeted at
transit riders than analysts.

-Andrew
Reply all
Reply to author
Forward
0 new messages