Class SimplexStore

java.lang.Object
org.ojalgo.optimisation.linear.SimplexStore
Direct Known Subclasses:
RevisedStore, SimplexTableau

abstract class SimplexStore extends Object
  • Field Details

    • myExcludedLower

      private transient int[] myExcludedLower
    • myExcludedUnbounded

      private transient int[] myExcludedUnbounded
    • myExcludedUpper

      private transient int[] myExcludedUpper
    • myLowerBounds

      private final double[] myLowerBounds
    • myPartition

      private final EnumPartition<SimplexStore.ColumnState> myPartition
    • myRemainingArtificials

      private int myRemainingArtificials
    • myToStringList

      private final List<String> myToStringList
    • myUpperBounds

      private final double[] myUpperBounds
    • excluded

      final int[] excluded
      excluded == not in the basis
    • included

      final int[] included
      included == in the basis
    • m

      final int m
      The number of constraints (upper, lower and equality)
    • n

      final int n
      The number of variables totally (all kinds)
    • structure

      final LinearStructure structure
  • Constructor Details

  • Method Details

    • newStoreFactory

      static Function<LinearStructure,SimplexStore> newStoreFactory(Optimisation.Options options)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • basis

      private final SimplexStore basis(int index)
    • newSolver

      private <S extends SimplexSolver> S newSolver(BiFunction<Optimisation.Options,SimplexStore,S> constructor, Optimisation.Options options, int... basis)
    • pivot

      protected void pivot(SimplexSolver.IterDescr iteration)
    • shiftColumn

      protected void shiftColumn(int col, double shift)
    • calculateDualDirection

      abstract void calculateDualDirection(SimplexSolver.ExitInfo exit)
    • calculateIteration

      abstract void calculateIteration()
    • calculatePrimalDirection

      abstract void calculatePrimalDirection(SimplexSolver.EnterInfo enter)
    • constraintsBody

      abstract Mutate2D constraintsBody()
      The simplex' constraints body (including the parts corresponding to slack and artificial variables).
    • constraintsRHS

      abstract Mutate1D constraintsRHS()
      The simplex' constraints RHS.
    • copyBasicSolution

      abstract void copyBasicSolution(double[] solution)
    • copyObjective

      abstract void copyObjective()
    • switchObjective

      abstract void switchObjective()
    • countRemainingArtificials

      final int countRemainingArtificials()
      The number of artificial variables in the basis.
    • extractSolution

      final double[] extractSolution()
    • extractValue

      abstract double extractValue()
    • generateCutCandidates

      final Collection<Equation> generateCutCandidates(boolean[] integer, NumberContext accuracy, double fractionality, double[] shift)
    • getColumnState

      final SimplexStore.ColumnState getColumnState(int index)
    • getCost

      abstract double getCost(int i)
    • getCurrentElement

      abstract double getCurrentElement(SimplexSolver.ExitInfo exit, int je)
      The current (tableau) constraint body element.
    • getCurrentElement

      abstract double getCurrentElement(int i, SimplexSolver.EnterInfo enter)
      The current (tableau) constraint body element.
    • getCurrentRHS

      abstract double getCurrentRHS(int i)
      The current (tableau) constraint RHS.
    • getExcludedLower

      final int[] getExcludedLower()
      Indices of columns/variables at their lower bounds.
    • getExcludedUnbounded

      final int[] getExcludedUnbounded()
      Indices of unbounded columns/variables.
    • getExcludedUpper

      final int[] getExcludedUpper()
      Indices of columns/variables at their upper bounds.
    • getInfeasibility

      abstract double getInfeasibility(int i)
    • getLowerBound

      final double getLowerBound(int index)
    • getLowerBounds

      final double[] getLowerBounds()
    • getLowerGap

      final double getLowerGap(int i)
      The "distance" from the current basic value to the lower bound.
    • getRange

      final double getRange(int index)
    • getReducedCost

      abstract double getReducedCost(int je)
    • getUpperBound

      final double getUpperBound(int index)
    • getUpperBounds

      final double[] getUpperBounds()
    • getUpperGap

      final double getUpperGap(int i)
      The "distance" from the current basic value to the upper bound.
    • isArtificial

      final boolean isArtificial(int col)
    • isExcluded

      final boolean isExcluded(int index)
    • isIncluded

      final boolean isIncluded(int index)
    • isNegated

      final boolean isNegated(int j)
    • isPrintable

      final boolean isPrintable()
      The problem is small enough to be explicitly printed/logged – log the entire tableau at each iteration when debugging.
    • isRemainingArtificials

      final boolean isRemainingArtificials()
      Are there any artificial variables in the basis?
    • lower

      final SimplexStore lower(int index)
    • newDualSimplexSolver

      final DualSimplexSolver newDualSimplexSolver(Optimisation.Options options, int... basis)
    • newPhasedSimplexSolver

      final PhasedSimplexSolver newPhasedSimplexSolver(Optimisation.Options options, int... basis)
    • newPrimalSimplexSolver

      final PrimalSimplexSolver newPrimalSimplexSolver(Optimisation.Options options, int... basis)
    • objective

      abstract Mutate1D objective()
      The simplex' objective function.
    • resetBasis

      void resetBasis(int[] newBasis)
      Everything that is not in the basis is set to be in at lower bound.
    • restoreObjective

      abstract void restoreObjective()
    • sliceBodyRow

      abstract Primitive1D sliceBodyRow(int row)
    • sliceDualVariables

      abstract Primitive1D sliceDualVariables()
    • unbounded

      final SimplexStore unbounded(int index)
    • update

      final void update(int exit, int exclEnter)
    • updateBasis

      final void updateBasis(int exit, SimplexStore.ColumnState exitToBound, int enter)
    • updateRange

      boolean updateRange(int index, double lower, double upper)
    • upper

      final SimplexStore upper(int index)
    • setupClassicPhase1Objective

      abstract void setupClassicPhase1Objective()