Feature description
The run_simplex() method in linear_programming/simplex.py silently returns an empty dict {} when the maximum iteration limit (maxiter=100) is reached, making it impossible for callers to distinguish between a cycling problem and an actual empty solution.
Suggested improvement:
Replace the silent return {} with a descriptive ValueError:
raise ValueError(
f"Simplex did not converge within {Tableau.maxiter} iterations. "
"The problem may be cycling or unbounded."
)
This would make debugging significantly easier for users of this module.
Feature description
The run_simplex() method in linear_programming/simplex.py silently returns an empty dict {} when the maximum iteration limit (maxiter=100) is reached, making it impossible for callers to distinguish between a cycling problem and an actual empty solution.
Suggested improvement:
Replace the silent return {} with a descriptive ValueError:
raise ValueError(
f"Simplex did not converge within {Tableau.maxiter} iterations. "
"The problem may be cycling or unbounded."
)
This would make debugging significantly easier for users of this module.