# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.multivariate.constrained.general.sqp.activeset

## Class SQPActiveSetMinimizer

• java.lang.Object
• com.numericalmethod.suanshu.optimization.multivariate.constrained.general.sqp.activeset.SQPActiveSetMinimizer
• All Implemented Interfaces:
Minimizer<ConstrainedOptimProblem,IterativeSolution<Vector>>, ConstrainedMinimizer<ConstrainedOptimProblem,IterativeSolution<Vector>>, Optimizer<ConstrainedOptimProblem,IterativeSolution<Vector>>
Direct Known Subclasses:
SQPActiveSetOnlyInequalityConstraintMinimizer

public class SQPActiveSetMinimizer
extends Object
implements ConstrainedMinimizer<ConstrainedOptimProblem,IterativeSolution<Vector>>
Sequential quadratic programming (SQP) is an iterative method for nonlinear optimization. SQP methods are used on problems for which the objective function and the constraints are twice continuously differentiable. SQP methods solve a sequence of optimization subproblems, each which optimizes a quadratic model of the objective subject to a linearization of the constraints. If the problem is unconstrained, then the method reduces to Newton's method for finding a point where the gradient of the objective vanishes. If the problem has only equality constraints, then the method is equivalent to applying Newton's method to the first-order optimality conditions, or Karush-Kuhn-Tucker conditions, of the problem. SQP methods are the state of the art in nonlinear programming methods. Schittkowski has shown that SQP can outperform every other tested method in terms of efficiency, accuracy, and percentage of successful solutions, over a large number of test problems. The general minimization problem takes this form. $\min_x f(x) \textrm{ s.t.,} \\ a_i(x) = 0, i = 1, 2, ..., p\\ c_j(x) \geq 0, j = 1, 2, ..., q$
• ### Nested Class Summary

Nested Classes
Modifier and Type Class and Description
class  SQPActiveSetMinimizer.Solution
This is the solution to a general minimization with only inequality constraints using the SQP Active Set algorithm.
static interface  SQPActiveSetMinimizer.VariationFactory
This factory constructs a new instance of SQPASVariation for each SQP problem.
• ### Field Summary

Fields
Modifier and Type Field and Description
protected double epsilon1
protected double epsilon2
protected int maxIterations
• ### Constructor Summary

Constructors
Constructor and Description
SQPActiveSetMinimizer(double epsilon1, double epsilon2, int maxIterations)
Construct an SQP Active Set minimizer to solve general minimization problems with inequality constraints.
SQPActiveSetMinimizer(double epsilon1, int maxIterations)
Construct an SQP Active Set minimizer to solve general minimization problems with inequality constraints.
SQPActiveSetMinimizer(SQPActiveSetMinimizer.VariationFactory variant, double epsilon1, double epsilon2, int maxIterations)
Construct an SQP Active Set minimizer to solve general minimization problems with inequality constraints.
• ### Method Summary

All Methods
Modifier and Type Method and Description
SQPActiveSetMinimizer.Solution solve(ConstrainedOptimProblem problem)
Solve an optimization problem, e.g., OptimProblem.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Field Detail

• #### epsilon1

protected final double epsilon1
• #### epsilon2

protected final double epsilon2
• #### maxIterations

protected final int maxIterations
• ### Constructor Detail

• #### SQPActiveSetMinimizer

public SQPActiveSetMinimizer(SQPActiveSetMinimizer.VariationFactory variant,
double epsilon1,
double epsilon2,
int maxIterations)
Construct an SQP Active Set minimizer to solve general minimization problems with inequality constraints.
Parameters:
variant - a factory that constructs a new instance of SQPASVariation for each problem
epsilon1 - a precision parameter: when a number |x| ≤ ε, it is considered 0; for the SQP solver
epsilon2 - a precision parameter: when a number |x| ≤ ε, it is considered 0; for the embedded QP solver; suggested value = 0.
maxIterations - the maximum number of iterations
• #### SQPActiveSetMinimizer

public SQPActiveSetMinimizer(double epsilon1,
double epsilon2,
int maxIterations)
Construct an SQP Active Set minimizer to solve general minimization problems with inequality constraints.
Parameters:
epsilon1 - a precision parameter: when a number |x| ≤ ε, it is considered 0; for the SQP solver
epsilon2 - a precision parameter: when a number |x| ≤ ε, it is considered 0; for the embedded QP solver; suggested value = 0.
maxIterations - the maximum number of iterations
• #### SQPActiveSetMinimizer

public SQPActiveSetMinimizer(double epsilon1,
int maxIterations)
Construct an SQP Active Set minimizer to solve general minimization problems with inequality constraints.
Parameters:
epsilon1 - a precision parameter: when a number |x| ≤ ε, it is considered 0; for the SQP solver
maxIterations - the maximum number of iterations
• ### Method Detail

• #### solve

public SQPActiveSetMinimizer.Solution solve(ConstrainedOptimProblem problem)
throws Exception
Description copied from interface: Optimizer
Solve an optimization problem, e.g., OptimProblem.
Specified by:
solve in interface Optimizer<ConstrainedOptimProblem,IterativeSolution<Vector>>
Parameters:
problem - an optimization problem
Returns:
a solution to the optimization problem
Throws:
Exception - when there is an error solving the problem