- java.lang.Object
-
- org.ojalgo.optimisation.GenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
- org.ojalgo.optimisation.convex.ConvexSolver.Builder
-
- All Implemented Interfaces:
Optimisation,Optimisation.ProblemStructure
- Enclosing class:
- ConvexSolver
public static final class ConvexSolver.Builder extends GenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
-
Nested Class Summary
-
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 inherited from interface org.ojalgo.optimisation.Optimisation.ProblemStructure
DEBUG
-
-
Constructor Summary
Constructors Constructor Description Builder()Builder(int nbVariables)Builder(MatrixStore<java.lang.Double>[] matrices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappend(java.lang.StringBuilder builder)protected ConvexSolverdoBuild(Optimisation.Options options)ConvexSolver.Builderequalities(Access2D<?> mtrxAE, Access1D<?> mtrxBE)ConvexSolver.Builderequality(double rhs, double... factors)protected PhysicalStore<java.lang.Double>getC()Linear objective: [C]protected <N extends java.lang.Comparable<N>>
ConvexData<N>getConvexData(PhysicalStore.Factory<N,?> factory)ConvexObjectiveFunction<java.lang.Double>getObjective()protected PhysicalStore<java.lang.Double>getQ()Quadratic objective: [Q]ConvexSolver.Builderinequalities(Access2D<?> mtrxAI, Access1D<?> mtrxBI)ConvexSolver.Builderinequality(double rhs, double... factors)ConvexSolver.Builderlinear(double... factors)Set the linear part of the objective functionConvexSolver.Builderlinear(Access1D<?> factors)Set the linear part of the objective functionConvexSolver.Builderobjective(int index, double value)Set one element of the linear part of the objective functionConvexSolver.Builderobjective(int row, int col, double value)Set one element of the quadratic part of the objective functionConvexSolver.Builderobjective(MatrixStore<?> mtrxQ, MatrixStore<?> mtrxC)ConvexSolver.Builderquadratic(Access2D<?> factors)Set the quadratic part of the objective functionLinearSolver.BuildertoFeasibilityChecker()Disregard the objective function (set it to zero) and form the dual LP.LinearSolver.BuildertoLinearApproximation()Approximate at origin (0.0 vector)LinearSolver.BuildertoLinearApproximation(Access1D<java.lang.Double> point)Linearise the objective function (at the specified point) and duplicate all variables to handle the (potential) positive and negative parts separately.-
Methods inherited from class org.ojalgo.optimisation.GenericSolver.Builder
append, build, build, countAdditionalConstraints, countEqualityConstraints, countInequalityConstraints, countVariables, doCountVariables, getAE, getAE, getAE, getAI, getAI, getAI, getBE, getBE, getBI, getBI, getFactory, getLowerBounds, getObjective, getRowsAE, getRowsAI, getUpperBounds, reset, setNumberOfVariables, setObjective, solve, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ojalgo.optimisation.Optimisation.ProblemStructure
countConstraints
-
-
-
-
Constructor Detail
-
Builder
Builder()
-
Builder
Builder(int nbVariables)
-
Builder
Builder(MatrixStore<java.lang.Double>[] matrices)
-
-
Method Detail
-
equalities
public ConvexSolver.Builder equalities(Access2D<?> mtrxAE, Access1D<?> mtrxBE)
- Overrides:
equalitiesin classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
equality
public ConvexSolver.Builder equality(double rhs, double... factors)
- Overrides:
equalityin classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
getObjective
public ConvexObjectiveFunction<java.lang.Double> getObjective()
- Overrides:
getObjectivein classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
inequalities
public ConvexSolver.Builder inequalities(Access2D<?> mtrxAI, Access1D<?> mtrxBI)
- Overrides:
inequalitiesin classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
inequality
public ConvexSolver.Builder inequality(double rhs, double... factors)
- Overrides:
inequalityin classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
linear
public ConvexSolver.Builder linear(Access1D<?> factors)
Set the linear part of the objective function
-
linear
public ConvexSolver.Builder linear(double... factors)
Set the linear part of the objective function
-
objective
public ConvexSolver.Builder objective(int index, double value)
Set one element of the linear part of the objective function
-
objective
public ConvexSolver.Builder objective(int row, int col, double value)
Set one element of the quadratic part of the objective function
-
objective
public ConvexSolver.Builder objective(MatrixStore<?> mtrxQ, MatrixStore<?> mtrxC)
-
quadratic
public ConvexSolver.Builder quadratic(Access2D<?> factors)
Set the quadratic part of the objective function
-
toFeasibilityChecker
public LinearSolver.Builder toFeasibilityChecker()
Disregard the objective function (set it to zero) and form the dual LP.
-
toLinearApproximation
public LinearSolver.Builder toLinearApproximation()
Approximate at origin (0.0 vector)- See Also:
toLinearApproximation(Access1D)
-
toLinearApproximation
public LinearSolver.Builder toLinearApproximation(Access1D<java.lang.Double> point)
Linearise the objective function (at the specified point) and duplicate all variables to handle the (potential) positive and negative parts separately.
-
append
protected void append(java.lang.StringBuilder builder)
- Overrides:
appendin classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
doBuild
protected ConvexSolver doBuild(Optimisation.Options options)
- Specified by:
doBuildin classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
getC
protected PhysicalStore<java.lang.Double> getC()
Linear objective: [C]- Overrides:
getCin classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
getConvexData
protected <N extends java.lang.Comparable<N>> ConvexData<N> getConvexData(PhysicalStore.Factory<N,?> factory)
-
getQ
protected PhysicalStore<java.lang.Double> getQ()
Quadratic objective: [Q]
-
-