Skip to content

Commit 21b0795

Browse files
authored
Update simplex.py
1 parent f4c29f4 commit 21b0795

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

linear_programming/simplex.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,11 @@ def run_simplex(self) -> dict[Any, Any]:
302302
self.tableau = self.change_stage()
303303
else:
304304
self.tableau = self.pivot(row_idx, col_idx)
305-
raise ValueError(
305+
message = (
306306
f"Simplex did not converge within {Tableau.maxiter} iterations. "
307307
"The problem may be cycling or unbounded."
308308
)
309+
raise ValueError(message)
309310

310311
def interpret_tableau(self) -> dict[str, float]:
311312
"""Given the final tableau, add the corresponding values of the basic

0 commit comments

Comments
 (0)