shivamt24 / CrimeRouteX

INFO6205 Project: The Traveling Salesman Problem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

INFO6205_Traveling_Salesman

INFO6205 Project: The Traveling Salesman Problem

User Interface

web app snippet

To run the Java program:

  1. Clone the app with the command: git clone git@github.com:shivamt24/INFO6205_Traveling_Salesman.git
    git clone git@github.com:shivamt24/INFO6205_Traveling_Salesman.git
    
  2. Open the app by moving to the project folder
  3. Run the script buildAndRun.sh to run all the algorithms
    bash buildAndRun.sh
    Note: This script installs all the dependencies, builds the jars and generates the output
    
  4. The output file is generated at the location
    src/main/resources/outputs/
    

Note: The input csv should be at the location "src/main/resources/inputs/"

Running the webpage:

Steps:

  1. Clone the app with the command: git clone git@github.com:shivamt24/INFO6205_Traveling_Salesman.git
    git clone git@github.com:shivamt24/INFO6205_Traveling_Salesman.git
    
  2. Open the app on the terminal
  3. Move to the folder visualize/tsp-vis “command : cd visualize/tsp-vis”
    cd visualize/tsp-vis
    
  4. Install the react dependencies “command: npm i”
    npm i
    
  5. Run the app “command: npm start”
    npm start
    
  6. The app will be hosted on http://localhost:3000/

Additional Steps to generate custom output and visualize:

  1. Run the Java algorithm as per the java documentation.
  2. The output csv files will be generated, copy these files to the location “visualize/tsp-vis/src/csv”
  3. Note: The copied files must be renamed to either “christofides.csv” or “annealing.csv”
  4. Run the command: “npm start” after moving inside the react project

Visualization:

User Interface Flow chart

flowchart

To use the travelling salesman Java algorithm with the provided dataset, follow these steps:

Steps:

  1. Click on the "Select Algorithm" drop down and select the desired algorithm to display.
  2. Once the algorithm is selected, the locations will be plotted on a map based on the input CSV data.
  3. Click on the "Generate" button to display the paths connecting the locations according to the output generated by the selected algorithm.

About

INFO6205 Project: The Traveling Salesman Problem


Languages

Language:Java 70.2%Language:JavaScript 21.2%Language:HTML 4.2%Language:CSS 3.6%Language:Shell 0.7%