Documentation ¶
Overview ¶
Package ACO solves the Asymmetric Traveling Salesman Problem using Ant Colony Optimization
Ant colony optimization is a probabilistic optimization algorithm useful for getting approximative solutions to computational problems. The implementation in this package solves the Asymmetric Traveling Salesman Problem given by a weighted adjacency matrix.
The ACO algorithm in this package is based on the simplest variant known as Ant System. Other more refined variants include MMAS and Ant Colony System. Important guidelines when defining constants are that all constants are required to be strictly positive, alfa < beta, rho < 1.
Index ¶
- func ReadATSP(fileName string) [][]float64
- func SolveACS(graph [][]float64, alfa float64, beta float64, rho float64, q float64, m int, ...) (float64, []int)
- func SolveAS(graph [][]float64, alfa float64, beta float64, rho float64, q float64, m int, ...) (float64, []int)
- func SolveMMAS(graph [][]float64, alfa float64, beta float64, rho float64, q float64, m int, ...) (float64, []int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SolveACS ¶
func SolveACS(graph [][]float64, alfa float64, beta float64, rho float64, q float64, m int, tau0 float64, phi float64, q0 float64, iterations int) (float64, []int)
Solve ATSP returns optimal cost and solution to the ATSP specified by matrix graph. The solution is heavily dependent on specified values for alfa, beta, rho, q & m.
func SolveAS ¶
func SolveAS(graph [][]float64, alfa float64, beta float64, rho float64, q float64, m int, iterations int) (float64, []int)
Solve ATSP returns optimal cost and solution to the ATSP specified by matrix graph. The solution is heavily dependent on specified values for alfa, beta, rho, q & m.
func SolveMMAS ¶
func SolveMMAS(graph [][]float64, alfa float64, beta float64, rho float64, q float64, m int, tauMax float64, tauMin float64, iterations int) (float64, []int)
Solve ATSP returns optimal cost and solution to the ATSP specified by matrix graph. The solution is heavily dependent on specified values for alfa, beta, rho, q, m & tauMin/Max.
Types ¶
This section is empty.