Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My starting node is fixed, i . e . , the first most element in the dataset is supposed to be my starting node

"My starting node is fixed, i.e., the first most element in the dataset is supposed to be my starting node"
I have dataset in the form of csv file, and it includes three columns, 1st column - name of the city, 2nd column - x coordinate, 3rd column - y coordinate.
I have to implement TSP using genetic algorithm and simmulated annealing.
The comand to run in the terminal is supposed to be in this format, python cs581_P01_AXXXXXXXX.py FILENAME ALGO P1 P2
where:
cs581_P01_AXXXXXXXX.py is your python code file name,
FILENAME is the input CSV file name (graph G data),
ALGO is mode in which your program should operate
1 Simulated Annealing,
2 Genetic Algorithm,
P1 is a value for a specific algorithm parameter:
Simulated Annealing: P1 is the initial temperature T value,
Genetic Algorithm: P1 is the number of iterations K,
P2 is a value for a specific algorithm parameter:
Simulated Annealing: P2 is the \alpha parameter for the temperature cooling schedule,
Genetic Algorithm: P2 is the mutation probability Pm value,
Example:
python cs581_P01_A11111111.py DATA.CSV 210000.01
If the number of arguments provided is NOT four your program should display the following error message:
ERROR: Not enough or too many input arguments.
Report results on screen in the following format:
Last Name, First Name, AXXXXXXXX solution:
Initial state: INITIAL
Simulated Annealing:
Command Line Parameters:
Initial solution: LABEL1, LABEL2, LABEL3,..., LABELN-1, LABELN
Final solution: LABEL1, LABEL2, LABEL3,..., LABELN-1, LABELN
Number of iterations: AAAA
Execution time: T1 seconds
Complete path cost: Y1
Genetic Algorithm:
Command Line Parameters:
Initial solution: LABEL1, LABEL2, LABEL3,..., LABELN-1, LABELN
Final solution: LABEL1, LABEL2, LABEL3,..., LABELN-1, LABELN
Number of iterations: AAAA
Execution time: T2 seconds
Complete path cost: Y2

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

Step: 3

blur-text-image

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

Entity Alignment Concepts Recent Advances And Novel Approaches

Authors: Xiang Zhao ,Weixin Zeng ,Jiuyang Tang

1st Edition

9819942527, 978-9819942527

More Books

Students also viewed these Databases questions

Question

Explain the importance of Human Resource Management

Answered: 1 week ago

Question

Discuss the scope of Human Resource Management

Answered: 1 week ago

Question

Discuss the different types of leadership

Answered: 1 week ago