Closed tamas-ferenci closed 5 years ago
It works as I intended to make it work. See
> summary(GA)
── Genetic Algorithm ───────────────────
GA settings:
Type = real-valued
Population size = 50
Number of generations = 100
Elitism = 2
Crossover probability = 0.8
Mutation probability = 0.1
Search domain =
a b
lower -5.12 -5.12
upper 5.12 5.12
GA results:
Iterations = 100
Fitness function value = 0
Solution =
a b
[1,] 0 0
You can see that the two decision variables are named a
and b
.
Thank you very much @luca-scr ! I now see what's going on. However, what I actually wanted to achieve is to have names inside the fitness function, i.e., that the passed x
is a named vector. Is it possible to achieve this somehow...?
Nope.
Thanks!
Consider the following example:
I.e.
x1
andx2
doesn't seem to be named, despite the option present.