SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.constrained.linearprogramming.simplex.pivoting
Class NaiveRule

java.lang.Object
  extended by com.numericalmethod.suanshu.optimization.constrained.linearprogramming.simplex.pivoting.NaiveRule
All Implemented Interfaces:
SimplexPivoting
Direct Known Subclasses:
SmallestSubscriptRule

public class NaiveRule
extends java.lang.Object
implements SimplexPivoting

This is the rule found on p. 49.

One simple rule is to choose the column with the most negative reduced cost. This gives the biggest decrease in z per unit increase in the entering variable. However, since we cannot tell how much we can increase the entering variable until we perform the ratio test, it is not generally true that this choice leads to the best decrease in z on this step, among all possible pivot columns.

It does not prevent cycling, and should be used only for testing purpose.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.optimization.constrained.linearprogramming.simplex.pivoting.SimplexPivoting
SimplexPivoting.Pivot
 
Constructor Summary
NaiveRule()
           
 
Method Summary
 SimplexPivoting.Pivot findPivot(Tableau table)
          Compute the next swapping indices.
 int pricing(Tableau table)
          pivot column selection (pricing): We choose the column with most negative reduced cost (last entry in the column).
 int ratioTest(Tableau table, int s)
          pivot row selection (Ratio test): The pivot row is the smallest basic variable index, r, such that row r satisfies -h(r) / H(r,s) = min {-h(i) / H(i,s) | H(i,s) < 0}
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NaiveRule

public NaiveRule()
Method Detail

pricing

public int pricing(Tableau table)
pivot column selection (pricing): We choose the column with most negative reduced cost (last entry in the column).

Specified by:
pricing in interface SimplexPivoting
Parameters:
table -
Returns:
the pivot column

ratioTest

public int ratioTest(Tableau table,
                     int s)
pivot row selection (Ratio test): The pivot row is the smallest basic variable index, r, such that row r satisfies -h(r) / H(r,s) = min {-h(i) / H(i,s) | H(i,s) < 0}

Specified by:
ratioTest in interface SimplexPivoting
Parameters:
table -
s -
Returns:
the pivot row

findPivot

public SimplexPivoting.Pivot findPivot(Tableau table)
                                throws LpProblem.Unbounded
Description copied from interface: SimplexPivoting
Compute the next swapping indices.

Specified by:
findPivot in interface SimplexPivoting
Returns:
a Pivot for column-row swapping; null if table already optimal
Throws:
LpProblem.Unbounded

SuanShu, a Java numerical and statistical library

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