Opt.setMaxeval

Sets the maximum number of evaluations.

Equivalent in C API: nlopt_set_maxeval

Params:

maxeval = maximum number of evaluations
struct Opt
void
setMaxeval
(
const int maxeval
)

Examples

auto opt = Opt(Algorithm.auglag, 2);

opt.setMaxeval(20);

assert(opt.getResult() > 0);

Meta