Ahren09 / CSE6140_TSP

CSE6140 Fall 2023 group project on TSP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSE6140 Group Project

Getting Started

Download DATA.zip from Canvas and extract all files to the data/ directory.

Run the program using the following script

python run_tsp.py -inst <filename> -alg [BF | Approx | LS] -time <cutoff_in_seconds> -seed <random_seed>

For example, to run brute force:

  • python run_tsp.py -inst Atlanta.tsp -alg BF -time 600 -seed 0: run the brute force algorithm on the Atlanta graph in the data/ directory.

To run local search:

  • python run_tsp.py -inst Atlanta.tsp -alg LS -time 600 -seed 0

To run approximation:

  • python run_tsp.py -inst Atlanta.tsp -alg Approx -time 600 -seed 0

Alternatively, you can also use our provided exec file, which is just a bash script:

  • ./exec -inst Atlanta.tsp -alg BF -time 600 -seed 0
  • ./exec -inst Atlanta.tsp -alg LS -time 600 -seed 0
  • ./exec -inst Atlanta.tsp -alg Approx -time 600 -seed 0

Requirements

python >= 3.6

Notes

Generating an executable from our Python file

We will need PyInstaller.

  1. Install PyInstaller: PyInstaller can be installed using pip. Open your terminal and run:

  2. pip install pyinstaller
  3. Create the Executable: Navigate to the project directory CSE6140_TSP run the following command:

  4. Generate the executable

    pyinstaller --onefile run_tsp.py

    The --onefile option tells PyInstaller to package everything into a single executable file.

  5. Generate the executable

    pyinstaller --onefile run_tsp.py

About

CSE6140 Fall 2023 group project on TSP


Languages

Language:Python 97.3%Language:Shell 2.7%