All Implemented Interfaces:
MultivariateVectorFunction, Constraint, VectorDifferentiableFunction, OptimizationData

public class SQPEq extends EqualityConstraint
Adapter exposing the equality constraint set of an SQPProblem through the EqualityConstraint abstraction used by SQP solvers.

This wrapper delegates equality constraint evaluation and Jacobian computation to the underlying SQPProblem. The dimensionality of the constraint mapping and the associated lower bounds are deduced directly from the problem instance.

Equality constraints typically model conditions of the form:

     h(x) = 0
 

but some SQP formulations internally interpret equalities through a bounded form (e.g. h(x) >= lb and h(x) <= ub). Here, only the lower bound is provided via SQPProblem.getEqConstraintLB(), consistent with the EqualityConstraint superclass.

Instances of this class are commonly created internally by SQP optimizers when parsing user-supplied OptimizationData. It acts as an adapter layer between domain models and solver APIs.

Since:
4.1
  • Constructor Details

    • SQPEq

      public SQPEq(SQPProblem problem)
      Constructs an equality constraint wrapper around the supplied SQPProblem.
      Parameters:
      problem - optimization model providing equality constraint functions and gradients
  • Method Details

    • dim

      public int dim()
      Returns the dimensionality of the function domain. If dim() returns (n) then this function expects an n-vector as its input.

      Delegates to SQPProblem.getdim().

      Returns:
      the expected dimension of the function's domain
    • dimY

      public int dimY()
      Returns the dimensionality of the function eval.
      Specified by:
      dimY in interface VectorDifferentiableFunction
      Overrides:
      dimY in class BoundedConstraint
      Returns:
      the expected dimension of the function's eval
    • value

      public RealVector value(RealVector rv)
      Returns the value of this function at (x)

      Delegates evaluation to SQPProblem.getEqConstraintEvaluation(RealVector).

      Parameters:
      rv - a point to evaluate this function at.
      Returns:
      the value of this function at (x)
    • jacobian

      public RealMatrix jacobian(RealVector rv)
      Returns the gradient of this function at (x)

      Delegates to SQPProblem.getEqConstraintJacobian(RealVector).

      Parameters:
      rv - a point to evaluate this gradient at
      Returns:
      the gradient of this function at (x)
    • value

      public double[] value(double[] doubles)
      Returns the value of this function at (x)

      Convenience overload evaluating equality constraints for a raw primitive array. Converts the input to ArrayRealVector before delegation.

      Parameters:
      doubles - a point to evaluate this function at.
      Returns:
      the value of this function at (x)