Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass matrix request for plan mode #444

Closed
jcoupey opened this issue Jan 25, 2021 · 0 comments · Fixed by #1137
Closed

Bypass matrix request for plan mode #444

jcoupey opened this issue Jan 25, 2021 · 0 comments · Fixed by #1137

Comments

@jcoupey
Copy link
Collaborator

jcoupey commented Jan 25, 2021

The plan mode as described in #430 recently landed in master, replacing the usual solving approach behind Input::solve with a call to the new Input::check function.

As I focused on the implementation feature-wise, I simply re-used the existing matrix available after a request to the routing engine. As a result there are unnecessary calculations performed on the routing side: as task ordering is provided in input for all routes, we could actually get all the information we need by firing one route request per vehicle instead of a request for the whole matrix.

I'm not exactly sure what would be the most elegant way to do this without adding too much boilerplate. A "lazy" approach would be to not change the client code but add a sparse-filling function that would populate only the required entries in the matrix using route requests. A somewhat cleaner approach could be to change the routing Wrapper interface to expose the result of a route request. This response would then be used by the client code in choose_ETA to derive all required durations.

Something else to keep in mind: upon generating the solution, we populate the routes with distance values using the exact same route request, so it should actually be run only once and stored somewhere for reuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant