Git Product home page Git Product logo

transitime / core Goto Github PK

View Code? Open in Web Editor NEW
60.0 60.0 75.0 39.6 MB

Transitime 0.1 (beta) is an open source project created and managed by Swiftly, Inc. to help transit agencies generate more accurate and reliable real-time arrival information for passengers. This version of the code is an early beta release and should not be used for production implementations. Please reach out to Swiftly at [email protected] for the most up-to-date software.

Home Page: https://goswift.ly/transitime

License: GNU General Public License v3.0

Java 94.49% CSS 0.48% JavaScript 3.46% HTML 0.94% Shell 0.20% PLSQL 0.44%

core's People

Contributors

edsfocci avatar jonnysimkin avatar kurtraschke avatar scrudden avatar skibu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core's Issues

pom.xml file contains RmiQuery.jar build

Hi,
The pom.xml file in transitime contains a reference to RmiQuery but this class is in transitimeAPI. So you get a class not found when you try to run RMIQuery.jar.
Cheers,
Sean.

First run of GTFSFileProcessor seems to require at least one agency already populated in database.

This is the stack trace produced when first run with empty agency table.

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:635)
at java.util.ArrayList.get(ArrayList.java:411)
at org.transitime.gtfs.DbConfig.getFirstAgency(DbConfig.java:705)
at org.transitime.applications.Core.(Core.java:130)
at org.transitime.applications.Core.createCore(Core.java:184)
at org.transitime.applications.Core.getInstance(Core.java:197)
at org.transitime.db.structs.Trip.getRoute(Trip.java:832)
at org.transitime.db.structs.Trip.getRouteName(Trip.java:848)
at org.transitime.db.structs.Trip.getRouteShortName(Trip.java:819)
at org.transitime.gtfs.ScheduleBasedTravelTimesProcessor.determineTravelTimesBasedOnSchedule(ScheduleBasedTravelTimesProcessor.java:270)
at org.transitime.gtfs.ScheduleBasedTravelTimesProcessor.processTrips(ScheduleBasedTravelTimesProcessor.java:474)
at org.transitime.gtfs.ScheduleBasedTravelTimesProcessor.process(ScheduleBasedTravelTimesProcessor.java:568)
at org.transitime.gtfs.GtfsData.processData(GtfsData.java:2344)
at org.transitime.applications.GtfsFileProcessor.process(GtfsFileProcessor.java:254)
at org.transitime.applications.GtfsFileProcessor.main(GtfsFileProcessor.java:604)

PredAccuracyPrediction says in comment directionId can be null as not always provided.

A null direction stops the handleArrivalDeparture method of PredictionAccuracyModule matching an arrivalDeparture event to a PredAccuracyPrediction in memory. The map key includes direction.

PredictionKey key = new PredictionKey(arrivalDeparture.getVehicleId(), 
                arrivalDeparture.getDirectionId(), arrivalDeparture.getStopId());
        List<PredAccuracyPrediction> predsList = predictionMap.get(key);

Not sure on the solution but for me I did this in the new GTFSRealtimePredictionAccuracyModule I am working on. This is similar to what is done in NextBusPredictionAccuracyModule.

String direction=null;

                         if(update.getTrip().hasDirectionId())
                                direction=""+update.getTrip().getDirectionId();

                            if (update.getTrip() != null) {
                                Trip trip = dbConfig.getTrip(update.getTrip().getTripId());
                                if (trip != null) {
                                    direction = trip.getDirectionId();
                                } else {
                                    logger.error("Got tripTag={} but no such trip in "
                                            + "the configuration.", update.getTrip().getTripId());
                                }
                            }

PredictionAccuracyModule fails to start

See log

core.log:15:03:46.734 INFO  thread=main [o.t.a.Core:404] Starting up optional module org.transitime.core.predAccuracy.PredictionAccuracyModule
core.log:15:03:46.756 ERROR thread=main [o.t.m.Module:120] Could not run module org.transitime.core.predAccuracy.PredictionAccuracyModule
core.log:java.lang.NoSuchMethodException: org.transitime.core.predAccuracy.PredictionAccuracyModule.<init>(java.lang.String)

Perhaps this constructor should be public instead of protected?

protected PredictionAccuracyModule(String agencyId)

Date format for reports does not work with default postgres datetype setting in Ireland.

Reports use dates in ISO, MDY format for the date fields. If you set up a postgres database it uses lc_time locale behaviours as the default which in Ireland expects ISO, DMY.

From the postgres docs

The built-in default is ISO, MDY, but initdb will initialize the configuration file with a setting that corresponds to the behavior of the chosen lc_time locale.

Error loading GTFS file

I'm testing Transitime for the transport system of Santiago of Chile.

