Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
/ practical-csa Public archive

Experimental implementation of the Connection Scan Algorithm

License

Notifications You must be signed in to change notification settings

dbsystel/practical-csa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Practical Connection Scan Algorithm Implementation

💡 This repository is no longer actively maintained by DB Systel GmbH. It was created as part of a bachelor thesis. If you are interested in continuing the effort, please feel free to contact us.

This is a high level implementation of the Connection Scan Algorithm. Modifications are made to fit special requirements for timetable information systems at Deutsche Bahn. Goal of this implementation is to find out about difficulties when applying the algorithm to real world problems and requirements and to provide a publicly available working example.

About the algorithm

The algorithm was introduced in 2013 by Julian Dibbelt, Thomas Pajor, Ben Strasser, and Dorothea Wagner.

About the project

My bachelor thesis studies the relevance and applicability of the algorithm for Deutsche Bahn. This repository contains code that was created for the thesis.

Features of the multi criteria implementation

Pareto optimal result set with criteria depature time, arrival time and number of changes. Apart from that the implementation supports footpaths, minimum change times and trip specific change times which are all read in from the transfers.txt

Getting started

To run this project you will need:

Programm Version
Scala > 2.11
JDK > 8
SBT > 0.13

Clone or download the files from Github.

Get the inofficial Fernverkehr GTFS Feed. For now this is hardcoded to the fields provided in this feed. If you want to use your own GTFS feed take a look into gtfs.readers and make sure the parameters are matched correctly to the case class fields of the type.

You can also use the debug data from data/debug. You will need node.js to execute the script and generate the GTFS data:

cd data/debug/
npm install
node script.js source.js

Use you command line to execute the following commands in the project's folder:

sbt compile
sbt run

Enter the location of the extracted GTFS feed on you file system. This will load the data and start a HTTP REST Endpoint on http://localhost:8080.

Query connections with:

# basic csa
get http://localhost:8080/query/{from}/{to}

# multi criteria
get http://localhost:8080/mc/{from}/{to}

With from and to being the integer stop IDs of your GTFS feed.

License

Licensed under Apache 2.0 Copyright 2016-2016 DB Systel GmbH

About

Experimental implementation of the Connection Scan Algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published