Skip to main content
Dear Community,



I plan to work from the Python workbench to call AIMMS to execute the optimization for my research project.



I have some questions about linking AIMMS to Python:



1) How do I execute the AIMMS file by calling it from Python?

2) Will the results be written back to Python? Or, how can I export the results to the Python workbench?



Thanks in advance, I look forward to executing my research with AIMMS...



Best regards,

Hi @Curious AIMMS-bot ,

We recommend you to use the AIMMS command line options to do so, as explained in the following PDF:
https://download.aimms.com/aimms/download/manuals/AIMMS3UG_CallingAIMMS.pdf

And in the following How-To:
https://how-to.aimms.com/Articles/257/257-run-batch-commands-in-aimms-command-line-tool.html


To exchange data, you may choose between the following 3 options:

- a database, like SQLite as explained in the following document:
https://how-to.aimms.com/Articles/118/118-Connect-SQLite.html

- Excel through the AIMMSXLLibrary as explained in the following document:
https://how-to.aimms.com/C_Developer/Sub_Connectivity/sub_excel_csv/index.html

- or a text file in AIMMS data format as explained in the following PDF.
https://download.aimms.com/aimms/download/manuals/AIMMS3LR_TextDataFiles.pdf


Hope it helps !


To make this a bit more concrete, you can use the following Python code for that:

 

 


Hi Mischa and Arthur,

If I understand it correctly, this will initiate a hidden aimms session to run through the MainInitialization to MainTermination procedures, or user specified procedures.

I would like to know how to link aimms as a component in my python application and also how to access the aimms command line tool from a python application.

Thanks in advance,

James

 


Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator