optiprofiler.FeaturedProblem.cub#
- FeaturedProblem.cub(x, record_hist=True)[source]#
Evaluate the nonlinear constraints
cub(x) <= 0.- Parameters:
- xarray_like, shape (n,)
Point at which to evaluate the nonlinear inequality constraints.
- record_histbool, optional
Whether to evaluate and record the reference (truth) value. False skips that evaluation and the history entry; the solver-visible value is still computed and the call still counts toward the limit of two times the maximum function evaluations.
- Returns:
numpy.ndarray, shape (m_nonlinear_ub,)Values of the nonlinear inequality constraints at x if maximum number of evaluations has not been reached, otherwise returns the last evaluated nonlinear inequality constraints.
- Raises:
- ValueError
If the argument x has an invalid shape or if the return value of the argument
cubhas an invalid shape.- StopIteration
If the number of the nonlinear inequality constraint evaluations has reached two times the maximum function evaluations.