This is a Java project that implements an random multistart simulated annealing algorithm to solve the HCP.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to have installed Java 8 or higher.
java -version
Clone the repository
git clone https://github.com/Griezn/Hamiltonian_completion_problem.git
or download the zip file.
Navigate to the project folder
cd Hamiltonian_completion_problem
Compile the project
javac -d bin src/*.java
Run the project
java -cp bin Main
Run the project with a custom graph
java -cp bin Main <path_to_graph>
Run the project with a custom graph and a custom number of iterations
java -cp bin Main <path_to_graph> <number_of_iterations>
Compile the project
javac -d bin src/*.java tests/Benchmarks.java
Run the benchmark
java -cp bin Benchmarks
Results will be saved in the results folder.
The project consists of four classes:
- Main.java - the main class that runs the algorithm
- Graph.java - the class that represents the graph
- Tree.java - the class that represents the tree
- UnionFind.java - the class that represents the union-find data structure
- Seppe Degryse