Help - Search - Members - Calendar
Full Version: Direct DAE interface
Modelica Forum > Modelica > Modelica
dek577
I have a custom C++ interface for describing DAE systems that our solvers use. In looking at the Modelica Compiler, what is the recommended way to create a stub for any modelica model that implements that interface? I'm not interested in a CORBA server hosted by the OMC. I'd like to go through the parsing pipleline to create a flattened model with optimized and sorted equations which sit behind my DAE interface. Is the Code Generator in Open Modelica transparent enough for a new developer, not familiar with the codebase, to pick up, learn, and adapt to my needs?

Cheers,
DEK
dek577
Is my question regarding OpenModelica and the OMC posted in the wrong place or is there so little traffic on these boards that I should consider the community basically dead?

DEK

QUOTE(dek577 @ Nov 25 2008, 10:49 PM) *

I have a custom C++ interface for describing DAE systems that our solvers use. In looking at the Modelica Compiler, what is the recommended way to create a stub for any modelica model that implements that interface? I'm not interested in a CORBA server hosted by the OMC. I'd like to go through the parsing pipleline to create a flattened model with optimized and sorted equations which sit behind my DAE interface. Is the Code Generator in Open Modelica transparent enough for a new developer, not familiar with the codebase, to pick up, learn, and adapt to my needs?

Cheers,
DEK

Roland
Hello DEK,

for questions regarding OpenModelica, there is a subforum "MathModelica / OpenModelica". In the case of your question I think the problem is that none of the readers know an answer...

I wouldn't say that the community is dead. As you can see there are only a few questions but these usually get answered pretty quickly - if someone knows an answer or has an idea.

Regards,
Roland
adrpo

Hi all,

OpenModelica compiler uses a language called MetaModelica for implementing the compiler.
Is a small functional language with a Modelica syntax. I wouldn't say is hard to get familiar
with it (but I'm doing this since 4-5 years now smile.gif. The only problem is the complexity of the
compiler which makes it quite hard to do something very quickly.
If you are interested in learning there is a course on MetaModelica available here:
http://www.ida.liu.se/labs/pelab/modelica/...velopersCourse/

However, you can obtain an XML version of the DAE from OpenModelica.
This functionality is not yet documented as is rather new. It was implemented
by Filippo Donida: http://home.dei.polimi.it/donida/

You can build a script file such as model.mos with the contents:
CODE
loadModel(Modelica); // if you need the Modelica library
loadFile("Model.mo"); // load your model
dumpXMLDAE(Model); // generate an DAE xml file out of the model


Then you could just read this xml DAE in your program and use your C++ implementation to solve it.

Cheers,
Adrian Pop/
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.