# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.qp.activeset

## Class QPPrimalActiveSetMinimizer

• java.lang.Object
• com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.qp.activeset.QPPrimalActiveSetMinimizer
• All Implemented Interfaces:
Minimizer<QPProblem,IterativeSolution<QPSolution>>, ConstrainedMinimizer<QPProblem,IterativeSolution<QPSolution>>, Optimizer<QPProblem,IterativeSolution<QPSolution>>

public class QPPrimalActiveSetMinimizer
extends Object
implements ConstrainedMinimizer<QPProblem,IterativeSolution<QPSolution>>
This implementation solves a Quadratic Programming problem using the Primal Active Set algorithm. In quadratic programming, as the solution is not necessarily on one of the edges of the bounding polygon, an estimation of the active set gives us a subset of inequalities to watch while searching the solution, which reduces the complexity of the search. A bottleneck is that only one constraint can be added or removed from the working set per iteration.
• "Andreas Antoniou, Wu-Sheng Lu, "Algorithm 13.1, Quadratic and Convex Programming," Practical Optimization: Algorithms and Engineering Applications."
• "Jorge Nocedal, Stephen Wright, "Algorithm 16.3," Numerical Optimization."
• Wikipedia: Active set
• ### Nested Class Summary

Nested Classes
Modifier and Type Class and Description
class  QPPrimalActiveSetMinimizer.Solution
This is the solution to a Quadratic Programming problem using the Primal Active Set algorithm.
• ### Constructor Summary

Constructors
Constructor and Description
QPPrimalActiveSetMinimizer(double epsilon, int maxIterations)
Constructs a Primal Active Set minimizer to solve quadratic programming problems.
QPPrimalActiveSetMinimizer(double epsilon, int maxIterations, boolean containBoxConstraints)
Constructs a Primal Active Set minimizer to solve quadratic programming problems.
• ### Method Summary

All Methods
Modifier and Type Method and Description
QPPrimalActiveSetMinimizer.Solution solve(QPProblem 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
• ### Constructor Detail

• #### QPPrimalActiveSetMinimizer

public QPPrimalActiveSetMinimizer(double epsilon,
int maxIterations,
boolean containBoxConstraints)
Constructs a Primal Active Set minimizer to solve quadratic programming problems.
Parameters:
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
maxIterations - the maximum number of iterations, e.g., Integer.MAX_VALUE
containBoxConstraints - true if the problem contains box constraints
• #### QPPrimalActiveSetMinimizer

public QPPrimalActiveSetMinimizer(double epsilon,
int maxIterations)
Constructs a Primal Active Set minimizer to solve quadratic programming problems.
Parameters:
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
maxIterations - the maximum number of iterations, e.g., Integer.MAX_VALUE
• ### Method Detail

• #### solve

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