Module ojalgo

Class SimplexTableauSolver

  • All Implemented Interfaces:
    Optimisation, Optimisation.Solver, UpdatableSolver

    final class SimplexTableauSolver
    extends LinearSolver
    Classic simplex tableau solver:
    • Primal algorithm
    • 2-phase
    • All variables assumed >=0, and RHS required to be >=0
    • Variable bounds other than >=0 handled like constraints
    • Method Detail

      • sizeOfDual

        static int sizeOfDual​(ConvexData<?> convex)
      • sizeOfPrimal

        static int sizeOfPrimal​(ConvexData<?> convex)
      • fixVariable

        public boolean fixVariable​(int index,
                                   double value)
        Parameters:
        index - The, solver specific, variable index
        value - The value to fix that variable to
        Returns:
        true if fixing is supported and was successful, otherwise false
      • generateCutCandidates

        public final java.util.Collection<Equation> generateCutCandidates​(double fractionality,
                                                                          boolean... integer)
      • updateRange

        public boolean updateRange​(int index,
                                   double lower,
                                   double upper)
        Description copied from interface: UpdatableSolver
        A generalisation of UpdatableSolver.fixVariable(int, double) where the new/updated lower and upper bounds do not need to be equal.
        Parameters:
        index - The, solver specific, variable index
        lower - New lower bound
        upper - New upper bound
        Returns:
        true if updating the range is supported and was successful, otherwise false
      • cleanUpPhase1Artificials

        private void cleanUpPhase1Artificials()
        https://math.stackexchange.com/questions/3254444/artificial-variables-in-two-phase-simplex-method
      • getRowObjective

        private int getRowObjective()
      • infeasibility

        private double infeasibility()
      • isTableauPrintable

        private boolean isTableauPrintable()
      • logDebugTableau

        private void logDebugTableau​(java.lang.String message)
      • phase

        private int phase()
      • value

        private double value()
      • evaluateFunction

        protected double evaluateFunction​(Access1D<?> solution)
      • extractMultipliers

        protected Access1D<?> extractMultipliers()
      • needsAnotherIteration

        protected boolean needsAnotherIteration()
      • validate

        protected boolean validate()
      • findNextPivotCol

        int findNextPivotCol()
      • findNextPivotRow

        int findNextPivotRow()