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

ModelicaML redux

ModelicaML redux

With Eclipse 3.5.0 and the old version of Papyrus (1.12.3), along with the other components as specified in section 2 of Wladimir's "ModelicaML: Getting Started" things appear to be working (thank you again Wladimir; see my previous post), and I was successfully able to load the TwoTanksSystem example supplied with ModelicaML_release_1_3_3. The question I have now is "how do I link the code with omc in order to run the simulation?" Is it a matter of transversing the code-gen directory and executing a loadFile() command for each .mo file and then run simulate()? Or is there an easier way within Eclipse/Papyrus/Modelica that I am missing? ("Getting Started" Figure 13 just says "Load all models"; Figures 13 and 14 are Dymola examples while Figures 24 and 25 are MathModelica Professional.)

Re: ModelicaML redux

Hi,

Presently, ModelicaML plugins can only generate ModelicaML code (.mo files) from ModelicaML models. There is no direct connection to OMC yet.

The way it works now is the following:
- Create a model using ModelicaML
- Generate Modelica code (the plugin will generate .mo files in folders based on your ModelicaML model stucture)
- Load the generated Modelica code in OMC (note that you only have to load the top level package.mo file and OMC will automatically load all classes that are underneath)
- Simulate a particular Modelica class (see OMC documentation for commands and how to do it)

I hope it helps.
Wladimir

There are 0 guests and 0 other users also viewing this topic