Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

aimmspy-26.1.5.1-cp314-cp314-win_amd64.whl (806.3 kB view details)

Uploaded CPython 3.14Windows x86-64

aimmspy-26.1.5.1-cp314-cp314-manylinux_2_27_x86_64.whl (879.1 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64

aimmspy-26.1.5.1-cp313-cp313-win_amd64.whl (777.6 kB view details)

Uploaded CPython 3.13Windows x86-64

aimmspy-26.1.5.1-cp313-cp313-manylinux_2_27_x86_64.whl (878.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

aimmspy-26.1.5.1-cp312-cp312-win_amd64.whl (777.6 kB view details)

Uploaded CPython 3.12Windows x86-64

aimmspy-26.1.5.1-cp312-cp312-manylinux_2_27_x86_64.whl (878.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

aimmspy-26.1.5.1-cp311-cp311-win_amd64.whl (785.3 kB view details)

Uploaded CPython 3.11Windows x86-64

aimmspy-26.1.5.1-cp311-cp311-manylinux_2_27_x86_64.whl (877.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

aimmspy-26.1.5.1-cp310-cp310-win_amd64.whl (784.6 kB view details)

Uploaded CPython 3.10Windows x86-64

aimmspy-26.1.5.1-cp310-cp310-manylinux_2_27_x86_64.whl (876.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

File details

Details for the file aimmspy-26.1.5.1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: aimmspy-26.1.5.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 806.3 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for aimmspy-26.1.5.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7066d00f06301464fbf715cd087741ec87231db11fea1b944a6beabfdb806d03
MD5 6947fc56e92128038f01b1b81367ab2b
BLAKE2b-256 bdf92fa98e6a388b49ee32d4ef16257289fe62c14a1d100204940117746071f2

See more details on using hashes here.

File details

Details for the file aimmspy-26.1.5.1-cp314-cp314-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for aimmspy-26.1.5.1-cp314-cp314-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 7e2a904f22e5c79b8cc93df4dca22bef041854a14f0f7bd32171411eb94dc6f4
MD5 535ec04ee350779f018ac460f21b3ce4
BLAKE2b-256 d96f759e7f10c453bc754e451b5f404625292d0b304ef8d7bcfd8988596a34c1

See more details on using hashes here.

File details

Details for the file aimmspy-26.1.5.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: aimmspy-26.1.5.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 777.6 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for aimmspy-26.1.5.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0b916f0daa2bfee7beb4ceeff941591e567bb3a1a135d19d6d80b617a0fd459f
MD5 763a13f3bd7facd16acfeaee3932e906
BLAKE2b-256 106b0077256c6d0a527457b37794953ce5929521f40cd3e8d36fac4d0ac48e7b

See more details on using hashes here.

File details

Details for the file aimmspy-26.1.5.1-cp313-cp313-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for aimmspy-26.1.5.1-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 953b7e7d97317ce3a79910f90cf8ca822cce39b3041f155526f96b0544f34e97
MD5 ccdf0a2ad6d46f698721294b87afda4b
BLAKE2b-256 f1b8aae247b650b5650f793a0dc31fe9a94d9fd143042e4217f433183fabfd71

See more details on using hashes here.

File details

Details for the file aimmspy-26.1.5.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: aimmspy-26.1.5.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 777.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for aimmspy-26.1.5.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9e0cb027a41033ec134a9824764f2bcd9a7d217d5e3254899e5dfa39d5f774c4
MD5 366e171d615538b9a832ccfa319b076d
BLAKE2b-256 c4cab3f060598b4539acb4ddd9e487bf9b613e143eb221eef9c1ec98c264b08f

See more details on using hashes here.

File details

Details for the file aimmspy-26.1.5.1-cp312-cp312-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for aimmspy-26.1.5.1-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 6664338685a390b1cae26f107a9297e0c9fb0186f286cee7a3fa002a6e69a977
MD5 cd6357f64a73e5a77bf8424d7874e539
BLAKE2b-256 8ed36601e2737f6d79d65869be8395af1638c4b2da43946e3203662b4bd41232

See more details on using hashes here.

File details

Details for the file aimmspy-26.1.5.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: aimmspy-26.1.5.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 785.3 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for aimmspy-26.1.5.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5afc8c8d9af441479a6fd078375a1a1e37d0a9c1f896c6b9390b2f786e949d35
MD5 5034f2b6b9d0707f40669f65b004ff2f
BLAKE2b-256 4b1fb896ad784cc377454b3d6227875fa58fd31b534de4f53785200488e47c31

See more details on using hashes here.

File details

Details for the file aimmspy-26.1.5.1-cp311-cp311-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for aimmspy-26.1.5.1-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 5667ff58a42cde74eec61b42816ee598da7d0049102a448d054ea064a328e4ca
MD5 b9e0089d0fbf0c91e3bcf91c97642a15
BLAKE2b-256 3e40aa128fd5fa847fe9cd8995615038517acf52a58a7611441ca10c130e1bbb

See more details on using hashes here.

File details

Details for the file aimmspy-26.1.5.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: aimmspy-26.1.5.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 784.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for aimmspy-26.1.5.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 29bce65c99ec1e65dff3ee968695835fa2e147d987c43f993cef2bf539a5b920
MD5 3bbf28d69d5bf1cfd65cfda05bd1b3d4
BLAKE2b-256 62e2ec934de039ee207ce015d884c12db55755c19640200391125c7c140a6f30

See more details on using hashes here.

File details

Details for the file aimmspy-26.1.5.1-cp310-cp310-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for aimmspy-26.1.5.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 5a117997d967181046b3df7dad9301dc39c4a0d7235878b787f34e78680e5916
MD5 22ee38a4c19690124554ad094548a887
BLAKE2b-256 901c041ee4a49d6c37ed6f0af3e90ce5a3d8ff13fa398355bb188cf3a957ebad

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