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

Integrate a model in a custom app

Integrate a model in a custom app

Hello,

I am working with openModelica recently.
I have designed a model in openModelica which works fine.
So now I want to export this model in a custom C++ app on which I will be able :
* to manage inputs of model at first time (for that I have unsuccessfully tried to take C code generated from openmodelica after simulation -> problem : linked with compiled libraries which limit my usage)
* secondly control model execution -> play/pause/stop model execution.

Please someone would has a proposal ?

Thanks in advance for your answers.

Stedy.

Re: Integrate a model in a custom app

Did you try exporting a source-code FMU? It doesn't depend on any external libraries... https://github.com/OpenModelica/OpenMod … ompile.mos

Re: Integrate a model in a custom app

It is also possible to use the OPC-UA interface to control a simulation.

Re: Integrate a model in a custom app

Thanks for your answer.

But I think it's possible to get generated code from openmodelica, alter it and make a dll for my custom C++ app.
I use Openmodelica v1.9.6.
My objectives :
* launch designed model in infinite loop so I can change inputs as I want
* control simulation from my custom app (play, pause, stop mechanism)

Could someone help me in this way ?

Concerning FMU export, I have tried without success => same philosophy as "code generation files".

Stedy.

Edited by: stedy - Nov-21-16 10:01:35

Re: Integrate a model in a custom app

HI,

I have tried exporting libraries, but I'm now a liitle bit confused.
What should I do after exporting ?

Thanks.

Stedy.

Edited by: stedy - Nov-25-16 08:36:08

Re: Integrate a model in a custom app

Thanks for your answer.

But I think it's possible to get generated code from openmodelica, alter it and make a dll for my custom C++ app.
I use Openmodelica v1.9.6.
My objectives :
* launch designed model in infinite loop so I can change inputs as I want
* control simulation from my custom app (play, pause, stop mechanism)

Could someone help me in this way ?

Concerning FMU export, I have tried without success => same philosophy as "code generation files".

Stedy.

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