SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.constrained.linearprogramming.simplex.standard
Class Phase2ByFerrisMangasarianWright

java.lang.Object
  extended by com.numericalmethod.suanshu.optimization.constrained.linearprogramming.simplex.standard.Phase2ByFerrisMangasarianWright
All Implemented Interfaces:
LpSolver

public class Phase2ByFerrisMangasarianWright
extends java.lang.Object
implements LpSolver

This implements Algorithm 3.1 in the reference.

See Also:
"Michael C. Ferris, Olvi L. Mangasarian, Stephen J. Wright. "Linear Programming with MATLAB," Algorithm 3.1, Section 3, The Simplex Method."

Constructor Summary
Phase2ByFerrisMangasarianWright(Tableau table)
          Solve a linear programming problem using the Phase 2 algorithm in Ferris, Mangasarian & Wright.
Phase2ByFerrisMangasarianWright(Tableau table, SimplexPivoting pivoting)
          Solve a linear programming problem using the Phase 2 algorithm in Ferris, Mangasarian & Wright.
 
Method Summary
 Tableau getResultantTableau()
          Get a copy of the Tableau after the solve operation.
 boolean isUnbounded()
           
 int lambdaCol()
          Get the column index for which there is no row that passes the ratio test.
 LpSolution solve()
          Solve the Linear Programming (LP) problem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Phase2ByFerrisMangasarianWright

public Phase2ByFerrisMangasarianWright(Tableau table,
                                       SimplexPivoting pivoting)
Solve a linear programming problem using the Phase 2 algorithm in Ferris, Mangasarian & Wright.

Parameters:
table - the initial feasible tableau generated in the phase 1
pivoting - the pivoting rule

Phase2ByFerrisMangasarianWright

public Phase2ByFerrisMangasarianWright(Tableau table)
Solve a linear programming problem using the Phase 2 algorithm in Ferris, Mangasarian & Wright.

Parameters:
table - the initial feasible tableau generated in the phase 1
Method Detail

solve

public LpSolution solve()
                 throws LpProblem.Infeasible
Description copied from interface: LpSolver
Solve the Linear Programming (LP) problem.

Specified by:
solve in interface LpSolver
Returns:
a (partial) solution
Throws:
LpProblem.Infeasible

isUnbounded

public boolean isUnbounded()

lambdaCol

public int lambdaCol()
Description copied from interface: LpSolver
Get the column index for which there is no row that passes the ratio test. That is, the problem is unbounded.

To check whether a problem is bounded, we can do:

 lambdaCol() == 0;
 

Specified by:
lambdaCol in interface LpSolver
Returns:
0 if LP problem is bounded; +ve column index otherwise

getResultantTableau

public Tableau getResultantTableau()
Description copied from interface: LpSolver
Get a copy of the Tableau after the solve operation. The table can be passed to other operations, e.g., other LpSolver, for further processing.

Specified by:
getResultantTableau in interface LpSolver
Returns:
a Tableau as a result of the solve operation

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.