From 56546a1b57e787a8a0d2b2feccf3a14e8ed25743 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 17 Feb 2022 10:29:58 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Bhargava Shastry --- libsolutil/LP.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsolutil/LP.cpp b/libsolutil/LP.cpp index 41f1f5d34..a62f38aaa 100644 --- a/libsolutil/LP.cpp +++ b/libsolutil/LP.cpp @@ -277,7 +277,7 @@ pair simplexPhaseI(Tableau _tableau) LPResult result; tie(result, _tableau) = simplexEq(move(_tableau)); - solAssert(result == LPResult::Feasible || result == LPResult::Unbounded, ""); + solAssert(result != LPResult::Infeasible, ""); vector optimum = solutionVector(_tableau); @@ -325,7 +325,7 @@ pair> simplex(vector _constraints, Linear // but it might not be optimal. LPResult result; tie(result, tableau) = simplexEq(move(tableau)); - solAssert(result == LPResult::Feasible || result == LPResult::Unbounded, ""); + solAssert(result != LPResult::Infeasible, ""); return make_pair(result, solutionVector(tableau)); }