gemseo / algos / opt

lib_nlopt module

NLOPT library wrapper

class gemseo.algos.opt.lib_nlopt.Nlopt[source]

Bases: gemseo.algos.opt.opt_lib.OptimizationLibrary

NLOPT optimization library interface.

See OptimizationLibrary.

Constructor

CTOL_ABS = 'ctol_abs'
FAILURE = 'NLOPT_FAILURE: Generic failure code'
FORCED_STOP = 'NLOPT_FORCED_STOP: Halted because of a forced termination: the user called nlopt_force_stop(opt) on the optimization’s nlopt_opt object opt from the user’s objective function or constraints.'
FTOL_REACHED = 'NLOPT_FTOL_REACHED: Optimization stopped because ftol_rel or ftol_abs (above) was reached'
INIT_STEP = 'init_step'
INVALID_ARGS = 'NLOPT_INVALID_ARGS: Invalid arguments (e.g. lower bounds are bigger than upper bounds, an unknown algorithm was specified, etcetera).'
LIB_COMPUTE_GRAD = False
MAXEVAL_REACHED = 'NLOPT_MAXEVAL_REACHED: Optimization stopped because maxeval (above) was reached'
MAXTIME_REACHED = 'NLOPT_MAXTIME_REACHED: Optimization stopped because maxtime (above) was reached'
NLOPT_MESSAGES = {-5: 'NLOPT_FORCED_STOP: Halted because of a forced termination: the user called nlopt_force_stop(opt) on the optimization’s nlopt_opt object opt from the user’s objective function or constraints.', -4: 'NLOPT_ROUNDOFF_LIMITED: Halted because roundoff errors limited progress. (In this case, the optimization still typically returns a useful result.)', -3: 'OUT_OF_MEMORY: Ran out of memory', -2: 'NLOPT_INVALID_ARGS: Invalid arguments (e.g. lower bounds are bigger than upper bounds, an unknown algorithm was specified, etcetera).', -1: 'NLOPT_FAILURE: Generic failure code', 1: 'NLOPT_SUCCESS: Generic success return value', 2: 'NLOPT_STOPVAL_REACHED: Optimization stopped because stopval (above) was reached', 3: 'NLOPT_FTOL_REACHED: Optimization stopped because ftol_rel or ftol_abs (above) was reached', 4: 'NLOPT_XTOL_REACHED Optimization stopped because xtol_rel or xtol_abs (above) was reached', 5: 'NLOPT_MAXEVAL_REACHED: Optimization stopped because maxeval (above) was reached', 6: 'NLOPT_MAXTIME_REACHED: Optimization stopped because maxtime (above) was reached'}
OUT_OF_MEMORY = 'OUT_OF_MEMORY: Ran out of memory'
ROUNDOFF_LIMITED = 'NLOPT_ROUNDOFF_LIMITED: Halted because roundoff errors limited progress. (In this case, the optimization still typically returns a useful result.)'
STOPVAL = 'stopval'
STOPVAL_REACHED = 'NLOPT_STOPVAL_REACHED: Optimization stopped because stopval (above) was reached'
SUCCESS = 'NLOPT_SUCCESS: Generic success return value'
XTOL_REACHED = 'NLOPT_XTOL_REACHED Optimization stopped because xtol_rel or xtol_abs (above) was reached'
exception gemseo.algos.opt.lib_nlopt.NloptRoundOffException[source]

Bases: Exception

Nlopt roundoff error