gemseo / algos / opt

opt_lib module

Optimization library wrappers base class

class gemseo.algos.opt.opt_lib.OptimizationLibrary[source]

Bases: gemseo.algos.driver_lib.DriverLib

Optimization library base class See DriverLib

Constructor

F_TOL_ABS = 'ftol_abs'
F_TOL_REL = 'ftol_rel'
LS_STEP_NB_MAX = 'max_ls_step_nb'
LS_STEP_SIZE_MAX = 'max_ls_step_size'
MAX_FUN_EVAL = 'max_fun_eval'
MAX_ITER = 'max_iter'
MAX_TIME = 'max_time'
PG_TOL = 'pg_tol'
X_TOL_ABS = 'xtol_abs'
X_TOL_REL = 'xtol_rel'
algorithm_handles_eqcstr(algo_name)[source]

Returns True if the algorithms handles equality constraints

Parameters

algo_name – the name of the algorithm

Returns

True or False

algorithm_handles_ineqcstr(algo_name)[source]

Returns True if the algorithms handles inequality constraints

Parameters

algo_name – the name of the algorithm

Returns

True or False

get_right_sign_constraints()[source]

Transforms the problem constraints into their opposite sign counterpart if the algorithm requires positive constraints

is_algo_requires_positive_cstr(algo_name)[source]

Returns True if the algorithm requires positive constraints False otherwise

Parameters

algo_name – the name of the algorithm

Returns

True if constraints must be positive

Return type

logical

static is_algorithm_suited(algo_dict, problem)[source]

Checks if the algorithm is suited to the problem according to its algo dict

Parameters
  • algo_dict – the algorithm characteristics

  • problem – the opt_problem to be solved