Skip to content

bug: run_simplex() returns empty dict {} on max iteration instead of raising an informative error #14584

@jgohel9902

Description

@jgohel9902

Repository commit

791deb4

Python version (python --version)

Python 3.12.10

Dependencies version (pip freeze)

alembic==1.18.4
altair==5.5.0
annotated-doc==0.0.4
annotated-types==0.7.0
anyio==4.13.0
attrs==25.4.0
bcrypt==5.0.0
blinker==1.9.0
cachetools==5.5.2
certifi==2025.11.12
charset-normalizer==3.4.4
click==8.3.1
colorama==0.4.6
contourpy==1.3.3
cycler==0.12.1
distro==1.9.0
ecdsa==0.19.2
fastapi==0.135.3
fonttools==4.61.0
gitdb==4.0.12
GitPython==3.1.45
greenlet==3.4.0
groq==1.1.2
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
idna==3.11
importlib_metadata==7.2.1
iniconfig==2.3.0
Jinja2==3.1.6
joblib==1.4.2
jsonschema==4.25.1
jsonschema-specifications==2025.9.1
kiwisolver==1.4.9
Mako==1.3.10
markdown-it-py==4.0.0
MarkupSafe==3.0.3
matplotlib==3.10.7
mdurl==0.1.2
narwhals==2.12.0
nltk==3.9.2
numpy==1.26.4
packaging==23.2
pandas==2.2.3
pillow==10.4.0
pip==25.3
pluggy==1.6.0
protobuf==4.25.8
psycopg2-binary==2.9.11
pyarrow==21.0.0
pyasn1==0.6.3
pydantic==2.13.0
pydantic_core==2.46.0
pydeck==0.9.1
Pygments==2.19.2
pyodbc==5.3.0
pyparsing==3.2.5
pytest==9.0.3
pytest-asyncio==1.3.0
python-dateutil==2.9.0.post0
python-jose==3.5.0
python-multipart==0.0.26
pytz==2025.2
referencing==0.37.0
regex==2025.11.3
requests==2.32.5
rich==13.9.4
rpds-py==0.29.0
rsa==4.9.1
scikit-learn==1.5.2
scipy==1.16.3
six==1.17.0
smmap==5.0.2
sniffio==1.3.1
SQLAlchemy==2.0.49
starlette==1.0.0
streamlit==1.31.0
tenacity==8.5.0
textblob==0.19.0
threadpoolctl==3.6.0
toml==0.10.2
tornado==6.5.2
tqdm==4.67.1
typing-inspection==0.4.2
typing_extensions==4.15.0
tzdata==2025.2
tzlocal==5.3.1
urllib3==2.5.0
uvicorn==0.44.0
validators==0.35.0
watchdog==6.0.0
zipp==3.23.0

Expected behavior

run_simplex() should raise a descriptive ValueError when the maximum iteration limit is reached, so the caller can distinguish between a cycling problem and an actual empty solution.

Example:
raise ValueError(
f"Simplex did not converge within {Tableau.maxiter} iterations. "
"The problem may be cycling or unbounded."
)

Actual behavior

run_simplex() silently returns an empty dict {} when maxiter is
exhausted, with no indication of why it failed or that it failed
at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions