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.6.1-cp314-cp314-win_amd64.whl (806.3 kB view details)

Uploaded CPython 3.14Windows x86-64

aimmspy-26.1.6.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.6.1-cp313-cp313-win_amd64.whl (777.6 kB view details)

Uploaded CPython 3.13Windows x86-64

aimmspy-26.1.6.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.6.1-cp312-cp312-win_amd64.whl (777.6 kB view details)

Uploaded CPython 3.12Windows x86-64

aimmspy-26.1.6.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.6.1-cp311-cp311-win_amd64.whl (785.3 kB view details)

Uploaded CPython 3.11Windows x86-64

aimmspy-26.1.6.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.6.1-cp310-cp310-win_amd64.whl (784.6 kB view details)

Uploaded CPython 3.10Windows x86-64

aimmspy-26.1.6.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.6.1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: aimmspy-26.1.6.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.6.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 8cf44770772019bb5e408666ef5b66b6c0d28334d8063c44b52dd9bbbca3427d
MD5 4eeeba26ada1664d99de8f9366e30b0a
BLAKE2b-256 eb3185154443320eff01c4c31b2eeaa8d9b52408ffdf342cda8d022ca7b5b69e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.6.1-cp314-cp314-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 aad7f767bfaec4c82cab02449755e517949809252c93efb7b0bcf754c287409e
MD5 c7b5153941c407de16b0c8189f3a372a
BLAKE2b-256 6634f61147679a4d515097584369fe3144872edd7a9ad3ab0b485d966ea1c62a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.6.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.6.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c0924a39e7ff54fbed30da816119dc1db9613d68cd862f310d5f0eed1669f579
MD5 c026058d696a0a2bf965f57cb59699a9
BLAKE2b-256 de0855bfc5ccd508b1c9e13a3143d34b04b99934c74a8d31cac8b80dbe6f415b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.6.1-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 0e0c28bde19dc09bcd0f0429d5cf08617b04f4d1908ce77ff819d131cf15e1b5
MD5 b7d917adbc7456cb4770c45c5346b59d
BLAKE2b-256 214287f17daaa1185b39c9711dddab9824598f92755148d4c3fa9f7bf1f8478d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.6.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.6.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5396ca1635025e387eb5a986c2334f14ff0333e3dad88343e294d7bd93d388ef
MD5 0c8227572cbe538a2977d580c2d8dc9b
BLAKE2b-256 76daf3acaf905f8071c8fe820cdb0365958ee5dbe8e66d1b9230d87b035a138a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.6.1-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 9cdba943b88985ac4ad71b45405416dda4f32a5bbab5a8daac4a9e714c246876
MD5 ccae1b8b847ce99a000138d43a182c3c
BLAKE2b-256 44ee91c6caada71134867f075cac903bd579583131cb17e8debc5fbed919063f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.6.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.6.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 078b803a5ebbf64bd941e4a91c1790f03ce8fe23ad6c4f96f6e66ba53e455666
MD5 12ef4e0ccd0f1e7d0c4325f33dc67bb1
BLAKE2b-256 e77bb5585c91ed2e59fd92df05f4e979f96f046fa652dfa5412d4391549f949e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.6.1-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 9dedd1bb6d88a388f888183c63015a72416de8704b76ee0cbf0b025b835be6f6
MD5 309b4e6bc4d9e9bdf30630fd5563c323
BLAKE2b-256 b42271e6383a20cc5aaa3a26b49246892e97b1adf13ca999a83c25ebc9de5a2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.6.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.6.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cc29bf3241ef2955075fd439723d8de87f3d9d879fef322eb4521d0a9e9a1a1e
MD5 49dda3fde3c6b1d2325f09bce870233b
BLAKE2b-256 ab748ce6e6c34692f6d010df7d71b7886e55d9ea98a602bfdef8962b726f99a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.6.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 d01cdc73eea238da983a7ed23907ba420c3b155dd5b685d6229b96663111442e
MD5 484eaaaa130485715b1abd359ef4da4e
BLAKE2b-256 68a483cb75c01adbcf7c74cff9fa05f3d2cdc62cd1a2078fc927f71c69972903

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