Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Do this in C++ 1. A data structure has to be accepted by a laboratory instructor before implementation. 2. The source code has to be
Do this in C++
1. A data structure has to be accepted by a laboratory instructor before implementation. 2. The source code has to be split into header (*,h) and source (,cpp) files. 3. All functions have to be commented in the dorygen style. 4. Any permutation of command line switches has to be handled. 5. The program executed without parameters prints a short user's manual. 6. The program has to accept slightly imperfect input data. Implement a program solving the travelling salesman problem with a genetic algorithm. An input file holds a matrix of distances between towns, eg: A B C D 010155 11097 6. 1006 6 14 \& 0 NB: The matrix is a square but it is not necessary a symmetric one. Value - 1 stands for no link between towns. The task is to elaborate the shortest cycle visiting all towns. Example of an elaborated cycle: D B C A D The necessary condition for this project is an implementation of an genetic algorithm with selection and crossover operators (we leave out a mutation operator). An output file holds the best solutions found in all generations, eg: generation 1 , length 34 D BCAD generation 2 , length 33 D A B C D The program is run in a command line with the switches: i input fle with a matrix of distarices -o output file with the best solutions in all generations *g number of generations -n number of individuals in a generation Running the program with no parameters prints a short help how to use the programStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started