knitr::opts_chunk$set(echo = TRUE)
LeapFrog is a single agent metaheuristic search algorithm for solving the Travelling Salesman Problem. LeapFrog can be used with non-symmetrical distance matrices, coordinate matrices, or both. The solution method can easily be expanded to solve for other types of shortest-path problems.
Given a distance matrix, coordinate matrix, or both, the LeapFrog::ImportData()
function will create a LeapFrog class object that can then be used with the LeapFrog algorithm function LeapFrog::LF()
.
The LeapFrog algorithm offers the following tunable parameters:
LeapFrog comes with 13 different known TSP instances, sourced from the TSPLIB [@reinelt1991tsplib]. They can be called using
LeapFrogObject <- LeapFrog::GetData(1)
or by using the function
LeapFrog::ImportData(distances = yourDistanceMatrix, coordinates = yourCoordinateMatrix)
Run the LeapFrog algorithm by passing the LeapFrog class object and any parameters.
LeapFrogOutput <- LeapFrog::LF(LeapFrogObject, m = 10, r = 20, a = .5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.