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 6c04620 commit cfd85e2Copy full SHA for cfd85e2
1 file changed
linear_programming/simplex.py
@@ -302,7 +302,9 @@ 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
def interpret_tableau(self) -> dict[str, float]:
310
"""Given the final tableau, add the corresponding values of the basic
0 commit comments