Packages

c

scalation.maxima

RevisedSimplex

class RevisedSimplex extends Error

The RevisedSimplex class solves Linear Programming (LP) problems using the Revised Simplex Algorithm. Given a constraint matrix 'a', constant vector 'b' and cost vector 'c', find values for the solution/decision vector 'x' that maximize the objective function 'f(x)', while satisfying all of the constraints, i.e.,

maximize f(x) = c x subject to a x <= b, x >= 0

The revised algorithm has benefits over the Simplex Algorithm (less memory and reduced chance of round off errors).

See also

math.uc.edu/~halpern/Linear.progr.folder/Handouts.lp.02/Revisedsimplex.pdf

Linear Supertypes
Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RevisedSimplex
  2. Error
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RevisedSimplex(a: MatrixD, b: VectorD, c: VectorD, x_B: Array[Int] = null)

    a

    the constraint matrix

    b

    the constant/limit vector

    c

    the cost/revenue vector

    x_B

    the initial basis (set of indices where x_i is in the basis)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. def dual: VectoD

    Return the dual solution vector 'y'.

    Return the dual solution vector 'y'. FIX

  7. def entering(): Int

    Find the best variable 'x_l' to enter the basis.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def leaving(l: Int): Int

    Find the best variable 'x_k' to leave the basis given that 'x_l' is entering.

    Find the best variable 'x_k' to leave the basis given that 'x_l' is entering.

    l

    the variable chosen to enter the basis

  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def objValue(x: VectorD): Double

    Return the optimal objective function value 'f(x) = c x'.

    Return the optimal objective function value 'f(x) = c x'.

    x

    the primal solution vector

  19. def pivot(k: Int, l: Int): Unit

    Pivot by replacing 'x_k' with 'x_l' in the basis.

    Pivot by replacing 'x_k' with 'x_l' in the basis. Update 'b_inv',' b_' and 'c_'.

    k

    the leaving variable

    l

    the entering variable

  20. def primal: VectorD

    Return the primal solution vector 'x'.

  21. def setBasis(j: Int = N, l: Int = M): Array[Int]

    There are 'M+N' variables, 'N' decision and 'M' slack variables, of which, for each iteration, M are chosen for a Basic Feasible Solution (BFS).

    There are 'M+N' variables, 'N' decision and 'M' slack variables, of which, for each iteration, M are chosen for a Basic Feasible Solution (BFS). The the variables not in the basis are set to zero. Setting 'j' to 'N' will start with the slack variables in the basis (only works if 'b >= 0').

    j

    the offset to start the basis

    l

    the size of the basis

  22. def showTableau(): Unit

    Show the current revised tableau displaying the basis, 'b_inv', 'b_', 'c_'.

  23. def solve(): (VectorD, Double)

    Solve a Linear Programming (LP) problem using the Revised Simplex Algorithm.

    Solve a Linear Programming (LP) problem using the Revised Simplex Algorithm. Iteratively pivot until there an optimal solution is found or it is determined that the solution is unbounded.

  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. def unbounded(u: VectoD): Boolean

    Determine whether 'u <= 0.0', i.e., the solution is unbounded.

    Determine whether 'u <= 0.0', i.e., the solution is unbounded.

    u

    the ?? vector FIX

  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. var x_B: Array[Int]

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped