TheTransitClock / transitime

TheTransitClock real-time transit information system
GNU General Public License v3.0
79 stars 30 forks source link

predictions not available for all stops en-route of a longer trip #248

Closed wkulesza closed 2 years ago

wkulesza commented 2 years ago

Expected functionality When a trip is assigned and prediction is available - predictions should be available for all stops en-route of that trip

Describe the bug At a given time, trip has predictions up to a given stop and following stops have no predictions. As the bus is travelling, this seems to update itself gradually.

To Reproduce Use a GTFS with trips that are long - like 2 hours, run a standard setting TC docker with autoassigner on and either gtfs-rt vehicle positions or traccar-avl source.

Screenshots Predictions available for one stop: obraz

Predictions for next stop are not available: obraz

Predictions for that next stop become available after some time: obraz

Version: Newest TC docker.

Configuration: Standard

Additional context Add any other context about the problem here.

scrudden commented 2 years ago

You can set how far forward into the future you wish to generate predictions.

https://github.com/TheTransitClock/transitime/blob/f32ad8dc40e683ee7c945388c74de504f63ee607/transitclock/src/main/java/org/transitclock/core/PredictionGeneratorDefaultImpl.java#L76-L80

wkulesza commented 2 years ago

I tried adding this to import_gtfs.sh:

java -Xmx4g -Dtransitclock.core.agencyId=$AGENCYID -Dtransitclock.configFiles=/usr/local/transitclock/config/transitclock.properties -Dtransitclock.logging.dir=/usr/local/transitclock/logs/ -Dlogback.configurationFile=$TRANSITCLOCK_CORE/transitclock/src/main/resouces/logbackGtfs.xml -cp /usr/local/transitclock/Core.jar org.transitclock.applications.GtfsFileProcessor -gtfsUrl $GTFS_URL  -maxTravelTimeSegmentLength 100  -maxPredictionsTimeSecs 7200

but got:

Unrecognized option: -maxPredictionsTimeSecs
scrudden commented 2 years ago

This property is used by core rather than by the GTFS file processor. I would normally add this to the property file like

transitclock.core.maxPredictionsTimeSecs=7200
wkulesza commented 2 years ago

ok it helps - actually it reads already: transitclock.core.maxPredictionTimeForDbSecs=1200 transitclock.core.maxPredictionsTimeSecs=1800

so i changed 1800 to 7200 and finally can see predictions to 60 minutes.

scrudden commented 2 years ago

@wkulesza Can this be closed?

wkulesza commented 2 years ago

yes, lets close. good to add that to readme in tc github

pon., 22 lis 2021 o 16:13 Sean Óg Crudden @.***> napisał(a):

@wkulesza https://github.com/wkulesza Can this be closed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TheTransitClock/transitime/issues/248#issuecomment-975627764, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHXUGAECPL7IFOZ3LKDDVDUNJMZ3ANCNFSM5IBRITOA .

-- Wojciech Kulesza

Właściciel / Owner

goEuropa Polska Wojciech Kulesza +48616248682 @.*** www.goeuropa.eu ul. 28 Czerwca 1956r nr 400 Kiedy przyjedzie autobus? Sprawdż na www.kiedybus.pl https://www.kiedybus.pl/