cobyqa.problem.Problem#
- class cobyqa.problem.Problem(obj, x0, bounds, linear_ub, linear_eq, nonlinear_ub, nonlinear_eq, debug)[source]#
Optimization problem.
- Attributes:
bounds
Bound constraints.
fun_name
Name of the objective function.
is_feasibility
Whether the problem is a feasibility problem.
linear_eq
Linear equality constraints.
linear_ub
Linear inequality constraints.
m_bounds
Number of bound constraints.
m_linear_eq
Number of linear equality constraints.
m_linear_ub
Number of linear inequality constraints.
m_nonlinear_eq
Number of nonlinear equality constraints.
m_nonlinear_ub
Number of nonlinear inequality constraints.
n
Number of variables.
n_eval
Number of function evaluations.
n_orig
Number of variables in the original problem (with fixed variables).
type
Type of the problem.
x0
Initial guess.
Methods
best_eval
(penalty, x[, fun_val, cub_val, ...])Return the best point and the corresponding function evaluations.
build_x
(x)Build the full vector of variables from the reduced vector.
ceq
(x)Evaluate the nonlinear equality constraints.
cub
(x)Evaluate the nonlinear inequality constraints.
fun
(x)Evaluate the objective function.
resid
(x[, cub_val, ceq_val])Evaluate the constraint residuals.