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

Optimize initial route #445

Merged
merged 2 commits into from Sep 12, 2016
Merged

Conversation

larose
Copy link
Contributor

@larose larose commented Sep 2, 2016

Part of #435

@larose
Copy link
Contributor Author

larose commented Sep 9, 2016

This pull request conflicts with the changes of #443 in src/delivery.py:DailyOrders.

This pull request optimizes the route returned to the user based on the position of the clients. When I wrote the algorithm, the route returned to the user was random, now it is a route previously saved.

@lamontfr, @manumilou do you still need this optimization. If yes, how?

@lamontfr
Copy link
Contributor

lamontfr commented Sep 9, 2016

Mathieu,

I will check this tomorrow and let you know.

-François.

On 9/8/16, Mathieu Larose notifications@github.com wrote:

This pull request conflicts with the changes of
#443 in
src/delivery.py:DailyOrders.

This pull request optimizes the route returned to the user based on the
position of the clients. When I wrote the algorithm, the route returned to
the user was random, now it is a route previously saved.

@lamontfr, @manumilou do you still need this optimization. If yes, how?

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#445 (comment)

@lamontfr
Copy link
Contributor

lamontfr commented Sep 9, 2016

@larose @manumilou I think that Mathieu's route optimization is an important improvement and is definitely required.

When I worked on PR #443, I was not aware of your work and here were my assumptions :

  • The user will choose a route, see the list of orders to be delivered on this day, then manually adjust the sequence by looking at the points on the map and finally save this sequence using the existing button.
  • Most clients receiving meals are regular, such that for a given day of the week the list is similar except for a few additions.

So the code I wrote does this :

  • When the user chooses a route, we load all the orders for the day, we look for a saved sequence from the same weekday of the previous week and if it exists, we use the latter to sort the clients that correspond, then we put the new clients at the end.

Now that you wrote a path optimisation algorithm (TSP) , we have two choices :

1- When the user chooses a route, we load all the orders for the day in the sequence saved from last week (if any). Then when the user clicks "Optimize" we use your TSP optimisation to find the best sequence then display these on the map. The user can then make some manual changes and save this sequence, then print/display the delivery Route Sheet.

2- When the user chooses a route, we load all the orders for the day then we use your TSP right away to find the best sequence then display these on the map. The user can then make some manual changes then print/display the delivery Route Sheet without saving the sequence.

I am open to any of these choices. Let me know what you think.

@manumilou
Copy link
Contributor

Thanks @lamontfr for the recap of the situation.

I would rather go for the solution 2. For two reasons:

  • It is simpler if the user does not need to click Save before Printing
  • It is more logical to use a default behaviour based on the TSP algorithm proposed by @larose, rather than using the order of the last week, which most probably will have to be different

@larose
Copy link
Contributor Author

larose commented Sep 12, 2016

Ready to be merged! Thanks @lamontfr and @manumilou!

@manumilou
Copy link
Contributor

Thanks @larose 👍

@manumilou manumilou merged commit cf2f596 into savoirfairelinux:dev Sep 12, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants