Class SimplexSolver

    • Field Detail

      • mySolutionShift

        private final double[] mySolutionShift
      • myValueShift

        private double myValueShift
    • Method Detail

      • 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
      • extractMultipliers

        private Access1D<?> extractMultipliers()
      • extractSolution

        private double[] extractSolution()
      • extractValue

        private double extractValue()
      • getLowerBound

        private double getLowerBound​(int index)
      • getLowerBounds

        private double[] getLowerBounds()
      • getUpperBound

        private double getUpperBound​(int index)
      • getUpperBounds

        private double[] getUpperBounds()
      • logCurrentState

        private void logCurrentState()
      • initiatePhase1

        final void initiatePhase1()
      • isDualFeasible

        final boolean isDualFeasible()
      • isPrimalFeasible

        final boolean isPrimalFeasible()
      • setup

        abstract void setup​(SimplexStore simplex)
        • Determine if non-basic variables are at their lower or upper bound (or if they are unbounded)
        • Shift ranges/bounds so that (one of) the bound(s) is at zero
        • Assumes that the ranges/bounds of basic variables are already defined this way.
      • shift

        final void shift​(int index,
                         double shift,
                         double weight)
      • switchToPhase2

        void switchToPhase2()