Skip to main content

AI-powered optimization model tuning

Project description

Optimaze

AI-powered Gurobi optimization tuning — automatically speed up your models.

PyPI Python License

Installation

pip install optimaze

Usage

optimaze optimize model.py --repo https://github.com/you/repo --key YOUR_KEY

Options:

Flag Description
model.py Your Python script that builds and solves a Gurobi model
--repo GitHub repo where improvements are committed
--key Your Optimaze license key (or set OPTIMAZE_KEY)
--max-iterations Max improvement iterations (default: 10)

How It Works

┌──────────────────────┐      ┌──────────────────────┐
│   Your Machine       │      │   Optimaze Cloud     │
│                      │      │                      │
│  1. Runs your model  │ ──── │  2. Analyzes logs    │
│     (your Gurobi     │ logs │     & source code    │
│      license)        │      │                      │
│                      │ ◄─── │  3. Generates code   │
│  4. Re-runs model    │ code │     improvements     │
│     with changes     │      │                      │
└──────────────────────┘      └──────────────────────┘

EULA-compliant architecture: Gurobi runs locally on your machine with your own license. The cloud service only analyzes solver logs and generates code — it never runs the solver.

Example

============================================================
  OPTIMAZE
  AI-powered optimization tuning
============================================================

Script:     /path/to/model.py
Repo:       https://github.com/you/repo

[Iteration 0] Running model...
  Runtime: 18.25s
  (baseline)

[Iteration 1] Running model...
  Runtime: 13.10s
  Improvement: 28.2% faster

RESULTS
----------------------------------------
Baseline:  18.25s
Best:      13.10s
Speedup:   +28.2%

To apply:
  git merge agent/optimize-sess_xxxxx

What It Tries

The agent analyzes your model's solver logs and applies targeted improvements:

  • Solver Parameters — MIPFocus, Cuts, Presolve, Method, Heuristics, Threads, Symmetry
  • Big-M Tightening — tighten large coefficients that cause numerical issues
  • Symmetry Breaking — add constraints to eliminate symmetric solutions
  • Valid Inequalities — strengthen the LP relaxation
  • Branching Priorities — guide the branch-and-bound search
  • Warm Starting — provide initial feasible solutions
  • Lazy Constraints — defer rarely-binding constraints

Typical speedup: 20–50%

Requirements

  • Python 3.10+
  • Gurobi installed with a valid license (free academic license)
  • Git configured for your repo

Environment Variables

Variable Description
OPTIMAZE_KEY Your license key
OPTIMAZE_SERVER Custom server URL (optional)

License

MIT — see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optimaze-0.3.1.tar.gz (102.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

optimaze-0.3.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file optimaze-0.3.1.tar.gz.

File metadata

  • Download URL: optimaze-0.3.1.tar.gz
  • Upload date:
  • Size: 102.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for optimaze-0.3.1.tar.gz
Algorithm Hash digest
SHA256 26de7fb63909254f481f282adb84db730c1accb79b735ad62444782990a58384
MD5 17ea6ecc912d905e798b34e8f597a732
BLAKE2b-256 6a4becc688e695f4c4ab98db8a935cbe148d606a3a7b8727f9f11ccbfe4f750b

See more details on using hashes here.

File details

Details for the file optimaze-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: optimaze-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for optimaze-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3bdbaab330909e6e4da4fb2de046c5e9d415a4f418c55d733eb340aefe35e1c5
MD5 1868e2071a2826de061a66ebcdef0576
BLAKE2b-256 97bb3cbee072c1140820524ad9f23624d98dceffb8689309cb421e2a646b83d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page