Solving-TSP-VRP-master.zip

  • 程序猿1
    了解作者
  • matlab
    开发工具
  • 519.1KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 5 积分
    下载积分
  • 0
    下载次数
  • 2022-04-19 16:16
    上传日期
旅行商问题(TSP)又称推销员问题,该问题时最基本的路线问题。该问题寻求单一旅行者由起点出发,通过所有给定的需求点之后,最后再回到起点的最小路径成本。
Solving-TSP-VRP-master.zip
  • Solving-TSP-VRP-master
  • GA_VRPTW
  • Reverse.m
    734B
  • TextOutput.m
    2KB
  • Mutate.m
    448B
  • dsxy2figxy.m
    930B
  • Fitness.m
    2.6KB
  • Crossover.m
    2KB
  • Reins.m
    554B
  • Select.m
    778B
  • DrawPath.m
    1.6KB
  • InitPop.m
    2.1KB
  • Main.m
    3.4KB
  • HPSO_VRPTW
  • TextOutput.m
    2KB
  • CalcDis.m
    2.2KB
  • Mutate.m
    368B
  • dsxy2figxy.m
    930B
  • Crossover.m
    1.4KB
  • DrawPath.m
    1.6KB
  • InitPop.m
    1.8KB
  • Main.m
    5.2KB
  • SA_VRPTW
  • Evaluation.m
    2.1KB
  • TextOutput.m
    2KB
  • dsxy2figxy.m
    930B
  • NewSolution.m
    250B
  • Metropolis.m
    987B
  • DrawPath.m
    1.6KB
  • Main.m
    5.5KB
  • images
  • Sample_of_TSP_Route_Map.jpg
    272KB
  • Sample_Graph_of_Optimization_Process.jpg
    268.5KB
  • Sample_of_VRP_Route_Map.jpg
    312.8KB
  • GA_CDVRP
  • Reverse.m
    668B
  • TextOutput.m
    1.3KB
  • Mutate.m
    448B
  • dsxy2figxy.m
    930B
  • Fitness.m
    1.4KB
  • Crossover.m
    2KB
  • Reins.m
    554B
  • Select.m
    778B
  • DrawPath.m
    1.6KB
  • InitPop.m
    1.6KB
  • Main.m
    3.2KB
  • ACO_TSP
  • TextOutput.m
    484B
  • dsxy2figxy.m
    930B
  • DrawPath.m
    1.8KB
  • Main.m
    5.7KB
  • SA_TSP
  • Evaluation.m
    802B
  • TextOutput.m
    484B
  • dsxy2figxy.m
    930B
  • NewSolution.m
    250B
  • Metropolis.m
    699B
  • DrawPath.m
    1.8KB
  • Main.m
    3.2KB
  • ACO_DVRP
  • TextOutput.m
    1.1KB
  • dsxy2figxy.m
    930B
  • DrawPath.m
    1.6KB
  • Main.m
    7.7KB
  • ACO_VRPTW
  • TextOutput.m
    1.9KB
  • dsxy2figxy.m
    930B
  • DrawPath.m
    1.6KB
  • Main.m
    10.2KB
  • HPSO_CDVRP
  • TextOutput.m
    1.3KB
  • CalcDis.m
    1KB
  • Mutate.m
    368B
  • dsxy2figxy.m
    930B
  • Crossover.m
    1.4KB
  • DrawPath.m
    1.6KB
  • InitPop.m
    1.3KB
  • Main.m
    4.9KB
  • GA_TSP
  • Reverse.m
    592B
  • TextOutput.m
    484B
  • Mutate.m
    392B
  • dsxy2figxy.m
    930B
  • Fitness.m
    1.1KB
  • Crossover.m
    2KB
  • Reins.m
    554B
  • Select.m
    778B
  • DrawPath.m
    1.8KB
  • InitPop.m
    312B
  • Main.m
    2.5KB
  • HPSO_TSP
  • TextOutput.m
    484B
  • CalcDis.m
    527B
  • Mutate.m
    368B
  • dsxy2figxy.m
    930B
  • Crossover.m
    1.4KB
  • DrawPath.m
    1.8KB
  • InitPop.m
    175B
  • Main.m
    4.2KB
  • ACO_CVRP
