Opt.getMaxtime

Gets the maximum amount of time spent on optimization.

Equivalent in C API: nlopt_get_maxtime

struct Opt
getMaxtime
()

Return Value

Type: auto

Maxtime

Examples

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

opt.setMaxtime(2.0);
assert(opt.getMaxtime() == 2.0);

assert(opt.getResult() > 0);

Meta