Class SQPActiveSetMinimizer.Solution
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.general.sqp.activeset.SQPActiveSetMinimizer.Solution
-
- All Implemented Interfaces:
IterativeMethod<Vector>
,IterativeSolution<Vector>
,MinimizationSolution<Vector>
- Direct Known Subclasses:
SQPActiveSetOnlyInequalityConstraintMinimizer.Solution
- Enclosing class:
- SQPActiveSetMinimizer
public class SQPActiveSetMinimizer.Solution extends Object implements IterativeSolution<Vector>
This is the solution to a general minimization with only inequality constraints using the SQP Active Set algorithm.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Solution(RealScalarFunction f, RealVectorFunction g, EqualityConstraints equal, GreaterThanConstraints greater)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector
minimizer()
Get the minimizer (solution) to the minimization problem.double
minimum()
Get the (approximate) minimum found.Vector
search(Vector x0)
Search for a solution that minimizes the objective function from the given starting point.Vector
search(Vector... initials)
Search for a solution that optimizes the objective function from the given starting points.Vector
search(Vector x0, Vector lambda0, Vector mu0)
Search for a solution that minimizes the objective function from the given starting point.void
setInitials(Vector... initials)
Supply the starting points for the search.Object
step()
Do the next iteration.
-
-
-
Constructor Detail
-
Solution
protected Solution(RealScalarFunction f, RealVectorFunction g, EqualityConstraints equal, GreaterThanConstraints greater)
-
-
Method Detail
-
setInitials
public void setInitials(Vector... initials)
Supply the starting points for the search. This can also initialize the state of the algorithm for a new search.- Specified by:
setInitials
in interfaceIterativeMethod<Vector>
- Parameters:
initials
- x0 s.t., \(c_j(x_0) \geq 0, j = 1, 2, ..., q\); λ0, the Lagrange multipliers for equality constraints (lambda); μ0 &ge 0, the Lagrange multipliers for inequality constraints (mu)
-
step
public Object step() throws Exception
Description copied from interface:IterativeMethod
Do the next iteration.- Specified by:
step
in interfaceIterativeMethod<Vector>
- Returns:
- the information about this step
- Throws:
Exception
- when an error occurs during the search
-
search
public Vector search(Vector... initials) throws Exception
Search for a solution that optimizes the objective function from the given starting points. This method typically calls first#setInitials(S...)
and then iterativelyIterativeMethod.step()
. It implements a default convergence criterion.- Specified by:
search
in interfaceIterativeMethod<Vector>
- Parameters:
initials
- x0 s.t., \(c_j(x_0) \geq 0, j = 1, 2, ..., q\); λ0, the Lagrange multipliers for equality constraints (lambda); μ0 &ge 0, the Lagrange multipliers for inequality constraints (mu)- Returns:
- an (approximate) optimizer
- Throws:
Exception
-
search
public Vector search(Vector x0) throws Exception
Search for a solution that minimizes the objective function from the given starting point.- Parameters:
x0
- an initial guess s.t., \(c_j(x_0) \geq 0, j = 1, 2, ..., q\)- Returns:
- an (approximate) optimizer
- Throws:
Exception
- when an error occurs during the search
-
search
public Vector search(Vector x0, Vector lambda0, Vector mu0) throws Exception
Search for a solution that minimizes the objective function from the given starting point. Note that f(x0) ≥ 0 and μ0 ≥ 0- Parameters:
x0
- x0 s.t., \(c_j(x_0) \geq 0, j = 1, 2, ..., q\)lambda0
- λ0, the Lagrange multipliers for equality constraints (lambda)mu0
- μ0 &ge 0, the Lagrange multipliers for inequality constraints (mu)- Returns:
- an (approximate) minimizer
- Throws:
Exception
- when an error occurs during the search
-
minimum
public double minimum()
Description copied from interface:MinimizationSolution
Get the (approximate) minimum found.- Specified by:
minimum
in interfaceMinimizationSolution<Vector>
- Returns:
- the (approximate) minimum found
-
minimizer
public Vector minimizer()
Description copied from interface:MinimizationSolution
Get the minimizer (solution) to the minimization problem.- Specified by:
minimizer
in interfaceMinimizationSolution<Vector>
- Returns:
- the minimizer
-
-