Class ConvexSolver
- java.lang.Object
-
- org.ojalgo.optimisation.GenericSolver
-
- org.ojalgo.optimisation.convex.ConvexSolver
-
- All Implemented Interfaces:
Optimisation
,Optimisation.Solver
- Direct Known Subclasses:
BasePrimitiveSolver
,IterativeRefinementSolver
public abstract class ConvexSolver extends GenericSolver
ConvexSolver solves optimisation problems of the form:min 1/2 [X]T[Q][X] - [C]T[X]
when [AE][X] == [BE]
and [AI][X] <= [BI]The matrix [Q] is assumed to be symmetric (it must be made that way) and positive (semi)definite:
- If [Q] is positive semidefinite, then the objective function is convex: In this case the quadratic program has a global minimizer if there exists some feasible vector [X] (satisfying the constraints) and if the objective function is bounded below on the feasible region.
- If [Q] is positive definite and the problem has a feasible solution, then the global minimizer is unique.
The general recommendation is to construct optimisation problems using ExpressionsBasedModel and not worry about solver details. If you do want to instantiate a convex solver directly use the ConvexSolver.Builder class. It will return an appropriate subclass for you.
When the KKT matrix is nonsingular, there is a unique optimal primal-dual pair (x,l). If the KKT matrix is singular, but the KKT system is still solvable, any solution yields an optimal pair (x,l). If the KKT system is not solvable, the quadratic optimization problem is unbounded below or infeasible.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConvexSolver.Builder
static class
ConvexSolver.Configuration
static class
ConvexSolver.ModelIntegration
-
Nested classes/interfaces inherited from interface org.ojalgo.optimisation.Optimisation
Optimisation.Constraint, Optimisation.ConstraintType, Optimisation.Integration<M extends Optimisation.Model,S extends Optimisation.Solver>, Optimisation.Model, Optimisation.Objective, Optimisation.Options, Optimisation.ProblemStructure, Optimisation.Result, Optimisation.Sense, Optimisation.Solver, Optimisation.State
-
-
Field Summary
Fields Modifier and Type Field Description static ConvexSolver.ModelIntegration
INTEGRATION
-
Fields inherited from class org.ojalgo.optimisation.GenericSolver
options
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConvexSolver(Optimisation.Options optimisationOptions)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <N extends java.lang.Comparable<N>>
ConvexData<N>copy(ExpressionsBasedModel model, PhysicalStore.Factory<N,?> factory)
static ConvexSolver.Builder
newBuilder()
static ConvexSolver.Builder
newBuilder(int nbVariables)
static ConvexSolver.Builder
newBuilder(Access2D<?> quadratic)
static ConvexSolver
newSolver(ExpressionsBasedModel model)
-
Methods inherited from class org.ojalgo.optimisation.GenericSolver
countIterations, countTime, error, getClassSimpleName, getDuration, getState, incrementIterationsCount, isIterationAllowed, isLogDebug, isLogOff, isLogProgress, log, log, log, log, logProgress, resetIterationsCount, setState, setValidator, validate, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ojalgo.optimisation.Optimisation.Solver
dispose, solve, solve
-
-
-
-
Field Detail
-
INTEGRATION
public static final ConvexSolver.ModelIntegration INTEGRATION
-
-
Constructor Detail
-
ConvexSolver
protected ConvexSolver(Optimisation.Options optimisationOptions)
-
-
Method Detail
-
copy
public static <N extends java.lang.Comparable<N>> ConvexData<N> copy(ExpressionsBasedModel model, PhysicalStore.Factory<N,?> factory)
-
newBuilder
public static ConvexSolver.Builder newBuilder()
-
newBuilder
public static ConvexSolver.Builder newBuilder(Access2D<?> quadratic)
-
newBuilder
public static ConvexSolver.Builder newBuilder(int nbVariables)
-
newSolver
public static ConvexSolver newSolver(ExpressionsBasedModel model)
-
-