GithubHelp home page GithubHelp logo

thetransitclock / transitime Goto Github PK

View Code? Open in Web Editor NEW

This project forked from transitime/core

78.0 14.0 30.0 155.25 MB

TheTransitClock real-time transit information system

License: GNU General Public License v3.0

Java 92.16% Shell 0.15% CSS 0.58% JavaScript 5.59% HTML 1.52%
transit realtime gtfs gtfs-realtime avl predictions

transitime's Introduction

core Build Status

The complete core Java software for the Transitime real-time transit information project. The goal is to use any type of real-time GPS data to generate useful public transportation information. The system is for both letting passengers know the status of their vehicles and helping agencies more effectively manage their systems. By providing a complete open-source system, agencies can have a cost effective system and have full ownership of it.

Build

The software is made up of three modules which can each be built with maven. See BUILD.md

The core functionality is in the transitime project. The REST api is in transitimeApi and the user Web applicaton is in transitimeWebapp.

Setup

The main module is transitTime. This has several standalone programs in the org.transitime.applications package.

SchemaGenerator.java will generate the SQL to create the database structures you need to run on.
DBTest.java can be used to test that the database can be connected to.
GTFSFileProcessor.java will read a GTFS file into this database structure.
Core.java is as the name implies is the workhorse of the system.
RmiQuery.java allows you make queries to the server run in core from the command line.
CreateAPIKey.java a test app to allow you create test/demo key to access REST api webapp.
CreateWebAgency.java is used to create and agency that will work in transitimeWebapp.

Details on how to run each of these and their respective parameters are in the README for the transitime module.

Once this is set up the next step is to set up the transitimeApi which is a RESTful API. This API makes RMI calls to the RMI Server started by Core.java to provide results. This is a war file which can be deployed into Tomcat.

The transitimeWebapp in turn is a web application which uses the transitTimeAPI to provided a user interface. This is a war file which can be deployed into Tomcat. This connects to the database and the connection information is configured in hibernate.cfg.xml in the src/main/resources directory. Currently this needs to be deployed on the same server as the API.

The transitimeQuickStart can be built with mvn install and ran using java -jar transitimeQuickStart it is currently a work in progress but the gui elements can be seen.

Build Status

transitime's People

Contributors

bodominea avatar carabalb avatar changtung avatar edsfocci avatar egan109 avatar gelinger777 avatar hubertgoeuropa avatar kurtraschke avatar nselikoff avatar scrudden avatar sdjacobs avatar sheldonabrown avatar simonberrebi avatar skibu avatar vsperez avatar wkulesza 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  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

transitime's Issues

Add front end for resetVehicle api call.

resetVehicle is an API call added during the implementation of DynamicTime for when we would see that a vehicle was assigned to the wrong segment. The most noticeable symptom was the arrow for direction would be pointing in the wrong direction.

A call to this makes the vehicle unpredictable and the system will then reassign correctly.

This call takes a single parameter "v" which is the vehicle id.

Active blocks and vehicle assignments for stops with different arrival and departure times

