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

Distance Matrix Partitioning #1

Open
kevinmichaelchen opened this issue Jun 9, 2022 · 0 comments
Open

Distance Matrix Partitioning #1

kevinmichaelchen opened this issue Jun 9, 2022 · 0 comments

Comments

@kevinmichaelchen
Copy link
Member

kevinmichaelchen commented Jun 9, 2022

Google Maps has certain limits:

  1. Maximum of 25 origins or 25 destinations per request.
  2. Maximum 100 elements per server-side request.
  3. 1000 elements per second (EPS).

(The 3rd limitation constrains how much we parallelize in theory — to 40 requests per second — but in practice won't be an issue since first-pass sorting should apply a limit of less than 1000).

Because of these limitations, we'll need to partition matrices. A 1x100 matrix will need to be split up into 4 1x25 matrices.

The distance package will need to be refactored to be more like the geocode package, where all of the complexity (parallelization, matrix partitioning) lives higher up, and the leaf packages are simple and fewer LOC.

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

No branches or pull requests

1 participant