Digital model of ant algorithm in MATLAB for online delivery in Almaty city
DOI:
https://doi.org/10.26577/be155120267Abstract
In the context of the rapid growth of e-commerce and increasing logistical pressure on last-mile delivery, the search for effective routing algorithms is becoming particularly relevant. In megacities with dense traffic and complex terrain, such as Almaty, classical planning methods often prove to be insufficiently flexible. This article presents a digital implementation of the Ant Colony Optimization (ACO) algorithm in the MATLAB environment to optimize online delivery routes for the Magnum Cash&Carry retail chain in the city of Almaty. The model includes 10, 20, and 30 delivery addresses whose real coordinates were collected using the Yandex Maps service. The study demonstrates that the ant colony algorithm successfully identifies quasi-optimal routes with a relatively small number of iterations. The algorithm is implemented in MATLAB and allows interactive visualization of the route optimization process. This process includes pheromone trail updates, probabilistic selection of the next node, and the dynamics of route length reduction. A statistical analysis based on a series of 30 independent runs confirmed the high robustness and convergence of the algorithm. The results showed complete reproducibility of the optimal solution for small-scale problems. It is demonstrated that the ant colony algorithm can effectively solve the traveling salesman problem as the number of points increases. The algorithm ensures a stable reduction in the total route length at each iteration. Additionally, the obtained results were compared with those generated by the OSRM (Open Source Routing Machine) system. The analysis confirmed that the generated route topology is logistically consistent, contains no looped returns, and accounts for the road detour factor typical of urban street networks. This confirms the suitability of the algorithm for practical application in last-mile logistics. The study illustrates the significant potential of bio-inspired optimization methods in digital and «green» logistics for minimizing transportation costs and environmental impact.
Keywords: Ant colony algorithm, route optimization, online delivery, traveling salesman problem, last mile delivery.









