{"action":"created","issue":{"url":"https://api.github.com/repos/valhalla/thor/issues/438","repository_url":"https://api.github.com/repos/valhalla/thor","labels_url":"https://api.github.com/repos/valhalla/thor/issues/438/labels{/name}","comments_url":"https://api.github.com/repos/valhalla/thor/issues/438/comments","events_url":"https://api.github.com/repos/valhalla/thor/issues/438/events","html_url":"https://github.com/valhalla/thor/pull/438","id":179802072,"number":438,"title":"Enable distancematrix for one to many","user":{"login":"xlqian","id":6093486,"avatar_url":"https://avatars.githubusercontent.com/u/6093486?v=3","gravatar_id":"","url":"https://api.github.com/users/xlqian","html_url":"https://github.com/xlqian","followers_url":"https://api.github.com/users/xlqian/followers","following_url":"https://api.github.com/users/xlqian/following{/other_user}","gists_url":"https://api.github.com/users/xlqian/gists{/gist_id}","starred_url":"https://api.github.com/users/xlqian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xlqian/subscriptions","organizations_url":"https://api.github.com/users/xlqian/orgs","repos_url":"https://api.github.com/users/xlqian/repos","events_url":"https://api.github.com/users/xlqian/events{/privacy}","received_events_url":"https://api.github.com/users/xlqian/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-09-28T15:12:18Z","updated_at":"2016-11-04T14:34:54Z","closed_at":"2016-10-19T13:20:14Z","pull_request":{"url":"https://api.github.com/repos/valhalla/thor/pulls/438","html_url":"https://github.com/valhalla/thor/pull/438","diff_url":"https://github.com/valhalla/thor/pull/438.diff","patch_url":"https://github.com/valhalla/thor/pull/438.patch"},"body":"Hello Valhalla! Greetings from Navitia! \n\nAs we discussed in this issue: https://github.com/valhalla/thor/issues/408, we have been working on the api `one_to_many` for a couple of days. \n## **Why we are re-working on this**\n\n(you're surely aware of all problems of your own baby :laughing: , this is only for the sake of traceability): \n- `one_to_many`/`many_to_one`/`many_to_many` api's `max_locations` is limited to 50 because of the huge demand  in RAM\n- Response time is not satisfying for our use case \n## **What we have done in this PR**\n\nAs suggested in the  https://github.com/valhalla/thor/issues/408, we try enabling the `timedistancematrix.cc`, and used it only for `one_to_many` api. We noticed that this class is kind of abandoned, some private members and methods are missing, interfaces of outer classes are changed etc..., we did what we can to \"repair\" this class and magically it seemed that it worked.\n## **What we have got**\n\nThe test result shows, with `timedistancematrix`, valhalla responded 3 times faster, however we found result returned by `timedistancematrix` were tiny different from the result computed by `costmatrix`, in 99% of cases, it was like 1 second for time or 1 meter for distance. We guessed that it may be due to the rounding errors. In 1% of cases, the difference was much larger. The check showed the result returned by `timedistancematrix` was correct.\n## **What we are going to do**\n\nIs to profile `timedistancematrix` and optimise it as we can\n## **What we want to hear from you**\n\nBesides your advices on code, we'd like to have your advices on how we switch the implementation of `one_to_many`/`many_to_one`/`many_to_many` APIs(https://github.com/valhalla/thor/compare/master...xlqian:enable_distancematrix_for_one_to_many?expand=1#diff-5856bbf06ad9bac8e0872ebf32f229c2R128). By arguments in URL? By valhalla.json? Or both?\n"},"comment":{"url":"https://api.github.com/repos/valhalla/thor/issues/comments/258447607","html_url":"https://github.com/valhalla/thor/pull/438#issuecomment-258447607","issue_url":"https://api.github.com/repos/valhalla/thor/issues/438","id":258447607,"user":{"login":"TeXitoi","id":5787066,"avatar_url":"https://avatars.githubusercontent.com/u/5787066?v=3","gravatar_id":"","url":"https://api.github.com/users/TeXitoi","html_url":"https://github.com/TeXitoi","followers_url":"https://api.github.com/users/TeXitoi/followers","following_url":"https://api.github.com/users/TeXitoi/following{/other_user}","gists_url":"https://api.github.com/users/TeXitoi/gists{/gist_id}","starred_url":"https://api.github.com/users/TeXitoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeXitoi/subscriptions","organizations_url":"https://api.github.com/users/TeXitoi/orgs","repos_url":"https://api.github.com/users/TeXitoi/repos","events_url":"https://api.github.com/users/TeXitoi/events{/privacy}","received_events_url":"https://api.github.com/users/TeXitoi/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T14:34:54Z","updated_at":"2016-11-04T14:34:54Z","body":"OK. Merging xlqian:enable_distancematrix_for_one_to_many just changed matrix_action.cc, so I think your right.\r\n\r\nBut I have strange results. I try now with 1.1.4 to see if that's a problem of timedistancematrix with the new tile format."}}
{"actor":{"display_login":"TeXitoi"}}