GithubHelp home page GithubHelp logo

Reverse optimization about r5 HOT 3 CLOSED

conveyal avatar conveyal commented on August 15, 2024
Reverse optimization

from r5.

Comments (3)

mattwigway avatar mattwigway commented on August 15, 2024

Agh this gets really messy. Consider these two examples, both of which suggest a solution that won't work with the other.

  1. You can ride to stop B now or wait five minutes and ride to stop B. If you wait, you miss your transfer to destination 1 but not destination 2. Thus if you're going to destination 2 you should wait, if you're going to destination 1 you shouldn't. The obvious solution is to just keep moving forward in time, using the RaptorState from the next minute, until you find one that doesn't arrive at the same time.
  2. However, that breaks when you have frequency-based routes, which will have different random offsets in each iteration.

from r5.

abyrd avatar abyrd commented on August 15, 2024

I'd rather avoid any hacks even remotely resembling "reverse optimization". I think the only really defensible thing to do is to reverse all the paths found one by one, by actually doing a backward search. Considering how tight the constraints are (derived from the forward results), it might be acceptably fast. We'll need this capability for point to point trip planning searches anyway, and I'm wary of the code complexity that comes from trying to optimize this procedure before we've even implemented it in the obvious, simple way. Our calculations are already quite rapid, and this whole system is made to scale with workers added to the cluster.

We'd get all the minimum travel time bounds from the basic range-raptor search, then kick off a highly constrained range-raptor search backward from each reached stop. This makes for a lot of extra work, but would only be done on big batch jobs or if someone requested/needed route names for each path. Whatever implementation we use, I think this should be pulled out into a separate step that follows completion of the main forward search. I say this mainly for reasons of process clarity and structure, and maintainability: it's going to get very ugly if we factor increasing amounts of functionality directly into the RAPTOR search procedure. If we can express the process as many calls to the same method in opposing directions it will be clearer.

We will at some point need to consider/include suboptimal options for Modeify too.

from r5.

mattwigway avatar mattwigway commented on August 15, 2024

We also don't need this for schedule-based networks, see #42.

from r5.

Related Issues (20)

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.