trRouting icon indicating copy to clipboard operation
trRouting copied to clipboard

Implement Raptor or Trip-Based or another transit routing algorithm that allows weightings

Open kaligrafy opened this issue 3 years ago • 5 comments

Raptor Trip-based and Trip-Based presentation

I propose that we code this new algorithm in rust, but this needs further discussion

kaligrafy avatar Nov 24 '21 15:11 kaligrafy

Could you define what you mean by weighing? Is it the generalized cost? Or some other factor?

tahini avatar Dec 06 '21 14:12 tahini

it means we can change the weight associated with each part of the route. Like if you're an elderly, walking is more difficult, so we can "change" walking time to be longer, so the route will try to minimize it more. In fact, we will use a cost function, and each time duration (walking, waiting, in-vehicle, etc.) will have different cost, so we can weight routes according to these costs. CSA cannot use this since it does not keep the history of each route, so we cannot know what happens before reaching further nodes until we found the fastest route.

kaligrafy avatar Dec 06 '21 14:12 kaligrafy

I'm wondering if it is TrRouting's role to implement the cost function, as it is very dependent on the individual who is doing the trip and there are sooo many possible implementation for a given cost function... If TrRouting returns all the necessary data for the caller to calculate various cost function, then it's easier to experiment and figure out the best implementation for a given use case.

That will have to be discussed.

tahini avatar Dec 06 '21 14:12 tahini

We can't, since the cost function is changing the result while calculating! It has to be implemented in trRouting

kaligrafy avatar Dec 06 '21 15:12 kaligrafy

Otherwise, you need to calculate a thousand routes and then weight with the cost function (which is what we would do with CSA), but it is waaayyyy slower

kaligrafy avatar Dec 06 '21 15:12 kaligrafy