- Index
- » Users
- » Tetro
- » Profile
Posts
Posts
Thank you for your answer and for providing a model, it is really helpful.
I've been trying to create very simple models for experimenting and understanding the strings behind it all, but I'm having a few issues. Most of the problems I am modeling are as simple as the following code :
Code:
model example_floor_1
inner Modelica.Mechanics.MultiBody.World world;
Modelica.Mechanics.MultiBody.Parts.Fixed fixed;
MechanicalComponents.Floor floor;
MechanicalComponents.Object obj1(r_0.start = {1, 0, 0}, each r_0.fixed = true);
MechanicalComponents.FrictionForce friction1(force = extf1.f_world + obj1.gravity_force, floorinfo = floor.info,mu=1);
MechanicalComponents.ExternalForce extf1(f_0 = {0.1, 0, 0});
equation
connect(fixed.frame_b, floor.frame_start);
connect(obj1.frame_a, extf1.frame_b);
connect(friction1.frame_b, obj1.frame_a);
end example_floor_1;
I can easily create a model with variables of the corresponding types, however, when it comes to connecting them, I can't really find a way to do so.
If I'm using a predefined class such as MechanicalComponents.Object, do I still have to define connection ports for using frame_a and frame_b ? I may be missing something here, but shouldn't I be able to access these fields directly when defining my connections ?
Again, thank you for your help
So this means I would only have to generate .uml models from my own models, do you think such a thing would be doable without proving to be tedious ? Mostly, the problems that I am representing are quite simple, a few physical objects connected together with a few specific values in their attributes, nothing too fancy, so I probably don't need all the possibilities that ModelicaML might provide. I have absolutely no experience with Acceleo so I don't really know where to start. Please tell me there's simply a class in which you call a "transform" method on a file and the rest is taken care of by the application
Also, is there a place where I could download .uml samples to see the general aspect of the models that ModelicaML uses and which concepts of UML are being used ?
Thanks,
Yann
Edit : I think I may have found the entrypoint in the org.openmodelica.modelicaml.gen.modelica.popupactions package, as for the uml samples, I'd still appreciate a few, but I will also try to create some directly through the application.
Hello everyone,
I am currently trying to use a few parts of ModelicaML within the project that my team is working on. However, for various reasons, I have a hard time compiling the source code and using it to pinpoint which components I will require (Basically, the code that transforms the graphical model to Modelica code).
Are there any developers around who might be able to point me to which plug-in project may be involved ?
I was able to find the code that calls OMC to compile Modelica code and get the simulation results back in the project org.openmodelica.modelicaml.generate.modelica, I am not quite sure however that this is the actual code that is called when simulating a ModelicaML model, but it does what I need, which is providing a simple way to call OMC.
The other thing I need is model transformation. I suspect somewhere in the code is a plug-in that translates the drawn graphical model and translates it into Modelica code. This part of the code I can't find.
Thank you for your help,
Yann
Not sure this is the right section for this question but I only wanted to know if the current versions of ModelicaML were now compatible with Acceleo 3.0.
The installation guide states :
Note, the required version of Acceleo is not the one that is included in the Eclipse Modeling Components package. The required framework, the ModelicaML code generator is based on, is Acceleo 2.8 (an older version of Acceleo).
It is planned to migrate to Acceleo 3.0 (which is included in the Eclipse Modeling Components package) in near future.
But since the guide seems to be rather old itself, I wanted to have a confirmation.
Thank you,
Yann
I see, thank you for your answers.
The Modelica code is really a transitional step, it doesn't need to be pretty at all. However I had hoped to maintain a really high development level and never having to write code generation algorithms (If possible, avoiding to learn the Modelica language altogether ). My own research primarily revolves around modeling so I'd like to avoid having another layer of translating/parsing.
Doesn't Modelica internally use ASTs when parsing .mo files ? Would it really be this complicated to translate Java data types to the ones used in Modelica ?
Yann
Sorry for the double post, I meant to edit but hit quote...
Hello everyone,
I am currently co-developing a program which aims at reading high school physics problems from an exam and solve them. We are using Modelica to solve the problems once they have been parsed.
I am currently working on rethinking the project, currently written in perl, to use Java. OpenModelica apparently proposes a Java interface but from what I could read here and there, it is mostly about parsing Modelica models to Java classes, my aim would be to build a Modelica model from the Java classes and then use OMC to solve the problem described by the model I just built.
The whole chain would be : from natural language to a DSL of ours, from this DSL to a Java representation of the problem using Modelica classes, then get the results of the simulation.
At the moment we are parsing our DSL to Modelica text which is then passed on to OMC, the aim here would be to skip the transformation to Modelica text and use the Java interface to have a form that can be natively understood and modeled by both ends.
Would such a thing be possible ? I suppose it would but the java classes contained in the jar are almost undocumented...
Thank you in advance,
Yann
- Index
- » Users
- » Tetro
- » Profile