Package org.ojalgo.optimisation.convex
Class ConvexSolver.Configuration
java.lang.Object
org.ojalgo.optimisation.convex.ConvexSolver.Configuration
- Enclosing class:
ConvexSolver
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private NumberContext
private double
private Function
<Structure2D, MatrixDecomposition.Solver<Double>> private Function
<Structure2D, MatrixDecomposition.Solver<Double>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextendedPrecision
(boolean extendedPrecision) With extended precision the usual solver is wrapped by a master algorithm, implemented inQuadruple
precision, that iteratively refines (zoom and shift) the problem to be solved by the delegate solver.boolean
iterative
(NumberContext accuracy) The accuracy of the iterative Schur complement solver used inIterativeASS
.newSolverGeneral
(Structure2D structure) newSolverSPD
(Structure2D structure) double
smallDiagonal
(double factor) The [Q] matrix (of quadratic terms) is "inverted" using a matrix decomposition returned bynewSolverSPD(Structure2D)
.This matrix decomposition should be able to "invert" the full KKT systsem body matrix (which is symmetric) and/or its Schur complement with regards to the [Q] matrix (of quadratic terms).solverSPD
(Function<Structure2D, MatrixDecomposition.Solver<Double>> factory) The [Q] matrix (of quadratic terms) is supposed to be symmetric positive definite (or at least semidefinite), but in reality there are usually many deficiencies.
-
Field Details
-
myExtendedPrecision
private boolean myExtendedPrecision -
myIterative
-
mySmallDiagonal
private double mySmallDiagonal -
mySolverGeneral
-
mySolverSPD
-
-
Constructor Details
-
Configuration
public Configuration()
-
-
Method Details
-
extendedPrecision
With extended precision the usual solver is wrapped by a master algorithm, implemented inQuadruple
precision, that iteratively refines (zoom and shift) the problem to be solved by the delegate solver. This enables to handle constraints with very high accuracy.The iterative refinement solver cannot handle general inequality constraints, only simple variable bounds (modelled as inequality constraints).
This is an experimental feature!
-
isExtendedPrecision
public boolean isExtendedPrecision() -
iterative
-
iterative
The accuracy of the iterative Schur complement solver used inIterativeASS
. This is the step that calculates the Lagrange multipliers (dual variables). The iterative solver used is aConjugateGradientSolver
. -
newSolverGeneral
-
newSolverSPD
-
smallDiagonal
public double smallDiagonal() -
smallDiagonal
The [Q] matrix (of quadratic terms) is "inverted" using a matrix decomposition returned bynewSolverSPD(Structure2D)
. If, after decomposition,MatrixDecomposition.Solver.isSolvable()
returns false a small constant is added to the diagonal.The small constant will be the largest absolute element times this small diagonal factor.
This is only meant to handle minor, unexpected, deficiencies.
-
solverGeneral
public ConvexSolver.Configuration solverGeneral(Function<Structure2D, MatrixDecomposition.Solver<Double>> factory) This matrix decomposition should be able to "invert" the full KKT systsem body matrix (which is symmetric) and/or its Schur complement with regards to the [Q] matrix (of quadratic terms). -
solverSPD
public ConvexSolver.Configuration solverSPD(Function<Structure2D, MatrixDecomposition.Solver<Double>> factory) The [Q] matrix (of quadratic terms) is supposed to be symmetric positive definite (or at least semidefinite), but in reality there are usually many deficiencies. This matrix decomposition should handle "inverting" the [Q] matrix.
-