Python Bridge
This document describes how to work with the AIMMS Python bridge. The Python Bridge allows you to seamlessly integrate an AIMMS model and Python scripts in your project.
The AIMMS Python bridge consists of two components
pyaimms, an AIMMS Autolib, that allows you to execute a Python script from within an AIMMS procedure in your model,
aimmspy, a Python module, that allows you to write Python scripts that communicate with an existing AIMMS model.
You might need both in your project, but each of the above components can operate independently. We distinguish two typical use cases but these don’t have to be mutual exclusive.
AIMMS in the lead: for example, when you just want to run a Python script form within your AIMMS model that does nothing with data from your model, the Autolib would be sufficient,
Python in the lead: for example, when you want to create a Python script that pushes data to some AIMMS project, runs a solve and retrieves a solution.
And of course, when, from within AIMMS, you want to run a Python procedure that retrieves the data from some AIMMS identifier, performs some data analysis using some other Python library and send it back to AIMMS again, you would need both components in your project.
Installation
The aimmspy Python module can be installed from the Python Package Index. The AIMMS Autolib pyaimms can be installed from within the AIMMS IDE using the AIMMS Library Manager.
AIMMS License
To use the AIMMS Python library, you need to have an AIMMS developer version installed, a valid license and an already existing AIMMS project.