I'm working with a GTFS static feed whose first two stops are at train stations where the vehicle waits for ~15 minutes before departing. One of these stops is the first stop of the trip. Also, it's a continuous loop (same block ID throughout the day, first and last stops are the same, and departure_time of the last stop == arrival_time of the first stop of the subsequent trip.

For real-time, I'm working with raw GPS data without trip assignments.

I'm running into two issues, which may just be a matter of configuration:

  1. No active blocks are detected until the departure_time from the first stop of the trip. E.g. if the first stopTime arrival_time is 12:00:00, and departure_time is 12:15:00, there are no active blocks until 12:15:00. This is one root cause for the vehicle remaining unassigned / unpredictable. Shortly after the vehicle departs the station, as long as it's after 12:15:00, it gets assigned to the trip.
  2. At the second stop, the vehicle waits for 10 minutes (between arrival_time and departure_time). Here it gets unassigned, I think because transitclock.autoBlockAssigner.minDistanceFromCurrentReport is set to its default value.

Can you provide any insight on the best configuration for this scenario?

Unexpected match ( prediction )

On basic data, i have prediction for device id 5089.
On map it stops and gps data is always same latitude and longtitude. Transitime guesses prediction of this device and assign it a route. Below are logs where it take place.

10:35:01.082 Calling prediction algorithm for AvlReport [vehicleId=5089, time=01-15-2018 11:34:48.000 CET, timeProcessed=01-15-2018 11:35:01.082 CET, location=[52.22040, 17.05890], speed=NaN, heading=0.0 deg, source=5089, assignmentId=null, assignmentType=UNSET] with a match TemporalMatch [temporalDifference=-64.8 min (late), avlTime=01-15-2018 11:34:48.000 CET, blockId=2A, tripIndex=5, gtfsStopSeq=1, stopPathIndex=0, segmentIndex=0, isLayover=true, distanceToSegment=10537.91m, distanceAlongSegment=0.00m, distanceAlongStopPath=0.00m, atStop=Indices [blockId=2A, tripIndex=5, stopPathIndex=0, stopId=54], trip=Trip [tripId=560_tam_12345__10:30, tripShortName=560_tam_12345__10:30, tripPatternId=shape_560__35_54_to_STOP_9a868fa_d75f345d, tripIndexInBlock=5, startTime=10:30:00, endTime=11:27:00, headsign="Poznań - Rataje Dworzec", directionId=0, routeId=560, routeShortName=560, serviceId=R12345, blockId=2A, shapeId=560__35]].
10:35:01.082 For vehicleId=5089 the original arrival time for waitStop stopId=54 is 01-15-2018 11:34:48.000 CET
10:35:01.082 For vehicleId=5089 adjusted the arrival time for layover stopId=54 tripId=560_tam_12345__10:30 blockId=2A since crowFliesTimeToLayover=1203790 but predictionTime-avlReport.getTime()=0msec. The arrival time is now 01-15-2018 11:54:51.790 CET
10:35:01.082 For vehicleId=5089 adjusted departure time for wait stop stopId=54 tripId=560_tam_12345__10:30 blockId=2A to expectedDepartureTimeWithStopWaitTime=01-15-2018 11:54:51.790 CET because arrivalTime=01-15-2018 11:54:51.790 CET but scheduledDepartureTime=01-15-2018 10:30:00.000 CET and expectedStopTimeMsec=0
10:35:01.082 Generated prediction IpcPrediction [vehicleId=5089, predTime=01-15-2018 11:54:51 CET, routeId=560, rteName=560, stop=54, gtfsStopSeq=1, tripId=560_tam_12345__10:30, freqStartTime=00:59:59.999, tripPatternId=shape_560__35_54_to_STOP_9a868fa_d75f345d, blockId=2A, avlTime=11:34:48.000, createTime=11:35:01.082, tripStartEpochTime=10:30:00.000, atEndOfTrip=f, waitStop=t, arrival=f] based on avlreport AvlReport [vehicleId=5089, time=01-15-2018 11:34:48.000 CET, timeProcessed=01-15-2018 11:35:01.082 CET, location=[52.22040, 17.05890], speed=NaN, heading=0.0 deg, source=5089, assignmentId=null, assignmentType=UNSET].

It is written "because of schedule time". Or how to interact with this value, prediction.

Schedule adherence reports not showing

The following options are not appearing on the report screen on the develop branch.

Schedule Adherence by Route
Schedule Adherence by Stop
Schedule Adherence by how Early/Late

features to implement

Hello, I wanted to describe proposition of a features that could be implemented.

  1. In SheduleAdherenceByStop, there is a chart with late, early and on time vehicles. What if after clicking late vehicle, user could see vehicle id. I mean specific vehicle which drives and is late.
  2. In Schedule adherence map, there may be a box, label or small space, which presents vehicles with possible sorting by time early, late.
    From which branch currently is the best to fork, to implement these features?

Best Regards,
Grzegorz

Create github pages project site

In the old parent repo of transitime, the github pages site was set up to include the javadocs. This repo still has a gh-pages branch set up: https://github.com/TheTransitClock/transitime/tree/gh-pages

It would be great to set up a project site for this repo, and link to it from the main github pages site for TheTransitClock org. Ideally we can also set up something to automate updating the documentation based on commits to the repo.

Remove eclipse files

It is intended only to have maven build files. Eclipse files should not be checked in.

couple new reports.

Hello i have question regarding transitime
the VIA branch has many classes modified in comparision to master transitime branch. Hence we were using master recently, we had scheduleAdherenceByStop report there. Currently in VIA branch, we want to have these reports too.
I tried to add some modules to config from previous app and i don't know where these reports reside. if that is plugin or what would be worse, it is in code directly, not encapsulated.
May i hear Your word about this?

EDIT: It seems that these reports are created by our programmers and copying jsp files should resolve this. Logic is also in jsp ( sql queries ). In this situation, my question is, how we can provide these views ( to which branch ) to the public?

Set version numbers in maven pom files.

Will start at version 2.0.0-SNAPSHOT for the rebrand from transiTime to TheTransitClock.

This new version will be started on the "develop" branch.

Would be nice to use maven to update numbers for new versions.

[new feature] lcd/led panel for driver that indicates early/late and other info

We at goEuropa are looking into creating a small panel (to be placed in the vehicle dashboard) that would provide bus driver with crucial information on how late/early he/she is on the current trip along with other information (i.e. route number, trip headsign, block id, upcoming stops etc).

Did anyone look into such features before ?

How to capture an AVL sample and use it for testing and batch processing?

When setting up TheTransitClock for a new agency, there's so many options when it comes to configuration. And since we're dealing with real-time data it can be hard to tweak the config and see the effects efficiently.

What's the best way to capture an AVL sample (e.g. from a GTFS Realtime vehicle positions feed) and then using it for testing and batch processing in TheTransitClock? I see some areas in the codebase that seem to support this, and I'd love to be able to replay a set of data to test out different changes quickly.

Problem with translating sch*Chart.jsp

In files patterned sch*Chart i have problem translating these three or four files.
There is mixed jsp and javascript in these files for cuple variables.
For example in schAdhByRouteChart in line 55 there is:

String chartSubtitle = allowableEarly + " min early to "
+ allowableLate + " min late
"

I want to translate string "min early to" to fmt.
I made c:set wrapped with this a fmt message. I tried using jsp in javascript but don't have idea how to translate this string.
Normally i am using

<fmt:message key="div.minutes" />

formatting.
I tried

<c:set var="a"><fmt:message key="div.minutes" /></c:set/>

But jsp compiler writes that variable is not defined.
I am thinking also of creating different jsp project just for testing this issue in order to not compile for 10 minutes entire transitime to see the results.
How can i pass fmt message to that variable?

SheduleAdherenceByMap enhancement

In Schedule adherence map, there may be a box, label or small space, which presents vehicles with possible sorting by time early, late.

I would see that placed in a sidebar on the right hand side of the screen. Filtering and sorting features would assist dispachter in checking in real-time the situation and reacting straight away.

Clarifications about TripUpdate

Is tripUpdates showing trip_update.stop_time_update.arrival.time from the schedule if schedule_relationship == "SCHEDULED" or prediction is based on scheduled and VehiclePositions?

Found trip_update.delay, should I manually calculate trip_update.stop_time_update.arrival.time + trip_update.delay or is it already there?

Translation two languages into config files or translate adhoc in branch

I am up to translate latest reports to polish. I can do this by translating just reports folder and create another branch with polish translation. In the other hand how do You think about creating yml or something files and push all texts strings into and create polish/english version in config file? Would be that useful to transitime ?Then You can add other languages translation into yml files. I want to do this in couple next days, so any feedback will be useful.

Work as a tester

Hi!
I will eagarly do a job as a tester in a project transitime.
Regards

Shutting down instances running on Open Austin AWS

Hi @scrudden,

Our hosting with CfA is being audited and we found that our biggest charges are coming from old transitime instances that @luqmaan helped set up.

We need to shut down these instances but I didn't want to catch you off guard. Tried msg'ing you through Slack so hoping this reaches you.

pasted image at 2017_04_15 06_18 pm

expectedTravelTimeMsec in TemporalMatcher is zero (0)

I'm getting some unexpected matching results, and I think I've traced it back to expectedTravelTimeMsec being 0. Can you tell me about this block of code (l398 - 412)?

int expectedTravelTimeMsecForward =
TravelTimes.getInstance().expectedTravelTimeBetweenMatches(
vehicleState.getVehicleId(),
previousAvlTime,
previousMatch, spatialMatch);
int expectedTravelTimeMsecBackward =
TravelTimes.getInstance().expectedTravelTimeBetweenMatches(
vehicleState.getVehicleId(),
previousAvlTime,
spatialMatch, previousMatch);
int expectedTravelTimeMsec = Math.min(expectedTravelTimeMsecForward, expectedTravelTimeMsecBackward);
//expectedTravelTimeMsec = expectedTravelTimeMsecForward;

What's the goal with searching forward and backward? expectedTravelTimeMsecBackward is evaluating to 0, which means expectedTravelTimeMsec gets set to 0 for multiple matches, so when the current match is compared to the previous match, it's always considered better.

transitimeDocker postgresql version

In transitimeDocker, latest version of postgresql is not working when running go.sh.
In go.sh there is command docker run --name transitime-db -e POSTGRES_PASSWORD=$PGPASSWORD -d postgres
i needed to change it to:
docker run --name transitime-db -e POSTGRES_PASSWORD=$PGPASSWORD -d postgres:9.6.3

It is because new version of postgres is 10.x and it turns out that it's not compatible with current transitimeDocker.

GTFS Realtime trip-update correction

  • stop_time_update entries should be sorted by sequence
  • stop_time_update entries should specify relationship SCHEDULE when arrival_time or departure_time is specified

Problem with tomcat connecting to postgresql ?

Hi, I have problem with transitime instance. one works on port 8097, which has code from same branch, use different databases. tomcat version is same. recently i created new database. i have error, connection attempt failed on transitime web . is it possible that jar is connecting succesfully to postgres ,tomcat no and i can connect locally through 127.0.0.1 ( not localhost ) .
So one instance on port 8096 doesnt connect tomcat, second version does connect.
tomcat versions - same
code from repository - same
transitime modules added - same

Change transitime package names to transitclock

As part of the re-brand change the package name from org,transitime to org.transitclock.

This will have knock on changes to the config file/variable names and also to the web application.

Integrate barefoot

Integrate barefoot to do map matching of avl reports.

This will snap AVL reports to transit routes as defined in the shapes.txt file in the GTFS.

There are a number of steps required to achieve this.

  1. Create a barefoot map based on the GTFS shapes.txt file.
  2. Set up a barefoot tracker server using the map produced.
  3. Have transiTime core provide AVL updates to the barefoot tracker server.
  4. Have transiTime core ask the barefoot tracker server for the adjusted location of the vehicle.

SheduleAdherenceByStop enhancement

In SheduleAdherenceByStop, there is a chart with late, early and on time vehicles. What if after clicking late vehicle, user could see vehicle id. I mean specific vehicle which drives and is late.

User would click on that bar and see which trip was affected by late/early arrival/departure time. Dispatcher than can see not only which driver was late but also which trip it was or which trips (if there were several records).

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.