I downloaded the latest version of Transitime, December 23, commit 464a055. But this aborts loading the GTFS file
(http://datos.gob.cl/dataset/8583ae05-d62f-42d7-a56d-4f865711b65a/resource/dc31a5c7-e717-4b9d-a9a6-93b4d4d2aaca/download/gtfsv17.zip).

The error says:

14:02:14.139 WARN - Modifying headsign "(M) La Cisterna" to "(M) La Cisterna to PG1583 - Parada / Est. Intermodal La Cisterna" since it has a different last stop. TripPattern H
erna" direction 1 from stop PF152 to stop PG1583. Other TripPattern Headsign "(M) La Cisterna" direction 1 from stop PF152 to stop PG1573
Exception in thread "main" java.lang.NullPointerException
at org.transitime.gtfs.GtfsData.makeHeadsignsUniqueIfDifferentLastStop(GtfsData.java:1501)
at org.transitime.gtfs.GtfsData.createTripsAndTripPatterns(GtfsData.java:1469)
at org.transitime.gtfs.GtfsData.processStopTimesData(GtfsData.java:1118)
at org.transitime.gtfs.GtfsData.processData(GtfsData.java:2537)
at org.transitime.applications.GtfsFileProcessor.process(GtfsFileProcessor.java:294)
at org.transitime.applications.GtfsFileProcessor.main(GtfsFileProcessor.java:642)

Assigned Vehicle percentage does not match figure when using SchedBasedPredsModule.

On the Active Blocks page, when calculating the assigned percentage schedules based vehicles (created by the SchedBasedPredsModule) are taken into account but the number of assigned vehicles does not include these.

I am not sure if the intention is to include them or not in the totals/percentage but I expect it should be consistent?

Edit of core README

"The goal is to use real-time GPS data to make useful public transportation information readily available for. "

The sentence is incomplete, it does not say say "for" who?

Log message should say max not min.

In TravelTimesProcessor.java on line 636 it has

                logger.error("For segmentIdx={} segment speed of {}m/s is "
                        + "above the limit of maxSegmentSpeedMps={}m/s. "
                        + "Therefore it is being reset to min segment speed. "
                        + "arrDep1={} arrDep2={}",
                        i, StringUtils.twoDigitFormat(segmentSpeedMps), 
                        maxSegmentSpeedMps.getValue(), arrDep1, arrDep2);

This should say max not min in the log message.

GtfsFileProcessor.java needs containsid in fare_rules.txt, should be optional

When trying to run GtfsFileProcessor.java, the program would terminate with an error when trying to read into the database the values in the column containsid from fare_rules.txt.

G07:47:30.912 WARN [o.h.e.j.s.SqlExceptionHelper:144] SQL Error: 0, SQLState: 23502
07:47:30.912 ERROR [o.h.e.j.s.SqlExceptionHelper:146] ERROR: null value in column "containsid" violates not-null constraint
Detail: Failing row contains (233, , a, , null, 1).
07:47:30.919 ERROR [o.t.g.DbWriter:204] Error writing GTFS configuration data to db.
org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
.
.
.

... 15 common frames omitted

07:47:30.920 ERROR [o.t.a.GtfsFileProcessor:644] could not execute statement

i temporally resolved the error by filling in numbers for the containsid.
but containsid is an optional data entry and shouldn't cause an error when empty

orginal file which caused error
fare_rules.txt

changed file that fixed error
fare_rules.txt

java.net.SocketException: factory already defined

while setting up the transitime test server we are facing such issue while calling RMI server for API call to fetch some data.
we believe apart from some minor bugs, the major part is configuration and setting properties for agency database and core database is challenge as structure of how application works is not clear. so please help us with the configuration and setting up properties file and connect with database and please give us idea of the architecture and application flow too.

Thank you.

showUnassignedVehicles not refreshing background of vehicles when they are assigned.

You can view unassigned vehicles using the showUnassignedVehicles=true parameter in the map URL.

ogcrudden.koding.io:8080/web/map/map.jsp?a=02&showUnassignedVehicles=true&r=DART

The vehicle background appears yellow when unassigned. When they become assigned the background remains yellow which I believe is incorrect.

I will fix this.

configRev is not accepted on command line of GtfsFileProcessor and not listed as option

When run for the first time on an empty database GTFSFileProcessor complains

" ActiveRevisions in database is not valid. The configuration revs must be set to proper values. ActiveRevisions [configRev=-1, travelTimesRev=-1]"

The configRev option needs to be added to the processCommandLineOptions method as if the database does not have any values in the ActiveRevisions table it could use the one from the command line.

I think that is what was intended.

ERROR: current transaction is aborted, commands ignored until end of transaction block

Whenever I get a database jdbc error/exception all subsequent calls to the database result in a

"ERROR: current transaction is aborted, commands ignored until end of transaction block"

For example I got an exception on writing a MonitoringEvent where the message length was greater than 512 characters, which then results in the above error when writing subsequent AVL reports to the database.

I think this is specific to Postgres.

AVL Map Report for each AVL source.

Hi Mike,

I have two sources of AVL so an ability to filter by source for an AVL Map Report would be very useful. I have done something locally to just show the AVL source when all are displayed on the map.

Will I extend this so you can have an AVL Map Report for each individual AVL source, and send on a pull request?

Cheers,

Sean.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.