Python bindings for the AIMMS optimization platform, built with pybind11 for seamless C++ integration. Enables efficient data exchange and interaction with AIMMS projects using pandas, polars, and pyarrow. Ideal for advanced optimization workflows requiring high-performance native code.
Actively maintained. Last release 2 months ago. A safe choice.
pip install aimmspyAIMMS Python Library
With this library it is possible to interact with AIMMS models from Python, enabling high-performance, headless interaction with AIMMS models from within Python scripts.
Overview
aimmspy is a Python module built on pybind11 for tight C++ integration, enabling efficient interaction with AIMMS models. With aimmspy, you can:
- Assign and retrieve data between Python and AIMMS using Python dictionaries, Pandas, Polars, or Arrow data frames
- Execute AIMMS procedures (such as solves) programmatically and capture the results
- Benefit from high-performance native code, ideal for advanced optimization workflows
aimmspy is a key component of the AIMMS Python Bridge, designed for "Python-in-the-lead" scenarios, where Python scripts drive AIMMS model runs. It complements the pyaimms library (accessible from within an AIMMS project), which supports the reverse ("AIMMS-in-the-lead") workflow.
Key Features
| Feature | Description |
|---|---|
| High-performance integration | aimmspy uses pybind11 for efficient C++ access to AIMMS runtime |
| Flexible data exchange | Leverage Python-native data structures-dictionaries, Pandas, Polars, PyArrow, for data handling between Python and AIMMS |
| Programmatic control | Trigger AIMMS procedures (e.g. solve) directly from Python and retrieve results |
| Python-first workflow | Ideal for batch runs, automated pipelines, and embedding optimization in external applications |
| Bulk data handling | The multi_assign() and multi_data() methods allows sending and fetching multiple AIMMS identifiers in a single call |
Prerequisites
- AIMMS Developer installed - the low-code optimization modeling platform that provides:
- A full-featured IDE with a rich mathematical modeling language for formulating LP, MIP, NLP, MINLP, stochastic, and robust optimization models
- Access to high-performance solvers (e.g., CPLEX, Gurobi, BARON, CBC, IPOPT, KNITRO, CP Optimizer)