Skip to main content

Vehicle Routing Problem Implementation using Two Stage Multi- Algorithm route optimization framework

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

Vehicle Routing Problem Implementation using Two Stage MultiAlgorithm route optimization framework

Sai Satya Agasteswara Vishnu T1 , K Deva Narayana Sai2, Dr Bharati Bidikar3

Velcheru Nanda Kishore4, YSS Vyshnavi Rasagna5

1,2,4,5 UG Students, Dept. of CSE, Andhra University, Andhra Pradesh, India

3 Adjunct Professor, Dept. of Computer Science and Engineering, Andhra University, Andhra Pradesh

Abstract: In modern logistics and e-commerce systems, optimizing a multi-agent delivery operation remains as a major challenge due to the complexity of large-scale routing and assignment problems, Efficientrouteplanninghasbecome very important in these systems, especially with the rapid growth of e-commerce and courier services. As itisessentialto minimize travel time and cost while covering a large number of delivery locations. This problem is related to optimization problems such as the Traveling Salesman Problem (TSP) and the Vehicle Routing Problem (VRP). Thispaperpresentsatwostage multi-agent route optimization framework which is designed to improve both agents delivery allocationandroute optimization In the first stage agent delivery assignment is done, and in the second stage Optimal Agents specific routing is done. To enhance real-world applicability, the system incorporates a hybrid distance computation approach that leverages the Google Maps, Distance Matrix API for accurate distances, along with a Haversine-based fallback for offline scenarios. Experimental results indicates that the proposed framework reduces total travel distance and execution time while maintaining scalability and adaptability of real-world delivery applications.

Key Words: VehicleRoutingProblem,TravellingSalesman Problem, Route Optimization, Agents Delivery Allocation, DistanceMatrix,Haversine,Multi-AgentDeliveryOperation

1. INTRODUCTION

The Traveling Salesman Problem (TSP) remains a fundamentalproblemincombinatorialoptimizationanditis known for its high computational complexity. In modern logistics,thisproblemrelatestotheVehicleRoutingProblem (VRP),whichinvolvesmultipleagentsalongwithconstraints such as workload balancing and cost minimization. As deliverynetworkscontinue togrow,managingbothagent assignmentandrouteplanningbecomeschallenging.

Akeylimitationinmanyexistingsystemsisthatthedelivery assignmentandrouteoptimizationarehandledseparately. Thisseparationoftenleadstoinefficientroutinganduneven distributionofworkamongagents.Soweneedanintegrated approachthatcaneffectivelyhandlebothproblemstogether.

Thispapershowstwo-stagemulti-agentrouteoptimization framework, as shown in Fig. 1. In the first stage, delivery locationsareassignedusingspatialandoptimization-based techniquestoensurebalancedworkloaddistribution.Inthe second stage, routes are optimized for each agent using multiplealgorithms,andthebestsolutionisselectedbased onperformancemetrics.Bycombiningboththestages,the framework improves overall efficiency and provides a scalablesolutionforthereal-worlddeliverysystems.

2. METHODOLOGY

The proposed system uses a structured multi-stage methodology to solve the multi-agent route optimization problem. This approach is divided into three major components: data management and distance matrix construction, multi-agent assignment, and route optimization.Wehaveusedareal-worlddatasettoevaluate systemsperformance

Fig 1 Multi-AgentRouteOptimizationOverview
Fig 2 MethodologyFrameworkofAlgorithms

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

2.1 Data Management and Distance Matrix

A dedicated module is developed to generate precise distance matrices for both delivery assignment and route optimization. The Real-world traveling distances and durations are obtained using the Google Maps Distance Matrix API, ensuring realistic routing based on road networks. There are two types of matrices which are generated: (i) an agent-to-delivery matrix capturing distances between each delivery agent and all delivery locations, and (ii) a delivery-to-delivery matrix used for solving routing problems such as TSP. To ensure cost efficiency and flexibility, a hybrid approach is adopted, where approximate methods like Haversine-based calculations are used as a fallback for testing and offline scenarios.

