Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

OpenModelica-Matlab-Interface [closed]

asked 2018-04-06 15:13:00 -0600

Adrian's avatar

Hi. I'm trying to use and interface between Matlab and OMEdit. I found this one (https://es.mathworks.com/matlabcentral/ … function). An example code is within the download. However I can't get the same results like the autor did with the code given. (You can see the results in the pdf file called plot). I understood that using "omcompile(hello.mo,'modelname')" I get a model compiled in Matlab. Then I can simulate it (omrun(modelname)) and see the results with "omimport(modelname)". So I could re-simulate this model many times as I want without use OMEdit again. The files need one matrix, "HelloWorld.test_res.mat" to execute some commands. The command "omrun(modelname)" deletes that matrix and it don’t create a new one, but the next command (omimport(modelname)) needs this matrix to load the results into Matlab.

I did some changes into the files but I couldn’t make the example works. I can use it to see the results I simulated in OMEdit, but if I tried to change the parameter “a” through Matlab (omparameter), the parameter doesn’t change and I always see the same.

I'd appreciatte the help that you could give me.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Adrian
close date 2018-04-11 03:45:08.213325

1 Answer

Sort by » oldest newest most voted
0

answered 2018-04-11 03:44:47 -0600

Adrian's avatar

This interface is old. There is a new one (https://github.com/OpenModelica/OMMatlab) but is still in development. I'll close the question.

edit flag offensive delete link more

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2018-04-06 15:13:00 -0600

Seen: 317 times

Last updated: Apr 11 '18