Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions