Merge pull request #5 from Tw1ddle/master

Add missed dualOptimize calls and mistake in dualOptimize method
This commit is contained in:
Alex Birkett 2016-02-01 20:55:11 +01:00
commit 7b2f8cacf2
1 changed files with 3 additions and 1 deletions

View File

@ -246,6 +246,7 @@ public class Solver {
if(row.add(-delta) < 0.0){ if(row.add(-delta) < 0.0){
infeasibleRows.add(info.tag.marker); infeasibleRows.add(info.tag.marker);
} }
dualOptimize();
return; return;
} }
@ -254,6 +255,7 @@ public class Solver {
if(row.add(delta) < 0.0){ if(row.add(delta) < 0.0){
infeasibleRows.add(info.tag.other); infeasibleRows.add(info.tag.other);
} }
dualOptimize();
return; return;
} }
@ -528,7 +530,7 @@ public class Solver {
if(entering.getType() == Symbol.Type.INVALID){ if(entering.getType() == Symbol.Type.INVALID){
throw new InternalSolverError("internal solver error"); throw new InternalSolverError("internal solver error");
} }
rows.remove(entering); rows.remove(leaving);
row.solveFor(leaving, entering); row.solveFor(leaving, entering);
substitute(entering, row); substitute(entering, row);
rows.put(entering, row); rows.put(entering, row);