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.
Project description
AIMMS 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)
- An integrated WebUI builder, model explorer, and deployment tools
- Fast deployment and decision-support app creation
- A valid AIMMS Developer license and an existing AIMMS project to connect with (project file, executable, license URL)
- You will receive a license URL in the installation instructions after verification, this URL will be needed when initializing a connection to the AIMMS project
More information on how to get started can be found in the python bridge documentation.
Note: AIMMS offers a free Academic License for students, educators, and researchers. This makes it easy for academic users to experiment with AIMMS and aimmspy without cost.
Installation
Install via pip:
pip install aimmspy
Basic Usage Example
Here is a minimal example showing how to connect to an AIMMS project, assign data, run a solve procedure, and retrieve results:
from aimmspy.project.project import Project, Model
from aimmspy.utils import find_aimms_path
# Initialize connection to AIMMS project
project = Project(
# path to the AIMMS bin folder (or Lib on Linux)
aimms_path=find_aimms_path("25.5.4.3"),
# path to AIMMS project
aimms_project_file="path/to/your/project.aimms",
# license url
license_url="wss://licensing.aimms.cloud/your-license-url"
)
# Get a handle to the AIMMS model
model: Model = project.get_model(__file__)
# Assign supply and demand data to the identifiers in the AIMMS model
model.Supply.assign({"Factory1": 35, "Factory2": 50})
model.Demand.assign({"Market1": 45, "Market2": 40})
# Assign transportation costs
model.TransportCost.assign({
("Factory1", "Market1"): 10,
("Factory1", "Market2"): 15,
("Factory2", "Market1"): 20,
("Factory2", "Market2"): 5,
})
# Run the optimization procedure defined in AIMMS
model.TransportSolve()
# Retrieve results: optimal shipment quantities
shipments = model.Shipments.data()
print("Optimal shipments:")
print(shipments)
This example assumes you have an AIMMS project with identifiers Supply, Demand, TransportCost, Shipments, and a procedure TransportSolve set up. Replace with identifiers from your own AIMMS project.
License
This project is licensed under the MIT License.
Support
For questions, bug reports, or feature requests, please contact AIMMS B.V. via support. Or post an question on the AIMMS Community. We are happy to help you with any issues or questions you may have.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aimmspy-26.1.3.2-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: aimmspy-26.1.3.2-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 795.9 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0fbfa7ce4068d28203ed87fc77a5c825ae8f9dbc4bf5180a2296cda21c3fb07
|
|
| MD5 |
6906bc5ffcc6e63a3ee2b516d27d4945
|
|
| BLAKE2b-256 |
c3fbb28070764af2eb8c2c030ce75f4630d8ee6a240a73cbe55ef10f2289d407
|
File details
Details for the file aimmspy-26.1.3.2-cp314-cp314-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: aimmspy-26.1.3.2-cp314-cp314-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 876.2 kB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fb80e3e2860f37cba6838d4d714e3759e1c577dfcf603630299a521344ff4f6
|
|
| MD5 |
f547ea66d7b2e58bbf378fb074d03302
|
|
| BLAKE2b-256 |
216594bababe1a4907c18dda9cf30d1f40390dcf644ed1bf5bc0a0774bbdd269
|
File details
Details for the file aimmspy-26.1.3.2-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: aimmspy-26.1.3.2-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 767.9 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
656fdb0d5e99bbffee64f7bb03b35454692cbe3f2e0ec3feb9242abd9f3a1caf
|
|
| MD5 |
2e7d8d5b3405d7021c62cd8418c01e41
|
|
| BLAKE2b-256 |
c6ddfa8d014f7ae353257fa48de7ffa85fda3713b5784c5b59579a80b234d08b
|
File details
Details for the file aimmspy-26.1.3.2-cp313-cp313-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: aimmspy-26.1.3.2-cp313-cp313-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 876.0 kB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99e07e9c702946c1c65a1b89b28ae53651bedf9adcc2b2b54b11837a6eda915a
|
|
| MD5 |
b402ba700507ba13a4c2555a6d35c4f2
|
|
| BLAKE2b-256 |
3fb4bb4fd1a474ea9b502994dc88ecc60321fddb54622bd03d6acc048dbe83d3
|
File details
Details for the file aimmspy-26.1.3.2-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: aimmspy-26.1.3.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 768.0 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e89d42708b94fed6f6ccb01395ab81522baf47214312a9aa5414beef15ab2fba
|
|
| MD5 |
58f6ca28de7ef0a887f7779ffb1d257c
|
|
| BLAKE2b-256 |
898b9c7a11f8f68b30e8a8ea9b28f919ba830ed23d9ee21b8578313b49fb5835
|
File details
Details for the file aimmspy-26.1.3.2-cp312-cp312-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: aimmspy-26.1.3.2-cp312-cp312-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 876.1 kB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
549d3f99995dbc44da55e98856c743c7f73f21c672f75e5c859e766a7d0c848b
|
|
| MD5 |
a0f4cc19bbffb0974b0e4769850d9733
|
|
| BLAKE2b-256 |
9d810f22e84911963b02893611c22bf4d411dcfc231f4a84a0f8631804f045a8
|
File details
Details for the file aimmspy-26.1.3.2-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: aimmspy-26.1.3.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 776.2 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f2f1b94596ebb4d825266a8ab74fd886dfdf2f236a36d70493d3d855adb1606
|
|
| MD5 |
0ac5995149cfd6fd18bf9216c5e6b0dc
|
|
| BLAKE2b-256 |
0f56fb21a4897d9d6c5fb3eb51cdc7f533ad8974f523f456ce534f924cad0722
|
File details
Details for the file aimmspy-26.1.3.2-cp311-cp311-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: aimmspy-26.1.3.2-cp311-cp311-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 875.2 kB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99d8396b388d69144ecbd16cb735975fbc97f99a6bbbc9c6a38635b41403af33
|
|
| MD5 |
c9d921872b248344cdda754be4221ffa
|
|
| BLAKE2b-256 |
532e664bb53422de2eda29e1d7c01dd2c6444d9bd0d432850ff5f837e042f262
|
File details
Details for the file aimmspy-26.1.3.2-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: aimmspy-26.1.3.2-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 775.2 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fff87e80d015f7702127a03e8cff8978eb0dfcbed0f52b7a2007ff4849b3a55
|
|
| MD5 |
3c5c00c044b89359b113b696a8a86efa
|
|
| BLAKE2b-256 |
0515cd9a7295bb51fde8b712ced3a9ad355b7135ec78bb9f465abd89e545c93d
|
File details
Details for the file aimmspy-26.1.3.2-cp310-cp310-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: aimmspy-26.1.3.2-cp310-cp310-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 874.4 kB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ee3373fe86d556fc0c12adf750444b01b2ebf64458056b93040976f2887de85
|
|
| MD5 |
87cc2bc7c4e809fabe025f78b9814045
|
|
| BLAKE2b-256 |
7036f6db8d231858fb56659cb8b60e52cff3fba8815ce208948115613958d5b0
|