Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Merging modelica model with external project

Merging modelica model with external project

Hello all,

I'm new to OpenModelica and I've encountered the following issue.
I'm trying to merge my Modelica model with some external C++ code written in Eclipse (windows7/minGW). I spend almost three days looking for a solution of this problem. I tried the FMU export but it just doesn't work for me. I have some solvers, and I'm only intersted in automatic generation of my models function whitch could be used for numerical integration. I hope this is posible.

Thank you for your help,
Adam

Re: Merging modelica model with external project

What kind of external code is it that you are writing? An FMU master algorithm with some of your own solvers that you want to import generated Modelica code into?
I suggest looking into FMIL in that case (to parse the FMI XML data, etc): http://www.jmodelica.org/FMILibrary

Re: Merging modelica model with external project

Thank You for such a quick reply.
I don't want to write a FMU master algorithm but if it would be benefitial I will consider it. I want to improve my process of model development. Now I'm developing models in OMedit or Octave and then port it to RT C/C++ online simulation. I was wondering if it would be posible to skip the porting phase with the use of OpenModelica and generate code automatically.

Adam

Re: Merging modelica model with external project

It depends what kind of porting you need done (what is it that needs OpenModelica generates that you want done differently?). Some things are easy to generate.

Re: Merging modelica model with external project

For example I have a model in OMEdit which I integrate with Runge-Kutta method. It would be great if it was possible to generate files with function f which was integrated by RK numerical routine and a function with initialization of states. I hope that I only need to add some flag to omc.

Adam

Re: Merging modelica model with external project

That's FMI for co-simulation. Our support for FMI co-simulation is very limited.

Re: Merging modelica model with external project

Thank You for your help. I will try to simulate my model with the FMI Library.

There are 0 guests and 0 other users also viewing this topic
You are here: