Solved

Lauching AIMMS through AIMMSSelector with cloud licensing


Badge

Hi all,

I'm a researcher and I use AIMMS with an Academic License.

AIMMS is part of a routine I developed in Python and I used the "AIMMSSelector" to launch AIMMS, but since my license is now a cloud license I've not been able to launch AIMMS that way, it does not recognize the license, and only give me option to add a stand alone license or a network license server.

I've been searching for materials regarding this, but couldn't find any. Can you help me?

 

Here is the code I used to launch AIMMS previously:
#Initialize AIMMS
        sys.argv = ["makepy", "AimmsSelector.Selector64"]
        AimmsObj = win32com.client.Dispatch("AimmsSelector.Selector64")
        self.AimmsProj = AimmsObj.GetAimmsProject(f'{self.aimmsFileDir}\\{self.aimmsFileName}')
        self.AimmsProj.StartupMode = 1 #Start minimized
        self.AimmsProj.ProjectOpen(f'{self.aimmsFileDir}\\{self.aimmsFileName}', 0)

icon

Best answer by MarcelRoelofs 5 July 2021, 09:49

View original

2 replies

Userlevel 3
Badge +4

Hi @mglopes

To make this particular route work, you should at least add the following command line argument via the AIMMSSelector object:

--alluser-dir "%LOCALAPPDATA%/AIMMS/LauncherLicense"

with potentially the LOCALAPPDATA environment variable expanded, and you should make sure that your model is opened in developer mode with the IDE present (but I guess minimized should still be OK). Also realize that the current Academic and Community licenses expect you to accept the usage conditions once every day, which may be in your way for complete automation. 

Note, however, that the AIMMS COM object has been deprecated (see https://documentation.aimms.com/deprecation-table.html), and that, for the long run, we would advise you to start using the Data Exchange library to expose your model as a REST service on your local desktop, as discussed in 

 

Badge

It worked.
Thank you very much!

Reply


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

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