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

Uploaded CPython 3.14Windows x86-64

aimmspy-26.1.8.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.8.1-cp313-cp313-win_amd64.whl (778.2 kB view details)

Uploaded CPython 3.13Windows x86-64

aimmspy-26.1.8.1-cp313-cp313-manylinux_2_27_x86_64.whl (879.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.12Windows x86-64

aimmspy-26.1.8.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.8.1-cp311-cp311-win_amd64.whl (785.9 kB view details)

Uploaded CPython 3.11Windows x86-64

aimmspy-26.1.8.1-cp311-cp311-manylinux_2_27_x86_64.whl (878.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

aimmspy-26.1.8.1-cp310-cp310-win_amd64.whl (785.1 kB view details)

Uploaded CPython 3.10Windows x86-64

aimmspy-26.1.8.1-cp310-cp310-manylinux_2_27_x86_64.whl (877.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

File details

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

File metadata

  • Download URL: aimmspy-26.1.8.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/7.0.0 CPython/3.12.13

File hashes

Hashes for aimmspy-26.1.8.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 00251a14995c8b1fe4af189a966a3f388955886d82daf88188dc977b3db1fe38
MD5 ab2d7a5df3bebc958b5a6b8652858151
BLAKE2b-256 d12d7b7a2de843331cb4c1920373ae209e1a4f4b737370c18fbfbcccbcbb1633

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.8.1-cp314-cp314-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 57bdc23f7f9d741ddd8044555ed4de031811eb88926ab33a7e25937d2404ce0a
MD5 68feada08c4ff5b33bb796f70fe96eb8
BLAKE2b-256 cd9f0f7b3523098d1ace8963ec98898811fe7ac50f3f34653e4934762e67657b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.8.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/7.0.0 CPython/3.12.13

File hashes

Hashes for aimmspy-26.1.8.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f92a8a3504c8c406d6d637f0a45b49a9e109111c5998412372a093180f38632c
MD5 233ec9a9cc3247fe0614340f38695ce1
BLAKE2b-256 da4700ffdaa6ae976de598180212cd4ad2297978676a37ab436ac54a3389ccee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.8.1-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 db2bdbb7fefdcf547b5968ac524f2041e76ab8e3b4827c2c880cc68fdf84612a
MD5 fb49294ec4b15ac791603562cb7acdf5
BLAKE2b-256 cf1d2e25d0633a8f959495e6bf4338b4a960028105ca3fc8c22830b69c2ecdaa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aimmspy-26.1.8.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/7.0.0 CPython/3.12.13

File hashes

Hashes for aimmspy-26.1.8.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 50c932247380ab904bb49ced583001d4c880215823412bb0936f1f4c29c7a713
MD5 c8495c59bdfd3fb842dc93169fb40f3e
BLAKE2b-256 252eb1d5405319ac16327de4faf27e79eed9fd5a02778702af4ae8328e529b78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.8.1-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 d9c1655aac33be2a988a11080efe789971e675f5c706b7ae1b6789b6c944a0d7
MD5 949570b3f5bd946dd1334dadd9625737
BLAKE2b-256 0358c9feb4fbcb6e3b425a3380d2b396b819eee8ff98a43bef123eb10c9f3259

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for aimmspy-26.1.8.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cd06be5374f52c246adb2c6315d7f743930934189219dfbbc6b09f0fd2a6c330
MD5 2c7adcc90c3900096935513e101b5543
BLAKE2b-256 cc5af62bfbbbc4a347131ad31780926bd44ddb671b738d7053fca05d4ec90570

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.8.1-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 97c0c3d8f9cb7a7fa46f38945e6123b9e1c1448e247929fd1400798b6129ef1a
MD5 ad0a5f500dd97e1176294512142f4dbd
BLAKE2b-256 c0af5343ccf05312cf10ada388b08d8d5a8969a950c15c6c20db7879b14458a0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for aimmspy-26.1.8.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 82df0e6d43b2ef3898e4ff22652db4eed63fd1fa1f53f13033a7176638d5d363
MD5 3f3fea09ae6a9696c8bafd0547b35df7
BLAKE2b-256 1900fad33be45196709b179a85622496fa2eca454c896859a3217a3a331a848a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aimmspy-26.1.8.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 c013ba25ded2395c213849b989f6f26feb2b90ece73cdc656bdc08e312325c32
MD5 337f0f61ca6911ec670fe520a59ec432
BLAKE2b-256 a3620a97f19a3e46832ce239a28c20eafb4256bf8a57db363f72e3f33fc9c96a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

26.1.8.1 This release

10 files

26.1.7.1

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