Coder Social home page Coder Social logo

raptor's People

Contributors

catatomik avatar dependabot[bot] avatar

raptor's Issues

Illustrating local pruning issue in original paper

local pruning issue in original paper

Problem

local 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.

Solution

Remove local pruning improvment.

Illustrating

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.

Enhance itineraries search

Enhance itineraries search

Problem

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.

Illustrating

Such paths were added by making a preliminary (k = 0) foot paths lookup, only from departure stop p_s, see 9f67fa4 here.

Results

Query was made from stop 2832 (Les Harmonies) to stop 2168 (Bougnard).
We show here only the best result.

Without additional foot-paths lookup :

[
    { 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.

With additional foot-paths lookup :

[
    { 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.