Skip to content

dariaphoebe/tripover

Repository files navigation

tripover - Broad-search journey planner for timetable-based transport

An attempt to build a journey planner good at broad searches. Like "from Cairns to Perth, depart any day next week". Aiming at the longer distance traveller searching for good trip options.

Description

Plan a trip using schedule-based transport such as train, plane, bus or ferry. Both advance-bookable and regular. Results are to be selected on a handful of criteria, like price, travel time, number of stops or stopover time.

The planner typically runs on a server, accessed by local and web clients.

Goals

  • flexible dates with broad departure and return date ranges

  • include nearby airports or stations

  • consider price, time, conditions or a combination

  • real-time updates, like planned changes, disruptions and fare availability

Non-goals

  • booking+ticketing

    only up-to-date fare availability

  • roads, door-to-door

    consider only the scheduled trip

  • lightweigt edition

    aim at higher system requirements

Status

Alpha - initial testing on larger networks

  • GTFS reader and external readable network file format

  • Handle timezone boundaries

  • Combine multiple datasets

  • Static connectivity matrix aka graph builing

  • local commandline client / server interface

  • CGI / web interface

  • time and route search - promising results and query times. Some results need work

  • inital provision for handling of reserved transport

Demo

At the time of this writing, a demo site is set up for the largest parts of Australia.

It contains all trains, bus and ferries of Cairns, Brisbane, Sydney, Canberra, Adelaide and Perth. Melbourne does not provide data yet. I have added an excerpt from regional interstate trains, most run only once or twice weekly.

Note that the low frequency of these cross-country train service imposes challenges to the search algorithm. You may have to set flexible days up to a week or navigate to an appropriate start day.

Installation

Below is a short version of how to install and run : see the wiki for more complete doc.

You can compile, install and run the program in any directory. The chosen dir is henceforth referred to by project root. In the examples below, this project root is shown as current dir ./.

Prerequisites

Most unix-like systems like Linux and Mac OS X are suitable, as Tripover only uses C99 and Posix features. A 64-bits system is recommended given the size of typical data sets.

Further you need Perl 5.12 or higher

You need a relatively modern C99 compiler, for example clang ( = Xcode ), gcc or icc. Tripover uses C11 language features conditionally.

Configure compilers

./emka config

Based on installed compilers, you are offered a selection. Predefined options for a few common compilers are generated and written to ./config

Review build options

edit ./config if needed. This is the output of the compiler selection above and contains the default build options.

edit ./cfg.h if needed. This file contains compile-time constants that you may want to revise.

Build server and tools

./emka

This will compile and link the server tripover

Build client

Currently, the local commandline client does not need a build step.

Usage

GTFS feed

Prepare a GTFS feed by unpacking into any directory. Below southeast Queensland is used as example:

mkdir -p au/qld/seq/in && cd au/qld/seq/in

unzip SEQ

cd ../../../..

Convert into tripover external format

gtfsprep au/qld/seq/in

gtfstool import au/qld/seq au/qld/seq/in

Check for any errors or warnings in the output. The console output is duplicated in gtfstool.log

Initialise configuration

./tripover init

You can review the settings in tripover.cfg

Run tripover server with this network:

./tripover au/qld/seq

This will initialise and precompute the network. For 7000-stops Queensland with 1-transfer limit it takes a handful of minutes. When done, a commandloop is entered, processing plan queries from a client. If invoked with the -b option, the server runs in the background, detached from the terminal. You can inspect the logfile in the same dir as the loaded network.

Invoke the commandline client :

./plantrip plan nambour bunya

Currently, tripover calculates a single possible trip, preferring shorter overall travel time. You can use a set of search criteria to further steer your search. See the wiki for details.

No cost yet.

Configuration

By default tripover reads its runtine configuration from tripover.cfg

After tripover has been run, the configuration in effect is written to tripover.curcfg

You can use the latter as a starting point for the former. It shows all defaults, as well as a short description.

Issues

At the time of this writing, Tripover is in a pre-alpha stage of development. Results are promising, search times are good and most search criteria are honoured. Yet not all results are as expected, and you will likely hit issues when trying new data.

  • The commandline tools can be pretty verbose and disabling does not work properly.

  • Larger networks that require partitioning can give surprising results.

  • No Daylight savings time handling.

Author

Joris van der Geer

Contributing

License

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Last changed 4 jan 2015

About

Broad-search public transport journey planner

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages