This is the main function of the package. It minimizes the output of the function fn (for maximization, change the sign of the output of fn).
malschains(
fn,
lower,
upper,
dim,
maxEvals = 10 * control$istep,
verbosity = 2,
initialpop = NULL,
control = malschains.control(),
seed = NULL,
env
)
the function returns a list containing the best individual, sol
, and its fitness
.
Furthermore, it contains some information on the optimization process, which can be seen using print.malschains
.
The function to minimize.
The lower bound (or bounds) of the search domain.
The upper bound (or bounds) of the search domain.
The dimension of the problem (if lower
and upper
are vectors it is not needed).
The maximal number of evaluations of the fitness function.
Set the verbosity level. Currently, meaningful values are 0, 1, 2
An initial population for the evolutionary algorithm can be submitted (as a matrix). Here, prior knowledge can be introduced to get better results from the algorithm.
A list containing the main options of the algorithm. See malschains.control
.
A seed value for the random number generator.
The environment in which to evaluate the fitness function. If not given, it is generated.
The output of the function when run with verbosity=2
is the following:
EA::PopFitness
The fitness of the best, the one at the 1st quartile, the one at the 3rd quartile, and the worst individual.
EA::Improvement
Improvement of the individuals at the according ranked positions in the population (best, 1st quartile, 3rd quartile, worst).
LS
The number of the individual which is improved on (in braces), its fitness before and after application of the LS procedure, and their difference.
EABest
If the best fitness present in the population changed: same as LS
.
Molina, D., Lozano, M., Sánchez, A.M., Herrera, F. Memetic algorithms based on local search chains for large scale continuous optimisation problems: MA-SSW-Chains (2011) Soft Computing, 15 (11), pp. 2201-2220.
Molina, D., Lozano, M., García-Martínez, C., Herrera, F. Memetic algorithms for continuous optimisation based on local search chains (2010) Evolutionary Computation, 18 (1), pp. 27-63.