Skip to content

JianyuChen01/EC_work

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EC_work

Instruction:

In Individual class, we define a class to describe a solution. In class Population, we define a class to represent a set of solutions. We implement 4 different mutation operators (insert, swap, inversion, scramble) in class mutation, 4 crossover operators (Order Crossover, PMX Crossover, Cycle Crossover, Edge Recombination) in class crossOver and 3 selection operators (fitness-proportional, tournament selection, elitism) in class Selection. In class Algorithms, we combine different selection, crossover and mutation algorithms to form three evolutionary algorithms. TSPProblem.py contains class TSPProblem, which represents the TSP problem and enables the construction and visualization of TSP problems. Read_data.py contains class Read_data, functioning as a data loader. The folder Experiment1_logfiles consists of the log-files containing the results generated by the code. The folder dataSet consists of the problem inputs and optimal outputs of the symmetric traveling salesperson problem of the TSPlib. The test*.py and FinalTest*.py are to be runned to obtain resolutions. The walking trajectory can be obtained by running TSPProblem.py. We integrated the operations for this experiment in FinalTest1_.py and FinalTest2.py run FinalTest1_.py ,you can get .txt and log files with the answer for Experiment1 run FinalTest2.py ,you can get .txt and log files with the answer for Experiment2 run test3.py , you can get txt that show the length according to the opt_tour file

presentation video link:https://www.bilibili.com/video/BV13U4y1n71E/

Members: 1190200505 胡梦康 [email protected] 1190200504 陈健宇 [email protected] 1190202121 李忠根 [email protected] 1190202126 李映泽 [email protected] 1190400818 蒋文祺 [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%