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 f4c29f4 commit 21b0795Copy full SHA for 21b0795
1 file changed
linear_programming/simplex.py
@@ -302,10 +302,11 @@ 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
- raise ValueError(
+ message = (
306
f"Simplex did not converge within {Tableau.maxiter} iterations. "
307
"The problem may be cycling or unbounded."
308
)
309
+ raise ValueError(message)
310
311
def interpret_tableau(self) -> dict[str, float]:
312
"""Given the final tableau, add the corresponding values of the basic
0 commit comments