2.2 Multi-Agent Assignment Layer

Now we evaluate four optimization approaches for the deliveryassignmentproblem:

Stage 1: Delivery Assignment Algorithms

1. Incremental Cost Greedy Algorithm:

In this approach we assign deliveries step by step by choosing an option that adds the least extra travel costat eachstage.Itfocusesonmakingthebestimmediatedecision, gradually building an efficient and reasonably balanced assignment.

2. Pure Spatial Partitioning Algorithm:

Inthismethod,deliverylocationsaregroupedbasedonhow closetheyaretoeachother.Eachgroupisthenassignedto anagent,whichhelpsinreducingtraveldistancebykeeping deliverieswithinageographicarea

3. Min-Cost Max-Flow (MCMF) Algorithm:

In this algorithm we treat the assignment problem as a network,whereagentsanddeliverylocationsareconnected withcosts.Thisalgorithmfindsthebestpossibleassignment byminimizingthetotalcostwhileensuringallconstraints aresatisfied,whichleadstoanefficientoverallsolution.

4. Hybrid Integer Linear Programming (Hybrid ILP) Algorithm:

This approach is used as an optimization model to assign deliveriesbyconsideringconstraintslikeworkloadbalance. It combines ILP with simpler techniques to reduce computation time, which results in a fair and efficient distributionofdeliveries.

2.3 Route Optimization Tournament

Stage2:RoutingAlgorithmsforDeliveries

After the delivery assignment phase, each agent’s route is optimized using a tournament-based approach, where

multiple routing algorithms are executed, and the bestperformingroutingalgorithmisselectedbasedonmetrics such as total distance, travel time, and computational efficiency.

1. Nearest Neighbor Algorithm

The Nearest Neighbor algorithm constructs a route by iterativelyselectingtheclosestunvisiteddeliverylocation fromthecurrentnode.Itissimple,fast,andsuitableforrealtime applications, as it may produce suboptimal solutions duetoitsgreedynature,anditdoesnotconsidertheoverall routeandmayleadtolongerpaths inthefinalresult. The TimeComplexityforthisalgorithmisO(n²)

2. Strict Greedy Algorithm

TheStrictGreedyapproachselectsthenextlocationbased onthelowestimmediatecost,withoutconsideringhowthe decision will affect the overall route. Unlike the Nearest Neighbor method, it may take additional factors such as travel time or weighted distance, making it slightly more flexible.Sinceitfocusesonlyonthecurrentstepandshortterm gains, it misses better overall solutions and may not producethemostefficientroute.TheTimeComplexityfor thisalgorithmisO(n²)

3.

Ant Colony Optimization (ACO)

AntColonyOptimizationisinspiredbythewaythatantsfind theshortestpathfor theirfood.Inthisapproach,multiple artificial agents explore different routes and share informationbypromisingpaths,whichhelpstoguidefuture solutions.Overthetime,thisprocessallowsthesystemto graduallyimproveandfindbetterroutes.Itiseffectivefor solving complex routing problems, but it requires more computationtimecomparedtootheralgorithms TheTime ComplexityforthisalgorithmisO(iterations×n²)

4. Genetic Algorithm (GA)

The Genetic Algorithm is based on the concept of natural evolution and works by maintaining possible routes. It improvestheseroutesoverthetimeusingoperationssuch asselection,crossover,andmutation.Usingthisprocess,the algorithmisable toexplore a wide range ofsolutionsand gradually finds better routes. It is effective in producing high-qualityresults,TheTimeComplexityforthisalgorithm isO(generations×population×n)

5. Insertion Heuristic

The Insertion algorithm builds the route step by step by inserting unvisited locations into positions that causes in increaseoftotaltraveldistance.Bygraduallyconstructing theroute,itmaintainsagoodbalancebetweenefficiencyand solution quality, performing better than basic greedy approaches.TheTimeComplexityforthisalgorithmisO(n²)

6. Simulated Annealing (SA)