内容介绍
# Solving-TSP-VRP A MATLAB Implementation of Heuristic Algorithms to Traveling Salesman Problem and Vehicle Routing Problems. ## Goal To explore the value of minimum distance that all vehicles travel in each time of route planning. (The type of the objective function can be something other than distance if one wish, such as time, cost, etc.) ## Environment * MATLAB ## Folder Naming Folder name structure: `Algorithm Name` + `Problem Name` * Prefix of the folder name--Algorithms: | Algorithm Abbreviation | Algorithm Name | | ------------- | ------------- | | GA | Genetic Algorithm | | ACO | Ant Colony Optimization | | SA | Simulated Annealing | | HPSO | Hybrid Particle Swarm Optimization (Genetic Algorithm involved) | * Suffix of the folder name--Problems: | Problem Abbreviation | Problem Name | | ------------- | ------------- | | TSP | Traveling Salesman Problem | | DVRP | Vehicle Routing Problem with travel distance constraint | | CVRP | Vehicle Routing Problem with capacity constraint | | CDVRP | Vehicle Routing Problem with travel distance and capacity constraint | | VRPTW | Vehicle Routing Problem with travel distance constraint, capacity constraint, and hard time window constraint | ## Output Result 1. Sample Text Output in the Command Window ```MATLAB ... Iteration = 90, Min Distance = 204.65 km Iteration = 91, Min Distance = 204.65 km Iteration = 92, Min Distance = 204.65 km Iteration = 93, Min Distance = 204.65 km Iteration = 94, Min Distance = 204.65 km Iteration = 95, Min Distance = 204.65 km Iteration = 96, Min Distance = 204.65 km Iteration = 97, Min Distance = 204.65 km Iteration = 98, Min Distance = 204.65 km Iteration = 99, Min Distance = 204.65 km Iteration = 100, Min Distance = 204.65 km ------------------------------------------------------------- Elapsed time is 0.340380 seconds. Total Distance = 204.653 km Best Route: 0 -> 5 -> 10 -> 2 -> 0 -> 3 -> 6 -> 9 -> 1 -> 0 -> 7 -> 4 -> 8 -> 0 ------------------------------------------------------------- Route of vehichle No.1: 0 -> 5 -> 10 -> 2 -> 0 Time of arrival: 0 - 46.9 - 59.5 - 159.7 - 216.1 min Distance traveled: 70.15 km, time elapsed: 216.1 min, load rate: 90.00%; ------------------------------------------------------------- Route of vehichle No.2: 0 -> 3 -> 6 -> 9 -> 1 -> 0 Time of arrival: 0 - 45.9 - 58 - 72.7 - 97.3 - 138.4 min Distance traveled: 74.29 km, time elapsed: 138.4 min, load rate: 90.00%; ------------------------------------------------------------- Route of vehichle No.3: 0 -> 7 -> 4 -> 8 -> 0 Time of arrival: 0 - 48 - 72.1 - 90.6 - 128.2 min Distance traveled: 60.22 km, time elapsed: 128.2 min, load rate: 90.00%; ------------------------------------------------------------- ``` 2. Sample Graph of Optimization Process ![Sample_Graph_of_Optimization_Process](https://github.com/liukewia/Solving-TSP-VRP/blob/master/images/Sample_Graph_of_Optimization_Process.jpg) 3. Sample Graph of TSP Route Map ![Sample_of_TSP_Route_Map](https://github.com/liukewia/Solving-TSP-VRP/blob/master/images/Sample_of_TSP_Route_Map.jpg) 4. Sample Graph of VRP Route Map (Hard time window constraint is considered) ![Sample_of_VRP_Route_Map](https://github.com/liukewia/Solving-TSP-VRP/blob/master/images/Sample_of_VRP_Route_Map.jpg) ## Usage Pull the source code from `master` and open `Main.m` in either folder (if the file exists) to run that solver. Edit files in the folder `test_data` to apply the solvers to your own problems. ## License GNU General Public License (GPL)
评论
    相关推荐