Skip to content

[work in progress] – Compute journeys based on the VBB GTFS data.

License

Notifications You must be signed in to change notification settings

derhuerst/vbb-routing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vbb-routing

Compute journeys based on the VBB GTFS data.

npm version build status ISC-licensed chat with me on Gitter support me on Patreon

Installing

npm install vbb-routing

Usage

todo

Segment model

Starting to walk the graph, our first segment looks like this:

const first = {
	// edge info
	where: 'center', // arrival node
	when: 1554307600, // start time
	route: null, // we just started, so no route ID
	duration: 0, // we just started, so edge duration

	// current state
	transfers: 0,
	blacklist: ['center'], // node we don't want to visit again
	previousSegment: null
}

A follow-up segment (the result of a single edge in the graph) may then look like this:

const second = {
	// edge info
	where: 'lake',
	when: 1554308040 + 360, // arrival time
	route: 'B',
	duration: 360,

	// current state
	transfers: first.transfers + 0,
	blacklist: first.blacklist.concat('lake'),
	previousSegment: first
}

Contributing

If you have a question or have difficulties using vbb-routing, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.