Metadata-Version: 2.2
Name: igaos
Version: 0.1.0
Summary: Sovereign LP/MILP/QP solver core: primal+dual simplex, B&B with Gomory cuts, ADMM QP, and an optional GPU first-order PDHG engine
Keywords: optimization,linear-programming,mixed-integer-programming,quadratic-programming,simplex,branch-and-bound,admm,first-order-methods,pdlp,gpu
Author: Lothnic and the IGAOS contributors
License: MIT License
         
         Copyright (c) 2026 Lothnic and the IGAOS contributors
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
         
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Mathematics
Project-URL: Homepage, https://github.com/Lothnic/IGAOS
Project-URL: Documentation, https://github.com/Lothnic/IGAOS#readme
Project-URL: Bug Tracker, https://github.com/Lothnic/IGAOS/issues
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# IGAOS — Indigenous GPU-Accelerated Optimization Solver

[![CI](https://github.com/Lothnic/IGAOS/actions/workflows/ci.yml/badge.svg)](https://github.com/Lothnic/IGAOS/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

A sovereign LP / MILP / QP solver core built from mathematical foundations for
[SIH 2026 problem statement SIH26119](https://github.com/Lothnic/IGAOS/issues/1)
(MRPL): revised simplex (primal + dual), first-order GPU methods (PDHG),
branch-and-bound with Gomory cuts, and ADMM QP — no existing
optimization-solver library as a base.

- Wayfinder map: [issue #1](https://github.com/Lothnic/IGAOS/issues/1)
- Problem-statement analysis: [`docs/SIH26119-RESEARCH-REPORT.md`](docs/SIH26119-RESEARCH-REPORT.md)
- Research sheets: `docs/research/` (PDHG algorithm · simplex design · benchmark protocol · refinery cases)
- Dependency policy: [`docs/DEPENDENCIES.md`](docs/DEPENDENCIES.md) · vocabulary: [`CONTEXT.md`](CONTEXT.md)

## Layout

```
src/
  common/   shared types, numerics utilities
  linalg/   sparse/dense linear algebra; swappable CPU/GPU backends
  simplex/  revised simplex (primal + dual, eta updates, warm starts)
  pdhg/     first-order GPU LP engine
  milp/     branch-and-bound + Gomory cuts
  qp/       OSQP-style ADMM QP engine
  io/       MPS reader (LP/MILP/QP), solution writers
  api/      CLI + pybind11 surface
python/     Python bindings: igaos.solve() / igaos.read_mps()
benchmarks/ harness per docs/research/benchmark-protocol.md
tests/      assert-based engine smoke tests
```

## Install

Python package (CPU engines — simplex LP, MILP, QP):

```sh
pip install igaos
```

```python
import igaos
sol = igaos.solve("model.mps", time_limit=60, engine="auto")
sol.status, sol.objective, sol.x
```

With the **GPU PDHG engine**, build from source on a machine with the CUDA
toolkit (auto-detected when nvcc is present):

```sh
pip install igaos --no-binary igaos --config-settings=cmake.define.IGAOS_ENABLE_CUDA=ON
```

## Build from source (CLI + tests)

```sh
cmake -S . -B build
cmake --build build
```

Builds CPU-only automatically when no CUDA toolchain is present (the PDHG
engine requires CUDA). The CLI binary is `build/src/api/igaos`; the Python
module lands in `python/igaos/`. Engine tests: `ctest --test-dir build`.

## Solve

```sh
$ ./build/src/api/igaos solve model.mps --engine auto --time-limit 60
{
  "instance": "model.mps",
  "status": "optimal",
  "objective": -464.7531429,
  ...
}
```

Engines: `auto | simplex | pdhg | milp | qp`. All four engine classes are
live and verified against pinned baselines — current scores: Netlib
52/64 exact vs HiGHS, MIPLIB starters 6/20 @1e-4, robustness suite
10/15 per-class gates, Haverly QP three-way verified. Details and
honest failure records: `docs/research/`.

Python:

```python
import igaos
sol = igaos.solve("model.mps", time_limit=60, engine="milp")
sol.status, sol.objective, sol.x
```

