matlab-aimms

663 views
Skip to first unread message

alexandra....@manchester.ac.uk

unread,
May 21, 2013, 6:39:02 AM5/21/13
to ai...@googlegroups.com
Hi all,

In order to combine AIMMS and Matlab, COM interface is used for the communication between the programs.
Should I install also the interface-COM or this is already embedded in Matlab?
Or I can directly call AIMMS from Matlab by using the command:"h = actxserver('AIMMS.Project');"?
I would appreciate any advice.

Regards,
Alexandra

Guido Diepen

unread,
May 21, 2013, 7:33:20 AM5/21/13
to ai...@googlegroups.com
Hi Alexendra,

not sure about the exact details as I am not familiar with MatLab, but the h = actxserver statement looks like what you need to do indeed.

In the help menu of AIMMS, you can find the AIMMS COM documentation. Though the examples for AIMMS COM are given with Visual Basic, it will give you an idea how to do the communication with AIMMS.

Note that you will first have to create your model in AIMMS itself, you cannot do the modelling part from within Matlab via the COM interface.

Guido Diepen
AIMMS Specialist

ursula challita

unread,
May 22, 2013, 2:23:02 PM5/22/13
to ai...@googlegroups.com
Hi Alexandra,

I am facing the same problem and I need to call AIMMS from Matlab.
I want to check whether you have solved the issue and can provide any kind of help.

Thanks in advance.
Ursula

Alexandra Kapetanaki

unread,
May 23, 2013, 4:04:35 AM5/23/13
to ai...@googlegroups.com
Hi Usrula,

I havent figured out yet how can I call Aimms from matlab.
When I solve it I will let you knnow.
If you found it first please send me the way you did it.

Cheers,
Alexandra

Alexandra Kapetanaki
PhD Student
Electrical Energy & Power Systems Group, School of Electrical & Electronic Engineering
Ferranti Building (B18), The University of Manchester, M13 9PL, United Kingdom
Tel: +44 (0) 161 306 2263; Mobile: +44 (0) 7857 598179

From: ai...@googlegroups.com [ai...@googlegroups.com] on behalf of ursula challita [ursulac...@gmail.com]
Sent: 22 May 2013 19:23
To: ai...@googlegroups.com
Subject: [AIMMS] Re: matlab-aimms

--
You received this message because you are subscribed to a topic in the Google Groups "AIMMS - The Modeling System" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/aimms/84NPGboOFVs/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to aimms+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Guido Diepen

unread,
May 23, 2013, 5:49:03 AM5/23/13
to ai...@googlegroups.com
Hi,

I have once already seen a similar question on the MathWorks website: http://www.mathworks.com/matlabcentral/answers/20254

The opening post of the person there at least shows how to open a project. The problem experienced there was that he could not run a procedure, which I think was caused by the fact that the Run function of the COM object actually required an additional argument (namely the arguments for the procedure you want to run).


Guido Diepen
AIMMS Specialist

ursula challita

unread,
May 23, 2013, 10:42:19 AM5/23/13
to ai...@googlegroups.com
Thanks Guido.

Alexandra: I will check it and let you know if it works out:-)

ursula challita

unread,
May 23, 2013, 5:47:38 PM5/23/13
to ai...@googlegroups.com
Hello,

This worked out:
 h = actxserver('AIMMS.Project');
 ProjectOpen(h, 'C:\Users\URSULA\Documents\My AIMMS Projects...');
 h.Run('MainExecution', [ ]);

Thanks Guido for all the support.

Cheers,
Ursula
To unsubscribe from this group and all its topics, send an email to aimms+unsubscribe@googlegroups.com.

Bruno Abreu Calfa

unread,
Sep 10, 2014, 10:05:03 PM9/10/14
to ai...@googlegroups.com
Hi, Ursula,

I tried your approach, but it didn't run the procedure. It only opened the project file. Did you experience this? Am I missing something?

Thanks!


Bruno
Reply all
Reply to author
Forward
0 new messages