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

[Feature] Route optimization for Delivery Trip stops #15566

Merged
merged 7 commits into from Nov 8, 2018

Conversation

Alchez
Copy link
Contributor

@Alchez Alchez commented Oct 3, 2018

Re-opening #15390.


This PR introduces provisions for Delivery Trip route optimization as described in general vehicle-routing and travelling salesman problems, and the implementation is based on Google's Directions API.

Features:

  • Process and optimize the entire Delivery Trip route, with or without locks
  • Form sets of routes for optimization based on applied lock positions
  • Re-arrange stops based on the optimized routes and lock positions
  • Set delay times between stops - offset estimation times by delays cumulatively
  • Add a default distance unit in Global Defaults for system-wide use
  • Store distances returned by Google Maps in the Delivery Trip and Stop
  • The destination's latitude and longitude are also stored in hidden fields inside Delivery Stop.

Screenshots / GIFs

Without position locks:

without_locks

With position locks:

with_locks

Global Defaults

image

@sagarvora
Copy link
Member

Hi @Alchez, your travis build has errored. Also, kindly review #15565 for changes in your implementation made by me.

@Alchez
Copy link
Contributor Author

Alchez commented Oct 3, 2018

@sagarvora, oh hey, just saw this. I'll check out the PR - thanks for the update.

@rmehta
Copy link
Member

rmehta commented Oct 5, 2018

@rmehta rmehta added the needs-tests This PR needs automated unit-tests. label Oct 5, 2018
@nabinhait
Copy link
Member

Travis is failing.

Rohan Bansal added 7 commits November 6, 2018 15:01
* Process and optimize the entire route, with or without locks

* Form sets of routes for optimization based on applied lock positions

* Re-arrange stops based on the optimized routes and lock positions

* Set delay times between stops - offset estimation times by delays cumulatively
@Alchez
Copy link
Contributor Author

Alchez commented Nov 6, 2018

@nabinhait, I've fixed the tests. Although Travis is now failing at trying to migrate User Permission.

@rmehta rmehta merged commit 068ba19 into frappe:staging-fixes Nov 8, 2018
@Alchez Alchez deleted the feature-route-optimization branch November 8, 2018 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants