Skip to content

Commit

Permalink
Forgot to include a test for degen before printing soln is degn
Browse files Browse the repository at this point in the history
  • Loading branch information
fusion809 committed Nov 18, 2020
1 parent d56c852 commit 6007a10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion showSolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ function checkForAltSol(A, b, cj, x, xB, zmn, zc, sign, objVarName) {
function checkForDegn(b, xB) {
// Formatting details for subscripts of degenerate basis variable.
var format = {isBold: false, isRow: false, isLeftArrow: false, isDownArrow: false};
tempStr += "Solution is permanently degenerate in ";
var loc = zeroIndices(b);
var noOfZeros = loc.length;
if (noOfZeros > 0) {
tempStr += "Solution is permanently degenerate in ";
}

// Loop through b, look for zero entry and print degeneracy message
for (let i = 0 ; i < noOfZeros; i++) {
Expand Down

0 comments on commit 6007a10

Please sign in to comment.