protocol
constrained_optimization_problem_protocol
Extends local_optimization_problem_protocol with general equality and inequality constraints. Box constraints continue to be expressed via the inherited position_bounds/1. A problem that defines neither equality_constraints/2 nor inequality_constraints/2 is a plain local_optimization_problem_protocol problem and can still be solved by any constrained_optimization solver.
logtalk_load(constrained_optimization(loader))static
Equality constraints:
g(x) = 0, one component per row ofequality_constraints/2.Inequality constraints:
h(x) =< 0, one component per row ofinequality_constraints/2. Constraints of the formh(x) >= 0ora =< h(x) =< bmust be restated in this form by the problem (e.g. negate, or split into two rows) before being reported here.Jacobians:
equality_jacobian/2andinequality_jacobian/2are required bysqp_active_set(_)andprimal_dual_interior_point(_), and byaugmented_lagrangian(_,_),quadratic_penalty(_,_), andlog_barrier(_,_)when their selected inner solver uses gradients. Solvers that need a Jacobian a problem does not define raise an existence error rather than silently falling back to finite differences.
Public predicates
equality_constraints/2
Computes g(x), the vector of equality constraint values at a point; feasibility requires every component to equal zero. Optional: when not defined, the problem has no equality constraints.
staticequality_constraints(Point,Values)equality_constraints(+list(number),-list(number)) - zero_or_oneequality_jacobian/2
Computes the Jacobian of equality_constraints/2 at a point, one row per constraint, one column per variable. Optional unless required by the solver in use (see the “Jacobians” remark above).
staticequality_jacobian(Point,Jacobian)equality_jacobian(+list(number),-list(list(number))) - zero_or_oneinequality_constraints/2
Computes h(x), the vector of inequality constraint values at a point; feasibility requires every component to be =< 0. Optional: when not defined, the problem has no general inequality constraints (position_bounds/1 may still apply).
staticinequality_constraints(Point,Values)inequality_constraints(+list(number),-list(number)) - zero_or_oneinequality_jacobian/2
Computes the Jacobian of inequality_constraints/2 at a point. Optional unless required by the solver in use (see the “Jacobians” remark above).
staticinequality_jacobian(Point,Jacobian)inequality_jacobian(+list(number),-list(list(number))) - zero_or_oneinner_progress/6
Optional callback reporting progress from an inner solver used by a delegated constrained solver. The stage is outer(N) for an outer iteration or phase1 for a feasibility search. The value and measure are those of the transformed inner subproblem.
staticinner_progress(Stage,Iteration,Point,Value,Measure,Evaluations)inner_progress(+term,+non_negative_integer,+list(number),+number,+number,+non_negative_integer) - zero_or_oneProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)