Metadata-Version: 2.4
Name: pyomo-solver-analyzer
Version: 0.1.0
Summary: Automatic constraint analysis and debugging for Pyomo linear solvers
Project-URL: Repository, https://github.com/jaimerp94/PyomoDebugger
Project-URL: Documentation, https://github.com/jaimerp94/PyomoDebugger/wiki
Project-URL: Bug Tracker, https://github.com/jaimerp94/PyomoDebugger/issues
Author-email: Jaime Martín <jaime@example.com>
License: MIT
License-File: LICENSE
Keywords: analysis,constraints,debugging,optimization,pyomo,solver
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.8
Requires-Dist: pyomo>=6.0
Provides-Extra: dev
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest-cov>=4.0; extra == 'test'
Requires-Dist: pytest>=7.0; extra == 'test'
Description-Content-Type: text/markdown

# PyomoDebugger

A constraint analysis and debugging toolkit for [Pyomo](http://www.pyomo.org/), an open-source optimization modeling language in Python. This library provides tools for analyzing solver outputs, diagnosing infeasibility, and identifying binding constraints in linear optimization models.

## Features

- **Constraint Analysis**: Identify tight constraints, slack variables, and sensitivity metrics
- **Infeasibility Detection**: Diagnose why models are infeasible
- **Solver Diagnostics**: Analyze solver outputs and optimization results
- **Constraint Introspection**: Deep inspection of constraint properties and relationships
- **Performance Analysis**: Identify performance bottlenecks and limiting factors

## Installation

Install from PyPI:
```bash
pip install pyomo-solver-analyzer
```

Or install from source with development dependencies:
```bash
git clone https://github.com/jaimerp94/PyomoDebugger.git
cd PyomoDebugger
pip install -e ".[dev]"
```

## Quick Start

```python
from pyomo_solver_analyzer import SolverDiagnostics
import pyomo.environ as pyo

# Create and solve your Pyomo model
model = pyo.ConcreteModel()
# ... define your model ...
solver = pyo.SolverFactory('glpk')
solver.solve(model)

# Analyze the results
diagnostics = SolverDiagnostics(model)
report = diagnostics.generate_diagnostics_report()
print(report)
```

## Documentation

- [API Reference](docs/api_reference.md)
- [Architecture Guide](docs/architecture.md)
- [Examples](docs/examples.md)
- [Mathematical Background](docs/mathematics.md)

## Development

For detailed development setup instructions, see [DEVELOPMENT.md](DEVELOPMENT.md).

### Project Structure

```
PyomoDebugger/
├── src/
│   └── pyomo_solver_analyzer/       # Main package
│       ├── __init__.py
│       ├── analyzer.py
│       ├── diagnostics.py
│       ├── introspection.py
│       └── unfeasibility.py
├── tests/                           # Test suite
├── docs/                            # Documentation
├── README.md
├── LICENSE
├── pyproject.toml                   # Project configuration
└── DEVELOPMENT.md
```

## Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

Before committing, ensure:
1. Code passes `ruff` linting: `ruff check src/`
2. Code passes `mypy` type checking: `mypy src/`
3. Tests pass: `pytest tests/`
4. Pre-commit hooks pass: `pre-commit run --all-files`

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Support

For issues, questions, or feature requests, please open an issue on [GitHub](https://github.com/jaimerp94/PyomoDebugger/issues).

## Citation

If you use this library in your research, please cite:

```bibtex
@software{pyomo_solver_analyzer,
  title={Pyomo Solver Analyzer},
  author={Martin, Jaime},
  year={2024},
  url={https://github.com/jaimerp94/PyomoDebugger}
}
```