Simulated Annealing (SA) is a probabilistic optimization techniqueinspiredfromtheannealingprocessinmetallurgy.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

Itallowsthesystemtooccasionallyacceptworsesolutionsin theearlystagestoavoidgettingstuckinthelocalsolutions. Thealgorithmgraduallyimprovestherouteandconvergesit towardsanear-optimalsolution. TheTimeComplexityfor thisalgorithmisO(iterations×n)

7. Deep Optimiser (Hybrid Local Search)

The Deep Optimizer is a hybrid approach that improves existingroutesbyrepeatedlymakingsmallchanges,suchas swapping edges or refining route segments. It combines differentlocalsearchtechniqueswithiterativeimprovement to enhance solutions that are generated by greedy or heuristic methods, leading to better and more optimized routes.TheTimeComplexityforthisalgorithmisTypically O(k×n²),where k isthenumberofrefinementiterations

8. Held-Karp Dynamic Programming

Held–Karpisanexactdynamicprogrammingmethodused to solve smaller instances of the TSP. It reduces repeated calculationsthroughmemorization,allowingtogivethebest possible solution. However, due to its high computational complexity,itbecomesveryslowandimpracticalforlarger datasets.TheTimeComplexityforthisalgorithmisO(n²·2ⁿ)

2.4

Dataset Description

The dataset used in this paper represents a structured collectionofreal-worlddatasetfordeliveryoperationsinthe urban environment of Visakhapatnam, where multiple delivery agents are responsible for delivering items to variouslocationsacrossthecity.

The dataset consists of key attributes such as Agent_ID, Start_Latitude, Start_Longitude, Delivery_ID, Delivery_Latitude,andDelivery_Longitude.Itisdividedinto twomaincomponents:TheAgentsdataset,whichcontains agent details and starting coordinates, and the Deliveries dataset,whichcontainsdeliverylocationinformation.

Thedatasetincludes1000deliverylocationsand50agents, witheachagenthandlingapproximately20–25deliveries. The geographical coordinates ranges between latitudes 17.65to17.85andlongitudes83.15to83.35.Thisensures representation of both residential and commercial areas, providingarealistictestingenvironmentforthealgorithms.

3. RESULTS

3.1

Analysis of assignment algorithms

In this section, the analysis of results are done using assignment algorithms (Pure Spatial Partitioning, Hybrid ILP,IncrementalCostGreedy,Min-CostMax-Flow)ongiven datasetareshownbelow

PureSpatialPartitioningforDeliveryAssignment

Fig-4: FinalSystem-WideOptimizationSummaryforPure SpatialPartitioning

Fig-5: IncrementalCostGreedyforDeliveryAssignment

Fig-3:

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

Fig-6: FinalSystem-WideOptimizationSummaryfor IncrementalCostGreedy

Fig-7: HybridILPAssignmentforDeliveryAssignment

Fig-8: FinalSystem-WideOptimizationSummaryfor HybridILPAssignment

Fig-9: Min-CostMax-FlowGraphforDeliveryAssignment

Fig-10: FinalSystem-WideOptimizationSummaryfor Min-CostMax-FlowGraph

Byanalyzingtheperformancemetricesforthe4algorithms: Pure Spatial Partitioning, Hybrid ILP, Incremental Cost Greedy,Min-CostMax-Flowonthegivendatasetshowcased thatPureSpatialPartitioninggivesthemostoptimalresults Asthetotalbestoptimizeddistanceisleastforpurespatial partitioning with value 153991.32m. By considering total bestoptimizeddistance,thealgorithmscanbesortedinthe ascending order of optimization as 1. Pure Spatial Partitioning (153991.32m), 2. Min-Cost Max-Flow graph (296556.22m),3.HybridILP(357198.22m),4.Incremental Greedy(537138.00m).

Similarly,theascendingorderofoptimizationbasedontime are1.PureSpatialPartitioning,2.Min-CostMax-FlowGraph, 3.HybridILPAssignment,4.IncrementalGreedy.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

3.2

Performance Evaluation of Route Optimization Algorithms

