Class SQPEq
- All Implemented Interfaces:
MultivariateVectorFunction,Constraint,VectorDifferentiableFunction,OptimizationData
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 Summary
ConstructorsConstructorDescriptionSQPEq(SQPProblem problem) Constructs an equality constraint wrapper around the suppliedSQPProblem. -
Method Summary
Modifier and TypeMethodDescriptionintdim()Returns the dimensionality of the function domain.intdimY()Returns the dimensionality of the function eval.jacobian(RealVector rv) Returns the gradient of this function at (x)double[]value(double[] doubles) Returns the value of this function at (x)value(RealVector rv) Returns the value of this function at (x)Methods inherited from class org.hipparchus.optim.nonlinear.vector.constrained.BoundedConstraint
getLowerBound, getUpperBound, overshootMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hipparchus.optim.nonlinear.vector.constrained.VectorDifferentiableFunction
gradient
-
Constructor Details
-
SQPEq
Constructs an equality constraint wrapper around the suppliedSQPProblem.- 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:
dimYin interfaceVectorDifferentiableFunction- Overrides:
dimYin classBoundedConstraint- Returns:
- the expected dimension of the function's eval
-
value
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
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
ArrayRealVectorbefore delegation.- Parameters:
doubles- a point to evaluate this function at.- Returns:
- the value of this function at (x)
-