Description Usage Arguments Details Value References
View source: R/solver_cuckoo.R
Solves a instance of the 3-GCP problem using the Cuckoo Search (CS) implementation described in Toda et al., 2016.
1 | solver_cuckoo(G, nfe, args)
|
G |
the graph to be solved, represented by a list where G$V is the number of nodes, and G$E is a |E|x2 matrix of edges. |
nfe |
the number of function evaluations. The solver will stop after this number has been exceeded. |
args |
a list with arguments for the method. The list must contain the following names:
|
The CS algorithm begins with a random set of solutions X, and at every iteration performs the following two steps:
1- For every solution x_i in X, apply the mutate.cuckoo(x_i, Levy) function to generate a new solution x_u. Replace x_i with x_u if the second is better.
2- For every solution x_i in X, apply the mutate.cuckoo(x_i, Policy) function with a probability pc to generate a new solution x_u. Replace x_i with x_u always (if compare is false) or if the second is better (otherwise).
Mutate.cuckoo(x_i, policy) generates a new individual as follows: an integer 'm' is chosen based on the policy parameter (levy distribution, uniform distribution, or fixed). Then 'm“ elements from x_i are changed to a random, different value.
A list with three names:
violation: the number of graph coloring violations of the best solution found (0 for a correct solution)
best: a vector with the best solution found
evals: the number of evaluations used by the time the solver stopped.
Toda Keita, Claus Aranha, Hitoshi Kanoh, "Solving the Graph Coloring Problem using Cuckoo Search", Technical Report of the Information Processing Society of Japan, 2016
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.