Fig-11: AlgoritmsExecutionTime

Thefigure11describesusaboutthecomparisionofRoute Optimization of 8 different algorithms. As we observe the tablewecanseethatthevaluesofDeepOptimizergivesus moreefficientoutput

Fig12ExecutionTimeScalingofall8algorithms

Fig-13: ExecutionTimeScalingofTSPAlgorithmsexcept AntColony.HeldKarpDP.GeniticAlgoriym

Fig-14: AlgorithmPerformance:ExecutionTimeScaling exceptAntColony

Figures12,13,and14shows ushowtheexecutiontimeof different algorithms changes as the number of delivery locations are increased. As, the problem size grows, the executiontimeincreasesforallalgorithms,but the increase variesacross the methods. TheInsertionAlgorithm shows the lowest execution time for most of the problems, indicatingthatitisbothefficientandscalable.Thisconcludes that it can handle larger routing problems without a significantincreaseincomputationtime.

TheAntColonyOptimizationtakesthemoretime,whenthe number of locations are increased. This is because it explores multiple possible solutions before converging, whichrequiresmorecomputation time.Similarly,theHeld–Karp algorithm shows a sharp rise in execution time for largerdatasetsduetoitsexponentialcomplexity.Innormal heuristicmethodslikeNearestNeighbor,StrictGreedy,and Insertionmaintainlowerexecutiontime,eventhoughtheir performancemayvarydependingonthesizeandnatureof theproblem.

Fig-15: AlgorithmsMinimumDistance

TheFigure15describesusaboutthecomparisionof MinimumDistanceof8differentalgorithms.Aswesee thatInsertionAgorithmgivesusmostefficientvalues.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

Fig-16: OptimizedDistancevsProblemSize

Figure16showshowtheoptimizedtraveldistancechanges asthe problemsize increases.Itcompareshowefficiently eachalgorithmreducestraveldistancewhenthenumberof locations becomes larger. As the number of delivery locationsincreases,thetotaltraveldistancealsoincreases for all methods due to the higher complexity of routing. Among all the algorithms tested, the Insertion method consistentlyproducestheshortestroutes, whichindicates betterperformanceinminimizingtotaltraveldistance.The DeepOptimizerachievesresultsthat are veryclose tothe bestasitmaintainsmuchlowerexecutiontime,showinga good balance between speed and accuracy. Simulated Annealing results in relatively higher travel distances, indicateslowerefficiencyinrouteoptimizationforthegiven scenarios.

Overall,theresultsshowsthatdifferentalgorithmsperform wellindifferentaspects.TheInsertionalgorithmprovides thebestroutequality,whiletheDeepOptimizeroffersthe bestcomputationalefficiency.Therefore,theDeepOptimizer is a suitable for choosing large-scale delivery problems wherebothspeedandsolutionqualityareimportant.

3.3 Performance Comparison of TSP Algorithms for Agents

Fig-17: Comparisonof8Algorithms

The Figure 17 shows a comparison of different Traveling SalesmanProblem(TSP)algorithmsforrouteoptimization of Agent A004, which includes 38 delivery locations. The algorithmsthatarecomparedareNearestNeighbor,Strict Greedy, Ant Colony Optimization, Genetic Algorithm, Insertion, Simulated Annealing, and Deep Optimizer. This evaluation is based on key factors such as total travel distance,traveltime,averagespeed,andexecutiontime. Fromtheresults,theInsertionalgorithmperformsbestfor Agent A004, as it gives the lowest travel distance (42872.00m) also maintaining a reasonable travel time (4691.60s) and execution speed (9.1380m/s). This shows thattheinsertionmethodiseffectiveingeneratingefficient routes for medium-sized problems. Algorithms like Ant ColonyOptimization and GeneticAlgorithmalso produces goodresults,buttheyrequiremorecomputationtime.On

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

theotherhand,simplermethodssuchasNearestNeighbor andStrictGreedyrunfasterbuttheyresultinlongertravel distances,makingthemlessefficient.

