Skip to content

Commit

Permalink
Fix linear integer solver for non-optimizing problems
Browse files Browse the repository at this point in the history
  • Loading branch information
paultristanwagner committed Mar 6, 2024
1 parent 472e90a commit 7dc927b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ public TheoryResult<LinearConstraint> solve() {
boolean isMinimizationProblem = simplexSolver.isMinimization();

Number localOptimum = null;
LinearTerm objective = simplexSolver.getOriginalObjective().getLeftHandSide();
LinearTerm objective = null;
if (isOptimizationProblem) {
objective = simplexSolver.getOriginalObjective().getLeftHandSide();
}

TheoryResult<LinearConstraint> aResult = solverA.solve();
if (aResult.isUnknown()) {
Expand Down

0 comments on commit 7dc927b

Please sign in to comment.