| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Implementation of the Connection Scan Algorithm in TypeScript.
Additional features not in the paper implementation:
It will work with any well formed GTFS data set.
Node +11 is required for all examples.
npm install --save connection-scan-algorithm
Find the first results that depart after a specific time
const {GtfsLoader, JourneyFactory, ConnectionScanAlgorithm, ScanResultsFactory, TimeParser, MultipleCriteriaFilter, DepartAfterQuery} = require("connection-scan-algorithm");
const gtfsLoader = new GtfsLoader(new TimeParser());
const gtfs = await gtfsLoader.load(fs.createReadStream("gtfs.zip"));
const csa = new ConnectionScanAlgorithm(gtfs.connections, gtfs.transfers, new ScanResultsFactory(gtfs.interchange));
const query = new DepartAfterQuery(csa, new JourneyFactory(), [new MultipleCriteriaFilter()]);
const results = query.plan(["TBW"], ["NRW"], new Date(), 9 * 3600);Issues and PRs are very welcome. To get the project set up run:
git clone git@github.com:planarnetwork/connection-scan-algorithm npm install --dev npm test
If you would like to send a pull request please write your contribution in TypeScript and if possible, add a test.
This software is licensed under GNU GPLv3.
| Back | FazBrowse Home | New Git URL |