CADETProcess.optimization.OptimizerBase#
- class CADETProcess.optimization.OptimizerBase(progress_frequency, x_tol, f_tol, cv_tol, n_max_iter, n_max_evals, similarity_tol, parallelization_backend)[source]#
BaseClass for optimization solver APIs.
Holds the configuration of the individual solvers and gives an interface for calling the run method. The class has to convert the OptimizationProblem configuration to the APIs configuration format and convert the results back to the CADET-Process format.
- Attributes:
- is_population_basedbool
True, if the optimizer evaluates entire populations at every step.
- supports_multi_objectivebool
True, if the optimizer supports multi-objective optimization.
- supports_linear_constraintsbool
True, if the optimizer supports linear constraints.
- supports_linear_equality_constraintsbool
True, if the optimizer supports linear equality constraints.
- supports_nonlinear_constraintsbool
True, if the optimizer supports nonlinear constraints.
- supports_boundsbool
True, if the optimizer supports bound constraints
- ignore_linear_constraints_config: bool
True, if the optimizer can handle transforms and dependent variables in linear constraints.
- progress_frequencyint
Number of generations after which the optimizer reports progress. The default is 1.
- cv_tolfloat
Tolerance for constraint violation. The default is 1e-6.
- similarity_tolUnsignedFloat, optional
Tolerance for individuals to be considered similar. Similar items are removed from the Pareto front to limit its size. The default is None, indicating that all individuals should be kept.
- n_max_evalsint, optional
Maximum number of function evaluations.
- n_max_iterint, optional
Maximum number of iterations (e.g. generations).
- parallelization_backendParallelizationBackendBase, optional
Class used to handle parallelized (and also sequential) evaluation of eval_fun functions for each individual in a given population. The default parallelization backend is ‘Joblib’, which provides parallel execution using multiple cores.
n_cores
int, optionalint: Proxy to the number of cores used by the parallelization backend.
Methods
check_optimization_problem
(optimization_problem)Check if problem is configured correctly and supported by the optimizer.
Verify if all required parameters are set.
check_x0
(optimization_problem, x0)Check the initial guess x0 for an optimization problem.
optimize
(optimization_problem[, x0, ...])Solve OptimizationProblem.
run
([x0])Abstract Method for solving an optimization problem.
run_post_processing
(X_transformed, ...[, ...])Run post-processing of generation.
run_final_processing