public class SQPOptimizerS2 extends AbstractSQPOptimizer2
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
  • Constructor Details

    • SQPOptimizerS2

      public SQPOptimizerS2()
      Simple constructor.
  • Method Details

    • doOptimize

      public LagrangeSolution doOptimize()
      Performs the bulk of the optimization algorithm.
      Specified by:
      doOptimize in class BaseOptimizer<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 variable x.

      The Lagrangian is defined as:

       L(x, y) = f(x) - yₑᵗ·cₑ(x) - yᵢᵗ·cᵢ(x)
       

      where:

      • f(x) is the objective function
      • cₑ(x) are the equality constraints
      • cᵢ(x) are the inequality constraints
      • y = [yₑ; yᵢ] is the vector of Lagrange multipliers

      The gradient with respect to x is given by:

       ∇ₓ L(x, y) = ∇f(x) - JEᵗ·yₑ - JIᵗ·yᵢ
       
      Parameters:
      otherJ - the gradient of the objective function ∇f(x), length n
      otherJE - 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ᵢ], length me + mi
      Returns:
      the gradient of the Lagrangian with respect to x, length n
    • setDebugPrinter

      public void setDebugPrinter(DebugPrinter printer)
      Set debug printer.
      Parameters:
      printer - debug printer