Description Usage Arguments Value
View source: R/single_objective_ga.R
Use single objective genetic algorithm to find an optimum for the specified objective function. Candidate solutions are represented as logical or numeric vectors.
1 2 3 4 | single_objective_ga(objective_function, chromosome_size,
chromosome_type = "binary", population_size = 100,
number_of_iterations = 100, elitism = TRUE, nc = 2,
mutation_probability = 0.05, uniform_mutation_sd = 0.01)
|
objective_function |
Objective function |
chromosome_size |
Size of chromosome which represents candidate solutions |
chromosome_type |
Chromosome type ("binary" or "numeric") |
population_size |
Number of solutions evaluated in one iteration of genetic algorithm |
number_of_iterations |
Number of iterations (generations) of genetic algorithm |
elitism |
Use elitism |
nc |
NC for SBX crossover (valid if "numeric" chromosome is used) |
mutation_probability |
Probability of mutation (valid if "binary" chromosome is used) |
uniform_mutation_sd |
Standard deviation of mutation (valid if "numeric" chromosome is used) |
List which contains results of single objective genetic algorithm:
value
- Value of objective function for the best solution
best_solution
- Chromosome which represents the best solution
best_solution_index
- Index of the best solution in population
statistics
- Statistics about run of genetic algorithm
parameters
- Parameters of genetic algorithm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.