{"action":"created","issue":{"url":"https://api.github.com/repos/conveyal/r5/issues/29","labels_url":"https://api.github.com/repos/conveyal/r5/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/conveyal/r5/issues/29/comments","events_url":"https://api.github.com/repos/conveyal/r5/issues/29/events","html_url":"https://github.com/conveyal/r5/issues/29","id":118934125,"number":29,"title":"Multiple board stops","user":{"login":"mattwigway","id":566958,"avatar_url":"https://avatars.githubusercontent.com/u/566958?v=3","gravatar_id":"","url":"https://api.github.com/users/mattwigway","html_url":"https://github.com/mattwigway","followers_url":"https://api.github.com/users/mattwigway/followers","following_url":"https://api.github.com/users/mattwigway/following{/other_user}","gists_url":"https://api.github.com/users/mattwigway/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwigway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwigway/subscriptions","organizations_url":"https://api.github.com/users/mattwigway/orgs","repos_url":"https://api.github.com/users/mattwigway/repos","events_url":"https://api.github.com/users/mattwigway/events{/privacy}","received_events_url":"https://api.github.com/users/mattwigway/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-25T22:24:36Z","updated_at":"2015-11-25T22:31:07Z","closed_at":null,"body":"We frequently have many possible places to board a single line:\r\n![image](https://cloud.githubusercontent.com/assets/566958/11410782/4b46a5b0-9398-11e5-8b1a-cceef68525db.png)\r\n\r\nThe reason for this is pretty clear. Suppose that you have a 20-minute walk limit to transit and can reach 3 stops on a given line:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/566958/11410831/b19ec5b8-9398-11e5-89cc-c18fa3b6062b.png)\r\n\r\nObviously stop 2 is the closest, but most of the time the router will board at stop 1 because it's earlier on the trip and thus is reached first, and usually it doesn't matter which stop you go to as you'll wait there a while anyhow and catch the same vehicle. However, occasionally walking to stop 1 means you just miss a vehicle, so the router will board the earlier vehicle at stop 2. So both paths are present in the output.\r\n\r\nDepending on the differences in path lengths and the relative speed of the vehicles, it might occasionally make sense to walk to stop 3 so you can just catch a vehicle you would otherwise have missed at stop 2.\r\n\r\nThere's no easy heuristic solution; you don't always want to board at the first stop you reach, nor at the last (in fact, the situation here is common enough, with a vehicle running in a straight line, that frequently you will want to board somewhere in the middle).\r\n\r\nI think the right solution is to have another array in RaptorState that has the walk distance/time. We don't need to add it to the Pareto front (that would make computation much slower), we just need to use it as a tiebreaker when optimizing on travel time."},"comment":{"url":"https://api.github.com/repos/conveyal/r5/issues/comments/159746259","html_url":"https://github.com/conveyal/r5/issues/29#issuecomment-159746259","issue_url":"https://api.github.com/repos/conveyal/r5/issues/29","id":159746259,"user":{"login":"mattwigway","id":566958,"avatar_url":"https://avatars.githubusercontent.com/u/566958?v=3","gravatar_id":"","url":"https://api.github.com/users/mattwigway","html_url":"https://github.com/mattwigway","followers_url":"https://api.github.com/users/mattwigway/followers","following_url":"https://api.github.com/users/mattwigway/following{/other_user}","gists_url":"https://api.github.com/users/mattwigway/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwigway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwigway/subscriptions","organizations_url":"https://api.github.com/users/mattwigway/orgs","repos_url":"https://api.github.com/users/mattwigway/repos","events_url":"https://api.github.com/users/mattwigway/events{/privacy}","received_events_url":"https://api.github.com/users/mattwigway/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T22:31:07Z","updated_at":"2015-11-25T22:31:07Z","body":"Hmm, this gets messy given that we're also using number of transfers as a tiebreaker. The easy way I just described to implement this will yield inconsistent results, with lower-walk but more-transfer results being found and propagated from in later rounds. I have to flesh this out in my mind to describe the exact problem, but leaving this here so I remember the sinking feeling I have now about this approach on the other side of Thanksgiving dinner."}}