Class SimplexStore

    • Field Detail

      • myExcludedLower

        private transient int[] myExcludedLower
      • myExcludedUnbounded

        private transient int[] myExcludedUnbounded
      • myExcludedUpper

        private transient int[] myExcludedUpper
      • myLowerBounds

        private final double[] myLowerBounds
      • myRemainingArtificials

        private int myRemainingArtificials
      • myToStringList

        private final java.util.List<java.lang.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)
    • Method Detail

      • toString

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

        protected void shiftColumn​(int col,
                                   double shift)
      • calculateIteration

        abstract void calculateIteration()
      • 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 java.util.Collection<Equation> generateCutCandidates​(boolean[] integer,
                                                                   NumberContext accuracy,
                                                                   double fractionality,
                                                                   double[] shift)
      • 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.
      • 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 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()
      • update

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

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

        abstract void setupClassicPhase1Objective()