Description Usage Arguments Value References See Also Examples
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.
1 | runACOTSP(x, control, monitor = makeNullMonitor())
|
x |
[ |
control |
[ |
monitor |
[ |
[AntsResult
]
S3 result object.
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.
For shortcuts of important ACO-based solvers see e.g. runAS
,
runACS
and runMMAS
.
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())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.