Posted Wed, 13 Mar 2013 15:56:00 GMT by Vianney Courdent

I am willing to execute the MOUSE computational engine from Matlab by using the COM interface technology. 

In order to call the COM interface in Matlab I am using the function “actxserver” with the program ID “MOUSESimLaunch.MOUSE”. 

Matlab recognizes the COM interface (can be tested with the function “iscom”) but does not recognize the “RunType” property in the MOUSE engine COM interface. Therefore the simulation cannot be launch.

Does anyone have some experiences on this issue?

PS: I am using as reference the “MOUSE Engine – Additional features” (2009) document, chapter 6 and 7.

Thank you,
Best regards,
Vianney Courdent
Posted Thu, 14 Mar 2013 14:34:52 GMT by Niels Jensen
I have previously used the command dos (...). The we used some. Mex files which we had previously made in MU.

As I remember it, it is something with:
dos ('"path to MOUSE"' '"path to your mex file" "type of simulation"')[/code]

The type of simulation I mean runoff or HD

But try google the dos(...) command.

\Niels Thule
Posted Thu, 21 Mar 2013 09:55:19 GMT by Vianney Courdent
Hej Niels Thule,

Thank you for your answer. I made some researches, there is a function in Matlab to call dos command. But it seems quite complicated to go through the dos when Mike Urban COM interface can be open directly with Matlab.

The purpose of using Matlab is to run some calculations with the data extracted from the simulation.

The problem being that some of the methods and classes defined in MU COM interface are not recognized by Matlab. My reference “MOUSE Engine – Additional features” was made in 2009 so I tried with Mike Urban 2009 and 2011, both give the same result.

Does anyone have experience with MU COM interface? Or have some documentation on the topic ?

Thank you,
\Vianney Courdent
Posted Thu, 21 Mar 2013 10:12:53 GMT by Niels Jensen
If you have problems getting data out of MU, try reading about the M11Extra tool. We used it to read the result files and get the results into Matlab.
Unfortunately, I do not know the MU COM interface :(

\Niels Thule
Posted Sun, 31 Mar 2013 15:29:27 GMT by Vianney Courdent

I solve part of my issues so I let you know in case some of you are interrested on the topic.

Some commands of the COM Interface need to be called through the Matlab method "set" and "invoke". Two examples:

set(MOUSEapp, 'RunType', 'HD')
Output(i,1) = invoke(MOUSEapp, 'GetValue', 1, 1, char(Node_Name(i,1)), 0);

But I still have an issue: If I can launch a basic simulation with both MU 2009 and MU 2011. The step by step simulation is only working with MU 2009.

Does any one knows what are the changes made to the COM Interface between MU 2009 and MU 2011?

Thank you,

Vianney Courdent

You must be signed in to post in this forum.