Skip to main content

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.

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

Uploaded CPython 3.14Windows x86-64

aimmspy-26.1.7.1-cp314-cp314-manylinux_2_27_x86_64.whl (879.7 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64

aimmspy-26.1.7.1-cp313-cp313-win_amd64.whl (778.2 kB view details)

Uploaded CPython 3.13Windows x86-64

aimmspy-26.1.7.1-cp313-cp313-manylinux_2_27_x86_64.whl (879.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

aimmspy-26.1.7.1-cp312-cp312-win_amd64.whl (778.1 kB view details)

Uploaded CPython 3.12Windows x86-64

aimmspy-26.1.7.1-cp312-cp312-manylinux_2_27_x86_64.whl (879.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

aimmspy-26.1.7.1-cp311-cp311-win_amd64.whl (785.8 kB view details)

Uploaded CPython 3.11Windows x86-64

aimmspy-26.1.7.1-cp311-cp311-manylinux_2_27_x86_64.whl (878.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

aimmspy-26.1.7.1-cp310-cp310-win_amd64.whl (785.0 kB view details)

Uploaded CPython 3.10Windows x86-64

aimmspy-26.1.7.1-cp310-cp310-manylinux_2_27_x86_64.whl (877.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

File details

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

File metadata

  • Download URL: aimmspy-26.1.7.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 806.7 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.7.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 6e511549e23de95c086fc72d590de51cc75989d9c5a5ea587c1acc574ac62221
MD5 d33ae767af78287a7b410164ddabc692
BLAKE2b-256 a5d3ad79443089ac0de332b08895e1e28e3da6127261d5f6213a7ce5c9f28288

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.7.1-cp314-cp314-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 d9b21126b810af11cbe4d6982cfc59bdad9d14349008206e025841527e92e60b
MD5 70aa872979da2b63b916a6669d7f052f
BLAKE2b-256 74f2812c41c779265893820e2a8ba880d52d121acd91feada2361d5031a16094

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.7.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 778.2 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.7.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 da17692ce59ee9af516993716e4cb44b9667114a8e1fbc0e73a7d117e9feddea
MD5 ed2bf6c6cf8bcbfb0204f33cf7578553
BLAKE2b-256 57c2b222f8316f8006186f8eee590e2bdf4cef659c64f6fbbf8b9c10869ba5ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.7.1-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 b4f6d2dd5b12119b96069a1225a9c9cdb0d2159add8e6d46259ef59bd8175f24
MD5 b53807e5c20c59ff98e2f93ea1bc751c
BLAKE2b-256 4e31c9475016b331059ac5a3b14145ce5ec4593287a75c0d78f3d2bda2840ba5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.7.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 778.1 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.7.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 059b2666939a9ff41b6b2ba887653720874752bc914c53cf9f005662e2245065
MD5 cfd1fa2487407e9c8506cfd662d37cef
BLAKE2b-256 6d822ece7197ab68ecb32b99073199e702f5912a06442ca27facf9c399dd345e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.7.1-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 2166859fc63a9742048f3ac229e79c896b87113c11b2bcb2c7cc06fb599c32fc
MD5 a7e262a345adb8465c4afb2e1f5eed58
BLAKE2b-256 b86c3c6dbf3a71b33373d891cbbdfc9814f183e51941da086fd7287a308eadc9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.7.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 785.8 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.7.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9c6068ba8fe4f6c153c0ae6e862eef132d19f1ace65dcb0a8cfc06685159dab0
MD5 a6df5b5c61b0ca5506bbf091547479b6
BLAKE2b-256 7cc56bb7ed45aaf1226b993c816e44af9dc8bdf501d67ad4a02d311c83ed47f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.7.1-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 91b0e9c32c2bcbdda46ee0a58deba4f1d5e92190f90d135e784bfb80720eeb5a
MD5 3858a1c3b4e451bc223e62e14011cc83
BLAKE2b-256 fbe97c0a0fe58ca874eac80b872512b59ca9d5273536508cbf06fbdc9f95a5a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.7.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 785.0 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.7.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 411eac0ee442f919365705e1d35201c3e0a0eb025e042bdf7e694b24201c9bdd
MD5 6fd6bd1b6724b7b035e974f3411dccb8
BLAKE2b-256 e7738f1a30c0521113f70e03d2b10584bfe148ad776af20f1a93b8d9efd76839

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.7.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 d8f99483e5bd0aafa38119f4d43021d7eddace7d52304e1cb5dd2d8b66addeb5
MD5 b0d04014ae8f547e95e2e7fabc6c7b2f
BLAKE2b-256 99fe5207ce24bdafce3eabac0baa10c6c3309692a4fdac3b9ae26378d4f65688

See more details on using hashes here.

Release history Release notifications | RSS feed

26.1.8.1

10 files

This release

26.1.7.1 This release

10 files

26.1.6.1

10 files

26.1.5.2

10 files

26.1.5.1

10 files

26.1.4.2

10 files

26.1.3.2

10 files

26.1.1.2

10 files

25.3.1.8

10 files

25.2.1.12

8 files

25.2.1.2

8 files

25.1.1.11

8 files

1.0.1.post141

8 files

1.0.1.post133

8 files

1.0.1.post113

8 files

1.0.1.post101

8 files

1.0.1.post59

8 files

1.0.1.post53

8 files

1.0.1.post52

8 files

1.0.1.post49

8 files

1.0.1.post48

8 files

1.0.1.post46

8 files

1.0.1.post41

8 files

1.0.1.post39

8 files

1.0.1.post38

8 files

1.0.1.post37

8 files

1.0.1.post36

8 files

1.0.1.post33

9 files

1.0.1.post24

4 files

1.0.1.post23

4 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page