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 protectedSolution(RealScalarFunction f, RealVectorFunction g, EqualityConstraints equal, GreaterThanConstraints greater)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vectorminimizer()Get the minimizer (solution) to the minimization problem.doubleminimum()Get the (approximate) minimum found.Vectorsearch(Vector x0)Search for a solution that minimizes the objective function from the given starting point.Vectorsearch(Vector... initials)Search for a solution that optimizes the objective function from the given starting points.Vectorsearch(Vector x0, Vector lambda0, Vector mu0)Search for a solution that minimizes the objective function from the given starting point.voidsetInitials(Vector... initials)Supply the starting points for the search.Objectstep()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:
setInitialsin 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:IterativeMethodDo the next iteration.- Specified by:
stepin 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:
searchin 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:MinimizationSolutionGet the (approximate) minimum found.- Specified by:
minimumin interfaceMinimizationSolution<Vector>- Returns:
- the (approximate) minimum found
-
minimizer
public Vector minimizer()
Description copied from interface:MinimizationSolutionGet the minimizer (solution) to the minimization problem.- Specified by:
minimizerin interfaceMinimizationSolution<Vector>- Returns:
- the minimizer
-
-