CADETProcess.optimization.OptimizationProblem.check_individual

CADETProcess.optimization.OptimizationProblem.check_individual#

OptimizationProblem.check_individual(x: ArrayLike, cv_bounds_tol: float | ndarray | None = 0.0, cv_lincon_tol: float | ndarray | None = 0.0, cv_lineqcon_tol: float | ndarray | None = 0.0, check_nonlinear_constraints: bool = False, cv_nonlincon_tol: float | ndarray | None = 0.0, silent: bool = False) bool[source]#

Check if individual is valid.

Parameters:
xnpt.ArrayLike

Value of the optimization variables in untransformed space.

cv_bounds_tolfloat or np.ndarray, optional

Tolerance for checking the bound constraints. Default is 0.0.

cv_lincon_tolfloat or np.ndarray, optional

Tolerance for checking the linear inequality constraints. Default is 0.0.

cv_lineqcon_tolfloat or np.ndarray, optional

Tolerance for checking the linear equality constraints. Default is 0.0.

check_nonlinear_constraintsbool, optional

If True, also check nonlinear constraints. Note that depending on the nonlinear constraints, this can be an expensive operation. The default is False.

cv_nonlincon_tolfloat or np.ndarray, optional

Tolerance for checking the nonlinear constraints. Default is 0.0.

silentbool, optional

If True, suppress warnings. The default is False.

Returns:
bool

True if the individual is valid, False otherwise.