CADETProcess.optimization.OptimizationProblem.check_bounds

CADETProcess.optimization.OptimizationProblem.check_bounds#

OptimizationProblem.check_bounds(x: ArrayLike, cv_bounds_tol: float | ndarray | None = 0.0) bool[source]#

Check if all bound constraints are kept.

Parameters:
xnpt.ArrayLike

Value of the optimization variables in untransformed space.

cv_bounds_tolfloat or np.ndarray, optional

Tolerance for checking the bound constraints. If a scalar is provided, the same value is used for all variables. Default is 0.0.

Returns:
flagbool

True if all nonlinear constraints violation are smaller or equal to zero, False otherwise.

Raises:
ValueError

If length of cv_bounds_tol does not match the number of variables.