Package org.ojalgo.optimisation.linear
Class SimplexTableau
java.lang.Object
org.ojalgo.optimisation.linear.SimplexStore
org.ojalgo.optimisation.linear.SimplexTableau
- All Implemented Interfaces:
Access1D<Double>
,Access2D<Double>
,Mutate1D
,Mutate2D
,Structure1D
,Structure2D
- Direct Known Subclasses:
DenseTableau
,SparseTableau
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ojalgo.optimisation.linear.SimplexStore
SimplexStore.ColumnState
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access2D
Access2D.Aggregatable<N extends Comparable<N>>, Access2D.Collectable<N extends Comparable<N>,
R extends Mutate2D>, Access2D.ColumnView<N extends Comparable<N>>, Access2D.ElementView<N extends Comparable<N>>, Access2D.RowView<N extends Comparable<N>>, Access2D.SelectionView<N extends Comparable<N>>, Access2D.Sliceable<N extends Comparable<N>>, Access2D.Visitable<N extends Comparable<N>> Nested classes/interfaces inherited from interface org.ojalgo.structure.Mutate1D
Mutate1D.Sortable
Nested classes/interfaces inherited from interface org.ojalgo.structure.Mutate2D
Mutate2D.Exchangeable, Mutate2D.Fillable<N extends Comparable<N>>, Mutate2D.Mixable<N extends Comparable<N>>, Mutate2D.Modifiable<N extends Comparable<N>>, Mutate2D.ModifiableReceiver<N extends Comparable<N>>, Mutate2D.Receiver<N extends Comparable<N>>
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S extends Structure1D,
B extends Structure1D.Logical<S, B>>, Structure1D.LongIndex, Structure1D.LoopCallback Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure2D
Structure2D.IntRowColumn, Structure2D.Logical<S extends Structure2D,
B extends Structure2D.Logical<S, B>>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.Reshapable, Structure2D.RowColumnKey<R, C>, Structure2D.RowColumnMapper<R, C> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) final void
(package private) final void
(package private) final void
(package private) final Primitive2D
The area of the tableau corresponding to the constraints' body.(package private) final Primitive1D
The area of the tableau corresponding to the constraints' RHS.protected abstract void
doPivot
(int row, int col) Perform the pivot operation on the tableau – only.(package private) final int
findNextPivotColumn
(Access1D<Double> auxiliaryRow, Access1D<Double> objectiveRow) (package private) abstract boolean
fixVariable
(int index, double value) (package private) final Collection
<Equation> generateCutCandidates
(boolean[] integer, NumberContext accuracy, double fractionality) Simplified version ofSimplexStore.generateCutCandidates(boolean[], NumberContext, double, double[])
.final Double
get
(long row, long col) (package private) final double
getCost
(int j) (package private) final double
getCurrentElement
(int i, SimplexSolver.EnterInfo enter) The current (tableau) constraint body element.(package private) final double
getCurrentElement
(SimplexSolver.ExitInfo exit, int je) The current (tableau) constraint body element.(package private) final double
getCurrentRHS
(int i) The current (tableau) constraint RHS.(package private) abstract double
(package private) final double
getInfeasibility
(int i) (package private) final double
getReducedCost
(int je) (package private) abstract double
getValue()
(package private) abstract Primitive2D
(package private) abstract Primitive1D
(package private) abstract Primitive1D
(package private) final SimplexTableauSolver
newSimplexTableauSolver
(Optimisation.Options optimisationOptions) (package private) static Function
<LinearStructure, SimplexTableau> newTableauFactory
(Optimisation.Options options) (package private) final Primitive1D
The area of the tableau corresponding to the objective function.protected final void
pivot
(SimplexSolver.IterDescr iteration) protected final void
pivot
(SimplexTableauSolver.IterationPoint iteration) (package private) final void
resetBasis
(int[] newBasis) Everything that is not in the basis is set to be in at lower bound.final void
set
(long row, long col, Comparable<?> value) (package private) final void
(package private) final Primitive1D
sliceBodyColumn
(int col) (package private) final Primitive1D
sliceBodyRow
(int row) (package private) final Primitive1D
(package private) final Primitive1D
(package private) final Primitive1D
sliceTableauColumn
(int col) (package private) final Primitive1D
sliceTableauRow
(int row) toString()
(package private) final double
value
(boolean phase1) The current, phase 1 or 2, objective function valueMethods inherited from class org.ojalgo.optimisation.linear.SimplexStore
copyBasicSolution, copyObjective, countRemainingArtificials, extractSolution, extractValue, generateCutCandidates, getColumnState, getExcludedLower, getExcludedUnbounded, getExcludedUpper, getLowerBound, getLowerBounds, getLowerGap, getRange, getUpperBound, getUpperBounds, getUpperGap, isArtificial, isExcluded, isIncluded, isNegated, isPrintable, isRemainingArtificials, lower, newDualSimplexSolver, newPhasedSimplexSolver, newPrimalSimplexSolver, newStoreFactory, restoreObjective, shiftColumn, switchObjective, unbounded, update, updateBasis, updateRange, upper
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ojalgo.structure.Access1D
asCollectable1D, asKeyed1D, axpy, dot, select, supplyTo, toRawCopy1D
Methods inherited from interface org.ojalgo.structure.Access2D
asCollectable2D, asKeyed2D, byteValue, byteValue, byteValue, byteValue, columns, columns, columns, doubleValue, doubleValue, doubleValue, doubleValue, elements, floatValue, floatValue, floatValue, floatValue, get, intValue, intValue, intValue, intValue, longValue, longValue, longValue, longValue, nonzeros, rows, rows, rows, select, select, shortValue, shortValue, shortValue, shortValue, toRawCopy2D
Methods inherited from interface org.ojalgo.structure.Mutate2D
set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set
Methods inherited from interface org.ojalgo.structure.Structure2D
count, countColumns, countRows, firstInColumn, firstInRow, getColDim, getMaxDim, getMinDim, getRowDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow, size
-
Field Details
-
myConstraintsBody
-
myConstraintsRHS
-
myObjective
-
-
Constructor Details
-
SimplexTableau
SimplexTableau(LinearStructure linearStructure)
-
-
Method Details
-
newTableauFactory
-
get
-
set
-
toString
- Overrides:
toString
in classSimplexStore
-
doPivot
protected abstract void doPivot(int row, int col) Perform the pivot operation on the tableau – only. Various auxiliary bookkeeping should NOT be done here. -
pivot
- Overrides:
pivot
in classSimplexStore
-
pivot
-
calculateDualDirection
- Specified by:
calculateDualDirection
in classSimplexStore
-
calculateIteration
final void calculateIteration()- Specified by:
calculateIteration
in classSimplexStore
-
calculatePrimalDirection
- Specified by:
calculatePrimalDirection
in classSimplexStore
-
constraintsBody
The area of the tableau corresponding to the constraints' body.- Specified by:
constraintsBody
in classSimplexStore
- See Also:
-
constraintsRHS
The area of the tableau corresponding to the constraints' RHS.- Specified by:
constraintsRHS
in classSimplexStore
- See Also:
-
findNextPivotColumn
-
fixVariable
abstract boolean fixVariable(int index, double value) -
generateCutCandidates
final Collection<Equation> generateCutCandidates(boolean[] integer, NumberContext accuracy, double fractionality) Simplified version ofSimplexStore.generateCutCandidates(boolean[], NumberContext, double, double[])
. -
getCost
final double getCost(int j) - Specified by:
getCost
in classSimplexStore
-
getCurrentElement
Description copied from class:SimplexStore
The current (tableau) constraint body element.- Specified by:
getCurrentElement
in classSimplexStore
-
getCurrentElement
Description copied from class:SimplexStore
The current (tableau) constraint body element.- Specified by:
getCurrentElement
in classSimplexStore
-
getCurrentRHS
final double getCurrentRHS(int i) Description copied from class:SimplexStore
The current (tableau) constraint RHS.- Specified by:
getCurrentRHS
in classSimplexStore
-
getInfeasibility
abstract double getInfeasibility()- Returns:
- The phase 1 objective function value
-
getInfeasibility
final double getInfeasibility(int i) - Specified by:
getInfeasibility
in classSimplexStore
-
getReducedCost
final double getReducedCost(int je) - Specified by:
getReducedCost
in classSimplexStore
-
getValue
abstract double getValue()- Returns:
- The (phase 2) objective function value
-
newConstraintsBody
-
newConstraintsRHS
-
newObjective
-
newSimplexTableauSolver
-
objective
The area of the tableau corresponding to the objective function.- Specified by:
objective
in classSimplexStore
- See Also:
-
resetBasis
final void resetBasis(int[] newBasis) Description copied from class:SimplexStore
Everything that is not in the basis is set to be in at lower bound.- Overrides:
resetBasis
in classSimplexStore
-
setupClassicPhase1Objective
final void setupClassicPhase1Objective()- Specified by:
setupClassicPhase1Objective
in classSimplexStore
-
sliceBodyColumn
-
sliceBodyRow
- Specified by:
sliceBodyRow
in classSimplexStore
-
sliceConstraintsRHS
-
sliceDualVariables
- Specified by:
sliceDualVariables
in classSimplexStore
- Returns:
- An array of the dual variable values (of the original problem, never phase 1).
-
sliceTableauColumn
-
sliceTableauRow
-
value
final double value(boolean phase1) The current, phase 1 or 2, objective function value
-