Opt.setPopulation

For use in stochastic search algorithms, size of initial population of random points. Default is that it is chosen heuristically by algorithm.

Equivalent in C API: nlopt_set_population

Params:

pop = value of population
struct Opt
void
setPopulation
(
const uint pop
)

Examples

auto opt = Opt(Algorithm.gnCRS2LM, 2);
opt.setPopulation(100);

assert(opt.getResult() > 0);

Meta