Package org.ojalgo.optimisation.convex
Class ConvexSolver.Builder
- 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 void
append(java.lang.StringBuilder builder)
protected ConvexSolver
doBuild(Optimisation.Options options)
ConvexSolver.Builder
equalities(Access2D<?> mtrxAE, Access1D<?> mtrxBE)
ConvexSolver.Builder
equality(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.Builder
inequalities(Access2D<?> mtrxAI, Access1D<?> mtrxBI)
ConvexSolver.Builder
inequality(double rhs, double... factors)
ConvexSolver.Builder
linear(double... factors)
Set the linear part of the objective functionConvexSolver.Builder
linear(Access1D<?> factors)
Set the linear part of the objective functionConvexSolver.Builder
objective(int index, double value)
Set one element of the linear part of the objective functionConvexSolver.Builder
objective(int row, int col, double value)
Set one element of the quadratic part of the objective functionConvexSolver.Builder
objective(MatrixStore<?> mtrxQ, MatrixStore<?> mtrxC)
ConvexSolver.Builder
quadratic(Access2D<?> factors)
Set the quadratic part of the objective functionLinearSolver.Builder
toFeasibilityChecker()
Disregard the objective function (set it to zero) and form the dual LP.LinearSolver.Builder
toLinearApproximation()
Approximate at origin (0.0 vector)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.-
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:
equalities
in classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
equality
public ConvexSolver.Builder equality(double rhs, double... factors)
- Overrides:
equality
in classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
getObjective
public ConvexObjectiveFunction<java.lang.Double> getObjective()
- Overrides:
getObjective
in classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
inequalities
public ConvexSolver.Builder inequalities(Access2D<?> mtrxAI, Access1D<?> mtrxBI)
- Overrides:
inequalities
in classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
inequality
public ConvexSolver.Builder inequality(double rhs, double... factors)
- Overrides:
inequality
in 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:
append
in classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
doBuild
protected ConvexSolver doBuild(Optimisation.Options options)
- Specified by:
doBuild
in classGenericSolver.Builder<ConvexSolver.Builder,ConvexSolver>
-
getC
protected PhysicalStore<java.lang.Double> getC()
Linear objective: [C]- Overrides:
getC
in 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]
-
-