All Implemented Interfaces:
MultivariateVectorFunction, Constraint, VectorDifferentiableFunction, OptimizationData

public class SQPIneq extends InequalityConstraint
Adapter representing the inequality constraint set of an SQPProblem as an InequalityConstraint suitable for use by SQP solvers.

This wrapper delegates the evaluation and Jacobian computation of inequality constraints back to the underlying SQPProblem. The dimension of the constraint mapping and lower bounds are derived directly from the problem.

Inequality constraints are assumed to follow the canonical form:

     g(x) >= lb
 

where lb is given by SQPProblem.getIneqConstraintLB().

An instance of this class is normally constructed automatically by SQP optimizers when processing OptimizationData. It serves as a structural adapter layer between user-supplied models and solver APIs.

Since:
4.1
  • Constructor Details

    • SQPIneq

      public SQPIneq(SQPProblem problem)
      Creates an inequality constraint adapter for the given SQPProblem.
      Parameters:
      problem - the problem model supplying inequality constraint values and their Jacobian
  • 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.

      Returns the number of inequality constraint components. If no lower bounds are supplied, the mapping is assumed empty.

      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.getIneqConstraintEvaluation(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.getIneqConstraintJacobian(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 that evaluates constraints given a raw array input. Converts the input to ArrayRealVector and delegates to SQPProblem.getIneqConstraintEvaluation(RealVector).

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