Metadata-Version: 2.4
Name: solverarena
Version: 0.2.6
Summary: A library to run and compare optimization models
Author-email: Javier Berga García <pataq21@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/pataq21/SolverArena
Project-URL: Repository, https://github.com/pataq21/SolverArena
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: build>=1.2.2.post1
Requires-Dist: memory-profiler
Requires-Dist: pulp>=3.1.1
Provides-Extra: highs
Requires-Dist: highspy; extra == "highs"
Provides-Extra: gurobi
Requires-Dist: gurobipy; extra == "gurobi"
Provides-Extra: scip
Requires-Dist: pyscipopt; extra == "scip"
Provides-Extra: ortools
Requires-Dist: ortools; extra == "ortools"
Provides-Extra: all-solvers
Requires-Dist: solverarena[highs]; extra == "all-solvers"
Requires-Dist: solverarena[gurobi]; extra == "all-solvers"
Requires-Dist: solverarena[scip]; extra == "all-solvers"
Requires-Dist: solverarena[ortools]; extra == "all-solvers"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: highspy; extra == "dev"
Requires-Dist: gurobipy; extra == "dev"
Requires-Dist: pyscipopt; extra == "dev"
Requires-Dist: ortools; extra == "dev"
Requires-Dist: pytest-mock>=3.14.0; extra == "dev"
Dynamic: license-file

# Solver Arena

**Solver Arena** is an open-source library designed to facilitate the performance comparison of different solvers in optimization problems. The library abstracts the implementation of solvers, allowing users to input a list of MPS files and choose the desired solvers with their respective parameters.

## Installation

To install the library from PyPI, you can use `pipenv` with one of the following commands:

1. **Basic Installation** (only the main library):

    ```bash
    pipenv install solverarena
    ```

2. **Installation with a Specific Solver**:

    If you want to install the library along with a specific solver, you can use:

    ```bash
    pipenv install solverarena[highs]      # To install with Highs
    pipenv install solverarena[gurobi]     # To install with Gurobi
    pipenv install solverarena[scip]       # To install with SCIP
    pipenv install solverarena[ortools]    # To install with OR-Tools
    ```

3. **Installation with All Solvers**:

    If you want to install the library along with all available solvers, use:

    ```bash
    pipenv install solverarena[all_solvers]
    ```

## Usage

To use the library, you can refer to the example folder, which contains a basic implementation. Here is an example of how to use `arena_solver`:

```python
from solverarena.run import run_models

if __name__ == "__main__":
    mps_files = [
        "examples/mps_files/model_dataset100.mps",
    ]

    solvers = {
        "highs_default": {
            "solver_name": "highs",
            "presolve": "on",
            "time_limit": 3600,
            "solver": "ipm"
        },
        "highs_no_presolve": {
            "solver_name": "highs",
            "presolve": "off",
            "time_limit": 1800,
            "solver": "simplex"
        }
    }

    results = run_models(mps_files, solvers)
```
