Answered step by step
Verified Expert Solution
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, ie 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, st column name of the city, nd column x coordinate, rd 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 csPAXXXXXXXX.py FILENAME ALGO P P
where:
csPAXXXXXXXX.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
Simulated Annealing,
Genetic Algorithm,
P is a value for a specific algorithm parameter:
Simulated Annealing: P is the initial temperature T value,
Genetic Algorithm: P is the number of iterations K
P is a value for a specific algorithm parameter:
Simulated Annealing: P is the alpha parameter for the temperature cooling schedule,
Genetic Algorithm: P is the mutation probability Pm value,
Example:
python csPApy DATA.CSV
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: LABEL LABEL LABEL LABELN LABELN
Final solution: LABEL LABEL LABEL LABELN LABELN
Number of iterations: AAAA
Execution time: T seconds
Complete path cost: Y
Genetic Algorithm:
Command Line Parameters:
Initial solution: LABEL LABEL LABEL LABELN LABELN
Final solution: LABEL LABEL LABEL LABELN LABELN
Number of iterations: AAAA
Execution time: T seconds
Complete path cost: Y
Step 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