Skip to content

Pinhas-Nisnevitch/TSP-Accelerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TSP-Accelerator

Algorithm accelerator for the travelling salesman problem



More about TSP-Accelerator

TSP Accelerator is a java implementation of the paper: "TODO"

Getting Started

git clone --recursive https://github.com/Pinhas-Nisnevitch/TSP-Accelerator/
cd TSP-Accelerator
ant -f "TSP Accelerator" -Dnb.internal.action.name=rebuild clean jar

Double-Click on: /TSP-Accelerator/TSP Accelerator/dist/TSP_Accelerator.jar

install dependencies

git: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
java jdk: https://www.oracle.com/technetwork/java/javase/downloads/index.html
ant: https://ant.apache.org/manual/install.html

Create New TSP Solver

  1. Write your TSP algorithm using this template:
import Main.Cost;
import java.util.ArrayList;
import TSP_Algorithms.TSP_Algorithm;


public class YOUR_TSP_ALGORITHM extends TSP_Algorithm{
    private final static String ALGORITHM_NAME = "YOUR TSP ALGORITHM NAME";


    public YOUR_TSP_ALGORITHM(Cost cost_func, ArrayList<Integer> points) {
        super(cost_func, points, ALGORITHM_NAME);
        int [] tour = new int[points.size()];
        // YOUR CODE HERE MAKE SURE TO UPDATE THE "tour" ARRAY BEFORE THE "setTour(tour)" COMMAND.
        setTour(tour);
    }

}

and save as "YOUR_TSP_ALGORITHM.java"

See for example: https://github.com/Pinhas-Nisnevitch/TSP-Accelerator/blob/master/utils/NearestNeighbor.java

  1. save your java file in: TSP-Accelerator/utils/

  2. For Linux/macOS:
    source create_tsp_algorithms_jar.sh
    For Windows:
    create_tsp_algorithms_jar.bat

  3. Load the new JAR file ("TSP-Accelerator/utils/TSP Algorithms.jar") into the program. (File -> Load Algorithm)
    or (Shift + A).

Accelerating the "Nearest Neighbor" algorithm with 100k points:

The Team

TSP-Accelerator is currently maintained by Pinhas Nisnevitch major contributions coming from Dr. Lee-Ad Gottlieb , Omer Levin and Dina Ankonina.

Releases

No releases published

Packages

No packages published

Languages