This work addresses the optimization of the middle-mile segment in e-commerce logistics. The problem is modeled as an open vehicle routing problem with pickup and delivery, time windows, multiple products, and an optional cross-docking operation, allowing direct, routing deliveries or consolidation via a cross-dock. Given the NP-hard nature of the problem, the MILP is unable to solve real size instances. Therefore, we propose a genetic algorithm (GA) integrating constructive heuristics and systematic parameter tuning using the Taguchi method, complemented by dynamic adjustment of crossover and mutation rates to balance exploration and exploitation with machine learning. The GA has been adapted to the closest problem PDPTW and evaluated on the Li & Lim benchmark, which demonstrates good performance.

