Class SQPIneq
- All Implemented Interfaces:
MultivariateVectorFunction,Constraint,VectorDifferentiableFunction,OptimizationData
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 Summary
ConstructorsConstructorDescriptionSQPIneq(SQPProblem problem) Creates an inequality constraint adapter for the givenSQPProblem. -
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
-
SQPIneq
Creates an inequality constraint adapter for the givenSQPProblem.- 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:
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.getIneqConstraintEvaluation(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.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
ArrayRealVectorand delegates toSQPProblem.getIneqConstraintEvaluation(RealVector).- Parameters:
doubles- a point to evaluate this function at.- Returns:
- the value of this function at (x)
-