Takeout platform, automatic distribution of orders.
Business background: Takeout platform, automatic distribution of orders.
Process:
1, Customer Orders
2, the platform receives the order, assigns the order to the distribution clerk,
3, merchant out meal
4, the delivery agent pickup
5, distribution staff distribution
6, user receiving, feedback evaluation
ps:2,3,4 Synchronous
Discussion question: How to do automatic distribution of orders (orders are automatically assigned to the most appropriate distribution staff)?
The premise of idealization:
1, the distribution staff speed constant
2, regardless of road conditions, weather and other external causes
3, the two-point distance of any known coordinates can be calculated (using a straight line)
Known conditions:
1, distribution operator speed v, coordinate point
2, the distribution clerk already has the order list Order1,order2...,ordern-1,ordern, the order list can be empty
3, each order contains two important parts, the order provides the merchant coordinates of the goods pointn, the order needs to be distributed to the user coordinates pointn,
4, new to order business coordinates point new business, user coordinates point new use.
5, all orders of the merchant uniform out of the meal time is t out, all orders of the delivery time does not allow more than t match
Required algorithm results:
1: Matching the shortest path (time or length as a measure, or both doping as a measure of standard),
Best path:
The best path is not necessarily the shortest path, for example a path is the shortest path but first send order 3 and then send 2 to send the 1,b path is not the shortest path, but first send order 2, then send 1, then send 3
The B path is considered to be more friendly than the A path, given the user experience, in the case of no time-outs and a small path difference.
2: Try to avoid running back and forth (really very difficult to define)
Ps:1 is a hard requirement and 2 is as satisfying as possible.
Aspects that may be involved
1, Shortest path Dijkstra algorithm
2,floyd Shortest Path algorithm
3, the path of dynamic planning, because it is impossible for an order to go to the user's point before the business location
4, traversal of the weighted non-graph
5, the traversal of the tree
Business status records in the real world