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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

aimmspy-26.1.5.2-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.2-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: aimmspy-26.1.5.2-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.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 edf269ee388e1821841faeff3df8c192497ceda53403f933e7b7c3c28b67f240
MD5 fca0c62317687bed60223ff4ef3416be
BLAKE2b-256 a5c1669c0fad07b3f59261471e0b8f2ceac0db1d93160132455b5cb17fd34dc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.5.2-cp314-cp314-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 4dc67b316b5d196029462ce7bfa1d7e92c882cb0854da778e8a3f1e6cff2adbf
MD5 ccaa737af9d80c822b4b4df3736db269
BLAKE2b-256 c72692b83b4ccce36f711061375e06b64fba1accad9ed5a0c42b4315ff60acc2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.5.2-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.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cd7b6c9b4005978b576a072323cf8bb8a00a4a85098da866393c1995461deaed
MD5 5b3d0bbfcbbad2edb974c14df0bff896
BLAKE2b-256 29b9b1a0cbd2cc10a15aa9f1e90c0e50c3866a0f8c7a83ded42cfc24bf584d88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.5.2-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 4ad74ad078800565e2c54eea4b5f3a740c0fb76566433a0512adb0a210a574bc
MD5 a68ad718cc076df918f93c47ca1fa2ee
BLAKE2b-256 37b90b7cbec87c9fdab879c629c80ce7146e7cf8a4c368ac56f78d32912d3b6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.5.2-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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e384cc9e8ec8faf98f1447f52e85585da212f1ad1d9089360a360e61d00d04e3
MD5 5dbeed39ca5c9db0bbfd1cd6c2732e75
BLAKE2b-256 b3e8ab1f97aa58f4e4175cd23d9603885e9faad1c68203308e087e7c87ba0058

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.5.2-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 cb44dbb2f262d1d473df37aeeee0efc347e2690026b555e464ce06e91830af03
MD5 0fd5c0d451b598d652a2adbb2384947a
BLAKE2b-256 03ea4f9edb0ed9dd9723c7c9ec7dc548c351efada5e72833eec02990361d032e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.5.2-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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 68c239a873522dec196d4862f821f1c9078aa54114ef32006121dfd1541d04eb
MD5 be2ce494812f1c6ec0eecba003bf71e1
BLAKE2b-256 1c43189aaea9ab762c9bcb5b301eacbef2904dcb13d0a19c32ae5788e705ec8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.5.2-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 23b056f3d339bb4ef00c28b1d8dbf40132f838e8f5404550141a08e73dd69a73
MD5 e6668f07cca375fd46caf7d4f1622bc3
BLAKE2b-256 423936af1dc75f6a07aab84823c9b46b3255ae0ff3412e7cd6bc171eff8cc3bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.5.2-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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b39fbd7e6c3005d796ba7cf48f955766c400522916574fa50578cd14484e2f97
MD5 6aa669d7efec852a84c7569b759b8d09
BLAKE2b-256 0c4df11e863b9f4bbc097b87ad7dd2f2826f44e61a79e31c784f60a7a8436370

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.5.2-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 a32271614d5a10861d9186499c78142f4f33d16598aad7f89e299d5de8b1048d
MD5 d73f06ee2c49b4bd4cd9716838afcf30
BLAKE2b-256 8896e45ee56240ed5f415a7a7e593d7c62e329f721f906b53859149e4f3e8b15

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