Module ojalgo

Class SimplexStore

    • Field Detail

      • myLowerBounds

        private final double[] myLowerBounds
      • myRemainingArtificials

        private int myRemainingArtificials
      • myToStringList

        private final java.util.List<java.lang.String> myToStringList
      • myUpperBounds

        private final double[] myUpperBounds
      • edgeWeights

        final double[] edgeWeights
        Either the primal or dual devex edge weights, depending on the algorithm used. Sized so that it can hold either.
      • 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)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • shiftColumn

        protected void shiftColumn​(int col,
                                   double shift)
      • 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)
      • countRemainingArtificials

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

        final double[] extractSolution()
      • extractValue

        abstract double extractValue()
      • generateCutCandidates

        final java.util.Collection<Equation> generateCutCandidates​(boolean[] integer,
                                                                   NumberContext accuracy,
                                                                   double fractionality,
                                                                   double[] shift)
        When SimplexSolver is used as node solver for IntegerSolver this method generates cut candidates.
      • 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.
      • 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.
      • 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?
      • objective

        abstract Mutate1D objective()
        The objective function.
      • phase1

        abstract <T extends Mutate1D & Access1D<java.lang.Double>> T phase1()
        The phase-1 objective function.
      • prepareToIterate

        abstract void prepareToIterate()
      • removePhase1

        abstract void removePhase1()
      • resetBasis

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

        void resetEdgeWeights()
      • setupClassicPhase1Objective

        abstract void setupClassicPhase1Objective()
      • sliceBodyRow

        abstract Primitive1D sliceBodyRow​(int row)
      • sliceDualVariables

        abstract Primitive1D sliceDualVariables()
      • update

        final void update​(int exit,
                          int exclEnter)
      • updateDualEdgeWeights

        abstract void updateDualEdgeWeights​(SimplexSolver.IterDescr iteration)
        Update edge weights for basic (included) variables.
      • updatePrimalEdgeWeights

        abstract void updatePrimalEdgeWeights​(SimplexSolver.IterDescr iteration)
        Update edge weights for non-basic (excluded) variables.
      • updateRange

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