ACO

package module
v0.0.0-...-aea10f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2021 License: BSD-2-Clause Imports: 7 Imported by: 0

README

Ant Colony Optimization

Traveling salesman problem solver 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.

Installation

To install ACO package run

go get github.com/BrumRn/Ant-Colony-Optimization

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadATSP

func ReadATSP(fileName string) [][]float64

ReadATSP returns a graph matrix from an .atsp file.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL