cata-dev / raptor Goto Github PK
View Code? Open in Web Editor NEWBasic RAPTOR typescript implementation.
License: MIT License
Basic RAPTOR typescript implementation.
License: MIT License
local pruning
issue in original paperlocal pruning
should work fine, but its implementation in Algorithm 1: RAPTOR
seems bad so it doesn't work properly.
Indeed, line 18
, the check is only done by comparing the arrival time with τ*
and not t_k
(which is expected) ; but τ*
isn't updated when checking for foot-paths, τ_k
is the only one assigned.
So back to the comparison line 18
, paths found thanks to foot-paths aren't taken into account.
This eventually leads to cyclic paths, and produces wrong shortest paths.
Source : RAPTOR.
Remove local pruning
improvment.
Branch no-local-pruning shows a version of RAPTOR without any local pruning
upgrade, theoretically working.
Branches test-bibm and test-bibm-no-local-pruning implement tests based on BIBM data, demonstrating the issue.
In its current form, the algorithm doesn't take into account stops possibly reachable trough initial foot paths from p_s
.
Counting them add a step in the final journey, "at most k
trips" isn't exactly right.
Source : RAPTOR.
Such paths were added by making a preliminary (k = 0
) foot paths lookup, only from departure stop p_s
, see 9f67fa4 here.
Query was made from stop 2832
(Les Harmonies) to stop 2168
(Bougnard).
We show here only the best result.
[
{ time: 1697797362162, duration: '00:00:000' },
{
tripIndex: 2,
boardedAt: 2832,
route: { id: 212331, stops: [Array], trips: [Array] },
time: 1697798898000,
duration: '25:35:838'
},
{
boardedAt: 5309,
transfer: { to: 3850, length: 214.1422162947978 },
time: 1697799040761.4775,
duration: '02:22:761.4775390625'
},
{
tripIndex: 3,
boardedAt: 3850,
route: { id: 257608, stops: [Array], trips: [Array] },
time: 1697800170000,
duration: '18:49:238.5224609375'
},
{
boardedAt: 3832,
transfer: { to: 2168, length: 103.87566422933122 },
time: 1697800239250.4429,
duration: '01:09:250.44287109375'
}
]
Total time : 47:55.
[
{ time: 1697797362162, duration: '00:00:000' },
{
boardedAt: 2832,
transfer: { to: 3850, length: 669.8871103792119 },
time: 1697797808753.407,
duration: '07:26:591.406982421875'
},
{
tripIndex: 2,
boardedAt: 3850,
route: { id: 257651, stops: [Array], trips: [Array] },
time: 1697798663000,
duration: '14:14:246.593017578125'
},
{
boardedAt: 3832,
transfer: { to: 2168, length: 103.87566422933122 },
time: 1697798732250.4429,
duration: '01:09:250.44287109375'
}
]
Total time : 22:49.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.