{'fraction_non_alphanumeric': 0.023823704586063133, 'fraction_numerical': 0.0023823704586063135, 'mean_word_length': 5.436781609195402, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
FoodMatch: Batching and Matching for Food Delivery in Dynamic Road Networks

Food delivery, today, is a multi-billion dollar industry. Minimizing food delivery time is a key contributor towards building positive customer experiences. More precisely, given a stream of food orders and available delivery vehicles, how should orders be assigned to vehicles so the delivery time is minimized? Several decisions have to be made: (1) assignment of orders to vehicles, (2) grouping orders into batches to cope with limited vehicle availability, (3) adapting to dynamic positions of delivery vehicles, and (4) ensuring scalability to the demands of real-world workloads. We show that the minimization problem is not only NP-hard but inapproximable in polynomial time. To mitigate this computational bottleneck, we develop an algorithm called FoodMatch, which maps the vehicle assignment problem to that of minimum weight perfect matching on a bipartite graph. To further reduce the quadratic construction cost of the bipartite graph, we deploy best-first search to only compute a subgraph that is highly likely to contain the minimum matching. The solution quality is further enhanced by reducing batching to a graph batching problem and anticipating dynamic positions of vehicles through angular distance. We perform extensive experiments on real food-delivery data from large metropolitan cities. Our results establish that FoodMatch imparts substantial improvements over baseline strategies across a host of metrics such as food delivery time, waiting time at restaurants, and orders delivered per kilometer. Furthermore, FoodMatch is efficient enough to handle real-world workloads.