CUTR-at-USF / ontime-performance-calculator

An application to calculate on-time performance using archived GTFS-realtime data
Other
4 stars 2 forks source link
gtfs gtfs-realtime-data performing-calculations relational-databases schedule-deviation sql-server-database

ontime-performance-calculator Build Status

An application to calculate on-time performance using GTFS-realtime data that has been archived using the gtfsrdb tool.

For more about what this tool does, please see the chapter "Producing On-time Performance from GTFS-realtime Data" in this final report.

Prerequisites

The On-time Performance Calculator is written in Java. Maven is the build management tool for this project.

Following are the requirements to get the project up and running:

Note that you can also use an integrated development environment (IDE) such as Netbeans or IntelliJ to build the project, which usually includes integrated support for Maven and Git.

You'll also need data:

The following instructions are for building the project from the command line using Maven.

1. Download the code

The source files are needed in order to build the jar file. You can obtain them by downloading the files directly or by cloning the Git repository (recommended).

2. Build the project

From the command-line:

mvn install

3. Run the application

The above step will generate an executable file in the target/ directory with all the dependencies needed to run the application.

Before running the application, create an info.txt file in project's src/main/resources folder. This file should contain information needed to connect to Microsoft SQL Server database:

Finally, to run the application execute a command in the format:

java -jar target/ontime-performance-calculator.jar <path/to/GTFS_file.zip> <arrival_time OR departure_time> [number of records to fetch]

Example command:

java -jar target/ontime-performance-calculator.jar gtfs.zip arrival_time

The above command assumes that the gtfs.zip file is in the same directory you're executing the java command from.

Note that this project is currently configured to connect to a SQL Server database, but other relational databases are also supported.