Skip to content

Conversation

@scrudden
Copy link
Member

@scrudden scrudden commented Sep 7, 2018

#80
This is a first draft of Kalman (for travel times) and RLS(for dwell times) for frequency based services.

@scrudden
Copy link
Member Author

Problem with historical average as it is failing to calculate duration. This is likely to do with new cache implementations. It is reverting to the "last vehicle" method of generating a prediction.

17:29:55.680 Cannot add to FrequencyBasedHistoricalAverageCache as cannot calculate stopDuration or pathDuration. : Arrival   [vehicleId=1120, time=09-10-2018 11:29:54.064 EST, route=C, rteName=C, directionId=null, stop=119, gtfsStopSeq=4, stopIdx=3, freqStartTime=Mon Sep 10 12:26:24 EDT 2018, stopOrder=-1, avlTime=11:29:55.658 EST, trip=5, tripIdx=0, block=5, srv=Mo, cfg=0, pathLnth=422.90m]

@scrudden
Copy link
Member Author

Reloading cache from database on startup, for freq based services, not working.

@scrudden
Copy link
Member Author

scrudden commented Sep 29, 2018

The prediction accuracy module is not working for frequency based services.

This seems to relate to the original GTFS I used for Bullrunner not having a direction for a trip.

@scrudden
Copy link
Member Author

scrudden commented Oct 1, 2018

Values in bold below should be the same.

14:53:55.813 Kalman has last vehicle info for : Indices [blockId=5, tripId=5, tripIndex=0, stopPathIndex=13, segmentIndex=0] : TravelTimeDetails [departure=Departure [vehicleId=1121, time=10-01-2018 08:41:17.356 EST, route=C, rteName=C, directionId=null, stop=116, gtfsStopSeq=13, stopIdx=12, freqStartTime=Mon Oct 01 10:19:59 EDT 2018, stopOrder=-1, avlTime=08:41:46.000 EST, trip=5, tripIdx=0, block=5, srv=Mo, cfg=0, pathLnth=413.23m], arrival=Arrival [vehicleId=1121, time=10-01-2018 08:41:57.081 EST, route=C, rteName=C, directionId=null, stop=426, gtfsStopSeq=14, stopIdx=13, freqStartTime=Mon Oct 01 10:19:59 EDT 2018, stopOrder=-1, avlTime=08:42:09.000 EST, trip=5, tripIdx=0, block=5, srv=Mo, cfg=0, pathLnth=282.94m], getTravelTime()=39725, sanityCheck()=true]

14:53:55.813 Kalman has 3 historical values for : Indices [blockId=5, tripId=5, tripIndex=0, stopPathIndex=13, segmentIndex=0]

14:53:55.813 Generating Kalman prediction for : Indices [blockId=5, tripId=5, tripIndex=0, stopPathIndex=13, segmentIndex=0]

14:53:55.813 Kalman is using historical value : TravelTimeDetails [
departure=Departure [vehicleId=1119, time=09-27-2018 07:46:16.353 EST, route=C, rteName=C, directionId=null, stop=116, gtfsStopSeq=13, stopIdx=12, freqStartTime=Thu Sep 27 09:08:54 EDT 2018, stopOrder=-1, avlTime=07:46:36.000 EST, trip=5, tripIdx=0, block=5, srv=Mo, cfg=0, pathLnth=413.23m],
arrival=Arrival [vehicleId=1120, time=09-27-2018 08:02:41.989 EST, route=C, rteName=C, directionId=null, stop=426, gtfsStopSeq=14, stopIdx=13, freqStartTime=Thu Sep 27 09:19:47 EDT 2018, stopOrder=-1, avlTime=08:03:06.000 EST, trip=5, tripIdx=0, block=5, srv=Mo, cfg=0, pathLnth=282.94m], getTravelTime()=985636, sanityCheck()=true] for : Indices [blockId=5, tripId=5, tripIndex=0, stopPathIndex=13, segmentIndex=0]

14:53:55.813 Kalman is using historical value : TravelTimeDetails [
departure=Departure [vehicleId=1120, time=09-26-2018 08:32:12.174 EST, route=C, rteName=C, directionId=null, stop=116, gtfsStopSeq=13, stopIdx=12, freqStartTime=Wed Sep 26 09:52:05 EDT 2018, stopOrder=-1, avlTime=08:32:24.000 EST, trip=5, tripIdx=0, block=5, srv=Mo, cfg=0, pathLnth=413.23m],
arrival=Arrival [vehicleId=1120, time=09-26-2018 08:33:46.719 EST, route=C, rteName=C, directionId=null, stop=426, gtfsStopSeq=14, stopIdx=13, freqStartTime=Wed Sep 26 09:52:05 EDT 2018, stopOrder=-1, avlTime=08:34:06.000 EST, trip=5, tripIdx=0, block=5, srv=Mo, cfg=0, pathLnth=282.94m], getTravelTime()=94545, sanityCheck()=true] for : Indices [blockId=5, tripId=5, tripIndex=0, stopPathIndex=13, segmentIndex=0]

14:53:55.813 Kalman is using historical value : TravelTimeDetails [
departure=Departure [vehicleId=1120, time=09-24-2018 08:24:13.489 EST, route=C, rteName=C, directionId=null, stop=116, gtfsStopSeq=13, stopIdx=12, freqStartTime=2018-09-24 09:42:16.247, stopOrder=-1, avlTime=08:24:28.000 EST, trip=5, tripIdx=0, block=5, srv=Mo, cfg=0, pathLnth=413.23m],
arrival=Arrival [vehicleId=1120, time=09-24-2018 08:25:07.898 EST, route=C, rteName=C, directionId=null, stop=426, gtfsStopSeq=14, stopIdx=13, freqStartTime=2018-09-24 09:42:16.247, stopOrder=-1, avlTime=08:25:01.000 EST, trip=5, tripIdx=0, block=5, srv=Mo, cfg=0, pathLnth=282.94m], getTravelTime()=54409, sanityCheck()=true] for : Indices [blockId=5, tripId=5, tripIndex=0, stopPathIndex=13, segmentIndex=0]

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

Successfully merging this pull request may close these issues.

2 participants