Class TableauCutGenerator

java.lang.Object
org.ojalgo.optimisation.linear.TableauCutGenerator

abstract class TableauCutGenerator extends Object
  • Field Details

  • Constructor Details

    • TableauCutGenerator

      TableauCutGenerator()
  • Method Details

    • fraction

      private static double fraction(double value)
    • isFractionalEnough

      private static boolean isFractionalEnough(double value, double fraction, double away)
    • doGomory

      static Equation doGomory(Primitive1D body, int index, double rhs, double fractionality)
      Calculates a Gomory cut – all variables must be integer.
      Parameters:
      body - Simplex tableau row (excluding the RHS column)
      index - The pivot index of the returned equation. Otherwise not used in the generation.
      rhs - The right hand side value of the row – the value that should be an integer.
      fractionality - The fractionality threshold. If the fractional part of the right hand side is less than this value, no cut is generated.
      Returns:
      A Gomory cut equation, or null if no cut was generated.
    • doGomoryMixedInteger

      static Equation doGomoryMixedInteger(Primitive1D body, int index, double rhs, boolean[] integer)
      Assumes all variables positive [0,∞). Further, this method assumes:
      • body.length == integer.length
      • body[index] == 1.0
      • integer[index] == true
      • rhs > 0.0
      Parameters:
      body - The equation body.
      index - The index of the variable that should integer valued, but is not.
      rhs - The equation right hand side – the value of the variable that should be integer, but is not.
      integer - Which of the variables are integer?
      Returns:
      A GMI cut
    • doGomoryMixedInteger

      static Equation doGomoryMixedInteger(Primitive1D body, int index, double rhs, double fractionality, int[] excluded, boolean[] integer)
    • doGomoryMixedInteger

      static Equation doGomoryMixedInteger(Primitive1D body, int index, double rhs, double fractionality, int[] excluded, boolean[] integers, double[] lowers, double[] uppers, double[] shifts)
      Calculates a Gomory Mixed Integer (GMI) cut.
      Parameters:
      body - The equation body (simplex tableau row). The tableau is assumed to be in an optimal (phase 2) state. Any reference to artificial variables will be ignored.
      index - Index (tableau column) of the variable to be cut. A basic variable that should be integer, but is not. The body value at this index must be integer (not 0) and if this actually is from a tableau row it should be (will be) 1.
      rhs - The equation right hand side value – the value that should be an integer.
      fractionality - The fractionality threshold.
      excluded - Indices of the non-basic variables (excluded from the basis).
      integers - Which variables are integer? There must be one element for each variable - the length of this array defines the number of variables.
      lowers - Variables' lower bounds.
      uppers - Variables' upper bounds.
      shifts - The variable bounds may be shifted from their original values.
      Returns:
      A GMI cut equation, or null if no cut was generated.