Class SQPOptimizerS2
java.lang.Object
org.hipparchus.optim.BaseOptimizer<LagrangeSolution>
org.hipparchus.optim.BaseMultivariateOptimizer<LagrangeSolution>
org.hipparchus.optim.nonlinear.vector.constrained.ConstraintOptimizer
org.hipparchus.optim.nonlinear.vector.constrained.AbstractSQPOptimizer2
org.hipparchus.optim.nonlinear.vector.constrained.SQPOptimizerS2
Sequential Quadratic Programming Optimizer (extended version).
Minimizes a nonlinear objective function subject to equality, inequality, and box constraints using a Sequential Quadratic Programming method. This implementation is inspired by the algorithm described in: "On the convergence of a sequential quadratic programming method" by Klaus Schittkowski (1982).
Supports: equality constraints, inequality constraints,bounds constraints, penalty function updates, line search strategies, BFGS Hessian update, and augmented QP formulation using a relaxation variable.
- Since:
- 3.1
-
Field Summary
Fields inherited from class org.hipparchus.optim.BaseOptimizer
evaluations, iterations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPerforms the bulk of the optimization algorithm.lagrangianGradX(RealVector otherJ, RealMatrix otherJE, RealMatrix otherJI, RealVector ignoredX, RealVector y) Computes the gradient of the Lagrangian function with respect to the primal variablex.voidsetDebugPrinter(DebugPrinter printer) Set debug printer.Methods inherited from class org.hipparchus.optim.nonlinear.vector.constrained.AbstractSQPOptimizer2
getBoxConstraint, getEqConstraint, getIqConstraint, getMatrixDecompositionTolerance, getObj, getQPSolver, getSettings, getSimpleBounds, optimize, parseOptimizationDataMethods inherited from class org.hipparchus.optim.BaseMultivariateOptimizer
getLowerBound, getStartPoint, getUpperBoundMethods inherited from class org.hipparchus.optim.BaseOptimizer
getConvergenceChecker, getEvaluations, getIterations, getMaxEvaluations, getMaxIterations, incrementEvaluationCount, incrementIterationCount, optimize
-
Constructor Details
-
SQPOptimizerS2
public SQPOptimizerS2()Simple constructor.
-
-
Method Details
-
doOptimize
Performs the bulk of the optimization algorithm.- Specified by:
doOptimizein classBaseOptimizer<LagrangeSolution>- Returns:
- the point/value pair giving the optimal value of the objective function.
-
lagrangianGradX
public RealVector lagrangianGradX(RealVector otherJ, RealMatrix otherJE, RealMatrix otherJI, RealVector ignoredX, RealVector y) Computes the gradient of the Lagrangian function with respect to the primal variablex.The Lagrangian is defined as:
L(x, y) = f(x) - yₑᵗ·cₑ(x) - yᵢᵗ·cᵢ(x)
where:
f(x)is the objective functioncₑ(x)are the equality constraintscᵢ(x)are the inequality constraintsy = [yₑ; yᵢ]is the vector of Lagrange multipliers
The gradient with respect to
xis given by:∇ₓ L(x, y) = ∇f(x) - JEᵗ·yₑ - JIᵗ·yᵢ
- Parameters:
otherJ- the gradient of the objective function∇f(x), lengthnotherJE- the Jacobian of the equality constraints, shape[me x n](nullable)otherJI- the Jacobian of the inequality constraints, shape[mi x n](nullable)ignoredX- the current point in the primal space (not used directly, included for API symmetry)y- the stacked Lagrange multipliers[yₑ; yᵢ], lengthme + mi- Returns:
- the gradient of the Lagrangian with respect to
x, lengthn
-
setDebugPrinter
Set debug printer.- Parameters:
printer- debug printer
-