Thefigurealsoindicatesthatperformancecanvaryacross differentagents.WhiletheInsertionalgorithmworksbest foragentslikeA001,A004, andA005,the DeepOptimizer performsbetterforagentsA002andA003.This tellsusthat theeffectivenessofanalgorithmdependsonfactorslikethe numberoflocationsandhowtheyaredistributed.

4 Conclusion

Theexperimentalevaluationoftwo-stagedmulti-algorithms routeoptimizationframeworkonareal-worlddatasetshows thatpurespatialpartitioningachievesthebestperformance in the delivery assignment stage, with the lowest total distance (153,991.32 m) and the least total time of (18,871.03 s) for completing all deliveries. In the routing stage,theInsertionalgorithmperformsbetterthantheother methods for most agents, producing shorter routes with reduced travel time, higher average speed, and lower execution time. Based on these observations, it can be concluded that combining pure spatial partitioning for deliveryassignmentwiththeInsertionalgorithmforroute optimizationprovidesthemostefficientandreliableresults formulti-agentdeliverysystems.

REFERENCES

[1] G.B.DantzigandJ.H.Ramser,“TheTruckDispatching Problem,” Management Science,vol.6,no.1,pp.80–91, 1959.

[2] G.Laporte,“TheVehicleRoutingProblem:AnOverview ofExactandApproximateAlgorithms,” EuropeanJournal of Operational Research, vol. 59, no. 3, pp. 345–358, 1992.

[3] S.Lin,“Computer Solutions ofthe Traveling Salesman Problem,” Bell System Technical Journal,vol.44,no.10, pp.2245–2269,1965.

[4] S. Lin and B. W. Kernighan, “An Effective Heuristic Algorithm for the Traveling-Salesman Problem,” Operations Research,vol.21,no.2,pp.498–516,1973.

[5] M. Held and R. M. Karp, “A Dynamic Programming Approach to Sequencing Problems,” Journal of the Society for Industrial and Applied Mathematics,vol.10, no.1,pp.196–210,1962.

[6] S. Kirkpatrick, C. D. Gelatt, and M. P. Vecchi, “OptimizationbySimulatedAnnealing,” Science,vol.220, no.4598,pp.671–680,1983.

[7] M. Dorigo, V. Maniezzo, and A. Colorni, “Ant System: OptimizationbyaColonyofCooperatingAgents,” IEEE Transactions on Systems, Man, and Cybernetics, Part B, vol.26,no.1,pp.29–41,1996.

[8] J. H. Holland, Adaptation in Natural and Artificial Systems.Cambridge,MA:MITPress,1992.

[9] J. MacQueen, “Some Methods for Classification and AnalysisofMultivariateObservations,”in Proceedingsof

the 5th Berkeley Symposium on Mathematical Statistics and Probability,pp.281–297,1967.

[10] D. Arthur and S. Vassilvitskii, “k-means++: The Advantages of Careful Seeding,” in Proceedings of the 18th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA),2007.

[11] R. W. Sinnott, “Virtues of the Haversine,” Sky and Telescope,vol.68,no.2,p.159,1984.

[12] P.E.Hart,N.J.Nilsson,andB.Raphael,“AFormalBasis fortheHeuristicDeterminationofMinimumCostPaths,” IEEE Transactions on Systems Science and Cybernetics, 1968.

[13] D. Luxen and C. Vetter, “Real-Time Routing with OpenStreetMap Data,” in Proceedings of the 19th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems,2011.

[14] F. Pedregosa et al., “Scikit-learn: Machine Learning in Python,” Journal of Machine Learning Research,vol.12, pp.2825–2830,2011.

[15] Google Developers, “Google Maps Platform Routes & Distance Matrix APIs Documentation,” [Online]. Available: https://developers.google.com/maps/documentation/r outes/overview

Turn static files into dynamic content formats.

Create a flipbook
Vehicle Routing Problem Implementation using Two Stage Multi- Algorithm route optimization framework by IRJET Journal - Issuu