create pkgs a ranked home_idlist for sending deliver request
1 | rp_create_pkgs_rk_home_idlist(pkgs_id)
|
This approach is ranking home_id based on dist(pkgs_id, current_route_segment) using yg::calculate_dist_point_segment(). This ranking algorithm should be run on runtime to catch recent accepted pkgs and which causes changes on current route to home.
TODO: use ggmap::route(from, to, structure = "route", output = 'all') to capture detailed route path and calculate dist(pkgs, route) [?] This is a better approximation on extramile and extraminutes, but way more computation, and hard to save into df format. This approach has its advantage siginificant only when there is long route such as highway travel. However, in such case, employee might not want to detour and exit highway.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.