runACOTSP: Ant System Optimization Algorithm for the Travelling...

Description Usage Arguments Value References See Also Examples

View source: R/runACOTSP.R

Description

This is the main function of the package and the entry point for Ant Colony based optiomization of the TSP. The function expects a graph, an optional monitoring function (see e.g. makeMonitor) and a control object (see makeACOTSPControl). The latter contains all the settings of the different parameters. The vast number of parameter combinations allows for many different ant strategies.

Specific shortcut functions exist for the most important ACO-based solvers for the TSP. See e.g. runAS for the classical Ant System approach by Dorigo, runACS for the Ant-Colony-System or runMMAS for the MAXMIN-Ant-System.

Usage

1
runACOTSP(x, control, monitor = makeNullMonitor())

Arguments

x

[Network]
A network, i. e., a graph generated with the netgen package. See makeNetwork for details.

control

[ACOTSPControl]
Control object. See makeACOTSPControl.

monitor

[AntsMonitor]
Monitor object of type AntsMonitor. Determines how to visualize the optimization process. Default is not visualization. See makeConsoleMonitor for basic console output.

Value

[AntsResult] S3 result object.

References

Dorigo, M. and Maniezzo, V. and Colorni, A. (1996) Ant System: Optimization by a Colony of Cooperating Agents. In IEEE Transactions on Systems, Man, and Cybernetics - Part B. IEEE Press, Piscataway, NJ, USA.

Dorigo, M. and Stuetzle, T. (2004) Ant Colony Optimization. Bradford Company, Scituate, MA, USA.

Stuetzle, T. and Hoos, H.H. (1998) Improvements on the Ant System: Introducing the MAX-MIN Ant System. In Artificial Neural Networks and Genetic Algorithms, pp. 245-249. Springer Verlag, Wien New York.

Dorigo, M. and Gambardella, L. M. (1997) Ant Colony System: A Cooperative Learning Approach to the Traveling Salesman Problem. In IEEE Transactions on Evolutionary Computation, pp. 53-66.

See Also

For shortcuts of important ACO-based solvers see e.g. runAS, runACS and runMMAS.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(netgen)
  x = generateRandomNetwork(n.points = 6L)
  ctrl = makeACOTSPControl(
    alpha = 1.2, beta = 1.8, n.ants = 15L,
    init.pher.conc = 0.01, max.iter = 10L
  )
  res = runACOTSP(x, ctrl)
  print(res)

  x = matrix(c(1, 2, 1, 3, 1, 4, 3, 1, 3, 2, 3, 4), ncol = 2, byrow = TRUE)
  x = makeNetwork(x, lower = 1, upper = 4)
  ctrl = makeACOTSPControl(alpha = 1.2, beta = 1.8, n.ants = 20L, max.iter = 30L)
  res = runACOTSP(x, ctrl, monitor = makeConsoleMonitor())

jakobbossek/acotsp documentation built on May 18, 2019, 9:08 a.m.