Skip to main content
Solved

calling AIMMS in python and the new REST API

  • November 16, 2021
  • 1 reply
  • 190 views

Forum|alt.badge.img

 

Dear AIMMS experts, it would be great if there is a working example related to calling AIMMS from python using the latest release REST API.

Also,  following on other recent python-AIMMS questions here, could you kindly clarify the following questions:

  1. is the method of calling AIMMS using 'win32com' in python still valid? (as seen in the office github repo example in 'examples/Functional Examples/Calling AIMMSCOM/RunAIMMS.py ' ?
  2. is the previous method of calling python using 'subprocess' module and command line still valid for the recent version of AIMMS ?
  3. does the ways of calling AIMMS in python subject to the type of license I have (I have both free and paid academic licenses) ?

Best answer by Mischa

Hi,

 

I take care of the release process at AIMMS and I use the code below to call an AIMMS model from within Python:

 

 

The specific details of this code are not relevant, other than that I indeed use the subprocess method to perform the call. Before doing so, I build a command string, which includes some commandline options and some commandline arguments that are picked up in this specific AIMMS model.

 

I think this should answer your 2nd question.

 

Kind regards,

Mischa

View original

1 reply

Mischa
AIMMSian
Forum|alt.badge.img+6
  • AIMMSian
  • 29 replies
  • Answer
  • November 19, 2021

Hi,

 

I take care of the release process at AIMMS and I use the code below to call an AIMMS model from within Python:

 

 

The specific details of this code are not relevant, other than that I indeed use the subprocess method to perform the call. Before doing so, I build a command string, which includes some commandline options and some commandline arguments that are picked up in this specific AIMMS model.

 

I think this should answer your 2nd question.

 

Kind regards,

Mischa