Index: SimplexTableau.java =================================================================== --- SimplexTableau.java (revision 781141) +++ SimplexTableau.java (working copy) @@ -272,13 +272,13 @@ private Integer getBasicRow(final int col) { Integer row = null; for (int i = getNumObjectiveFunctions(); i < getHeight(); i++) { - if (!MathUtils.equals(getEntry(i, col), 0.0, epsilon)) { - if (row == null) { - row = i; - } else { - return null; - } - } + if (MathUtils.equals(getEntry(i, col), 1.0, epsilon) && (row == null)) { + row = i; + } else if (MathUtils.equals(getEntry(i, col), 0.0, epsilon)) { + continue; + } else { + return null; + } } return row; }