We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 791deb4 commit 8af7709Copy full SHA for 8af7709
1 file changed
linear_programming/simplex.py
@@ -302,7 +302,10 @@ def run_simplex(self) -> dict[Any, Any]:
302
self.tableau = self.change_stage()
303
else:
304
self.tableau = self.pivot(row_idx, col_idx)
305
- return {}
+ raise ValueError(
306
+ f"Simplex did not converge within {Tableau.maxiter} iterations. "
307
+ "The problem may be cycling or unbounded."
308
+ )
309
310
def interpret_tableau(self) -> dict[str, float]:
311
"""Given the final tableau, add the corresponding values of the basic
0 commit comments