An original LP/MILP/QP optimization solver core built from mathematical first principles, GPU-accelerated via CUDA, for SIH 2026 PS 26119.
View the Firefly Landing Page Repository
Firefly operates in a decoupled, three-tier architecture with a strict linear solve pipeline:
flowchart LR
A[Parser] --> B[Presolve]
B --> C[LP Core]
C --> D[MILP Engine]
D --> E[Output]
classDef stage fill:#1B1D18,stroke:#33362E,color:#E8E6DE
class A,B,C,D,E stage
- Parser: Reads MPS/LP file format. Validates structure, extracts objective coefficients, constraint matrix (CSR), RHS, and variable bounds.
- Presolve: Eliminates redundant rows and fixed variables, tightens bounds, and rescales the constraint matrix before dispatch.
- LP Core: GPU-native PDLP (primal–dual first-order) for large-scale continuous relaxations; CPU Simplex fallback for small dense instances.
- MILP Engine: Branch-and-bound over the LP core. Integer feasibility enforced per node; best-bound pruning limits the search tree.
- Output: Primal solution vector, objective value, status code, iteration count, and wall-clock time returned to API and UI.
To install the standalone CLI , run this in PowerShell:
irm https://bit.ly/install-firefly | iexRequires CMake 3.25+ and NVIDIA CUDA Toolkit 12.0+ (target sm_89).
mkdir core/build && cd core/build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config ReleaseTo run the test suite:
cd core/build
ctest -C Release --output-on-failureA translation layer bridging programmatic requests to the C++ core via pybind11. Requires Python 3.10+.
# Compile and install the core Python bindings
pip install -e core --no-build-isolation
# Install API requirements
pip install -r api/requirements.txt
# Start the FastAPI server
uvicorn api.main:app --host 0.0.0.0 --port 8000Note on Windows: Ensure CUDA_PATH is set and its bin\x64 directory is accessible for DLL linking.
A telemetry interface engineered with a scientific instrumentation aesthetic (to be packaged as a Tauri desktop app).
cd web
npm install
npm run devThis project is licensed under the MIT License - see the LICENSE file for details.