rp_create_pkgs_rk_home_idlist: rp_create_pkgs_rk_home_idlist

Description Usage Note

Description

create pkgs a ranked home_idlist for sending deliver request

Usage

1

Note

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.


gyang274/route documentation built on May 17, 2019, 9:41 a.m.