File Exchange

image thumbnail

OpenModelica-Matlab-Interface

version 1.3.0.0 (15.1 KB) by Christian Schaad
Compiles, runs, imports openmodelica models.

7 Downloads

Updated 11 Jul 2012

View Version History

View License

Some Matlabfunctions to compile, run and import solutions of OpenModelica.
Example script to produce a parameter variation of a simple test model.
Requires installation of OpenModelica...

Cite As

Christian Schaad (2020). OpenModelica-Matlab-Interface (https://www.mathworks.com/matlabcentral/fileexchange/20120-openmodelica-matlab-interface), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

Fabian Weber

Hello I try to use your interface.
I got the follwing messege by running the on_mat_example.m script.

stdout | warning | simulation_input_xml.c: Error: failed to read the XML file HelloWorld.test_init.xml: not well-formed (invalid token) at line 91
assert | debug | see last warning

ans =

-1

Error using load
Unable to read file 'HelloWorld.test_res.mat'. No such file or directory.

Error in omimport (line 11)
load ([modelname,'_res.mat']);

Error in om_mat_example (line 30)
omimport(modelname); % Read results into Matlab Workspace

I use Matlab R2016b and OpenModelica1.13.264bit.

thank you for your help.

Luka

Useful things. Is there an option the other way around? To import data from MATLAB into OpenModelica without a Dymola (commercial) interface? May not be the right place to ask this question, just wondering...

Fernando

On windows gives the following error when compiling the model of the example (file omcompile line 90):

>> system([win_om_path,'omc.exe +s simo.mos'])
true
false
"Unknown model in instantiateModel: HelloWorld.test
"
{"",""}
ans =
0

any idea?

Stefan

The above link to newer versions is dead. Is there a version available that works with OpenModelica 1.8.1 ?

Wolfgang Ulmer

Had no time yet to test it but newer versions can be found under http://openmodelica.ida.liu.se:8080/cb/proj/doc.do?doc_id=1085

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!