- Index
- » Users
- » wladimir
- » Profile
Posts
Posts
Hi,
mixing will be rather challenging. We are still looing for resources for migrating ModelicaML to the recent version of Eclipse, Papyrus, etc.
It is not clear yet when this may happen.
Hi,
unfortunately there is no support for ModelicaML in Eclipse Mars yet.
You can find a Eclipse instance for Windows here: http://www.ida.liu.se/labs/pelab/modeli … caML/temp/
Regards,
Wladimir
Hi Adrian
in the ModelicaML prototype there is a feature for applying (or removing) ModelicaML stereotypes to UML/SysML models.
This feature is just a helper. It maps as good as possible. After you will still need to check, validate and possibly modify the model.
Regarding behavior modeling: ModelicaML is good for dealing with dynamic behavior described using differential equations (you can use Modelica equations or algorithm for describing the class behavior). ModelicaML also allows translating state machines to algorithmic code. However, there are many limitations (e.g., w.r.t. using events, etc.). If you only have discrete or event-based behavior there are probably better tools for executing the model.
I hope it helps,
Wladimir
Hi,
I've just gave it a try: I downloaded the eclipse from the link above, created a new model, generated code and simulated it. It works fine.
Regarding Acceleo, normally if you don't install Acceleo 3.x there shouldn't be an issues. Also (even if I don't think this is relevant in this case) there are issues when installing Eclipse in deep folder structures or in folders with whitespaces. This should be avoided because there are to path length etc. restrictions on Windows.
Regards,
Wladimir
Hi,
it sounds like you are using an obsolete example model.
Try to create a new model and generate gode from it.
regards,
Wladimir
You can try to simulate the Modelica code in OMEdit to make sure that there are no errors...
Hi,
you can download a ModelicaML Eclipse instance for Win 64Bit here:
http://www.ida.liu.se/labs/pelab/modeli … clipse.zip
I hope it helps.
Regards,
Wladimir
Hi,
The prototype has not been updated yet.
It currently works only with Eclipse Kepler and older version of some frameworks used (e.g. Xtext - its' newer version causes the problem in this case).
In case you are using Windows we can point you to a .zip file that contains an Eclipse Kepler instance that has everything installed.
Wladimir
Modelica code is generated from a .uml file that contains the UML model with ModelicaML stereotypes applied. See the ModelicaML profile description at http://www.ida.liu.se/labs/pelab/modeli … 1_3_2.html for UML concepts used.
You can look at: "/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/popupactions/GenerateModelicaCodeFromEntireModelicaMLModelAction.java" to see how the CG is invoked from Java code (e.g. the runchain() operation).
I can send you an example of a ModelicaML model ...
Hi Yann,
The Modelica code is generated from .uml files. The .uml file contains only the model and no diagrams.
The plugin used for Modelica code generation is "org.openmodelica.modelicaml.gen.modelica" (it is based on Acceleo 2.x). The one you mentioning (org.openmodelica.modelicaml.generate.modelica) is based on Acceleo 3.x and is still ongoing work.
Wladimir
Hi,
no it still uses Acceleo 2.x
Hi,
to avoid this you will need to increase the memory allocated to Eclipse.
In the ModelicaML installation guide there is a sectionthe includes an example on how to update the eclipse.ini file.
Hi,
Please make sure that Acceleo 2.8 is installed before installing ModelicaML.
We haven't moved yet to Acceleo 3.
Just follow the instructions from the installation manual.
Wladimir
Ok, I see. We will adress this issue soon when migrating to the new Acceleo framework for Modelica code generation.
In the mean time I implemented the generation of package.encoding file for the top-level package.mo (following your suggestion).
The update wil be available tomorrow.
Wladimir
Hi,
thanks for pointing this out.
Have you tried to adjust your Eclipse Preferenes (Window->Preferences->General->Workspace->Text file encoding -> UTF-8)?
Wladimir
Hi,
this was a bug.
Please update ModeicaML.
Wladimir
Hi,
there is now an initial version of simulation functionality in ModelicaML that you could try...
regards
Wladimir
Hi,
thanks for pointing out...
Please update ModelicaML and synchronized your model again.
Wladimir
Hi ,
yes, you can create ports and then set the type.
Note, for using primitive types such as ModelicaReal, ModelicaBoolean etc., you will need to import Modelica Predefined Types to appear them in the type selection dialog.
BTW, you should follow the tutorials from the ModelicaML website because they are kept updated.
Hope it helps
Wladimir
Hi,
there are at least example models here: http://www.ida.liu.se/~pelab/modelica/O … eBindings/
What is unclear in the tutorial?
Wladimir
Hi,
I created examples for requirements formalization and Value Bindings:
http://www.ida.liu.se/~pelab/modelica/O … eBindings/
For generating verification models click on the SystemEnvironment class...
Wladimir
Are you using windows? It may lead to problems if the path to your files is too long. Have you tried to put your workspace to a shorter path?
Is OMC installed correctly (e.g. is the omc.exe in the /bin/ folder of your OpenModelica installation)?
What is shown in the tree viewer?
Wladimir
Hi,
what is the result, are there any messages? Have you tried the project I created?
Wladimir
Hi Michael,
this feature is very fresh and there is no detailed documentation yet. I will try to upload a running example in the next few days.
Essentially what you need to do is to formalize requirements (i.e. model the violation monitors), and create value bindings (clients are requirement attributes and providers are attributes from the system model). Then create scenarios and define which requirements can be verified using these scenario (i.e. set a "usedToVerify" dependencies from scenarios to requirements). Then define value bindings between scenarios and system model (clients are typically system model attributes, providers are scenario attributes) in order to indicate that this scenario can stimulate the system model. By clicking on the system model you can then let generate verification models (i.e. combinations of scenarios and requirements) for the selected system model. All the required bindings are inferred automatically and you can now generate Modelica code and simulate the verification models in order to see if any of the requirements are violated.
Wladimir
Hi,
this property is obsolete and should not be used anymore.
For a descriptive traceability between model elements you can use UML::Dependency.
Wladimir
Hi ,
it is an error in the model. You can simply delete the "Component" in the class "Design::Components::PIcontinuousController".
In order to simulate it in OMEdit, you first have to generate code from the ModelicaML model by clicking on the button "Generate Modelica Code" in your Eclipse. The code is generated into the "code-gen" folder of your project.
In OMEdit open the generated top-level "package.mo" (all models underneath will be loaded automatically). Then open the class you want to simulate (e.g. Design::TanksConnectedPI) and click on "Simulate" button. Here you can define the stopTime = 400 and leave the rest default, and click "Simulate".
Hope it helps
Wladimir
I used your code, created a ModelicaML project and imported/synchronized the code.
You can find the example here: http://www.ida.liu.se/~pelab/modelica/O … caML/temp/
To import the exmple in Eclipse goto Import->Existing Project into Workspace -> select Archive File.
What Eclipse and ModelicaML are you using?
Wladimir
Hi,
there is the restriction that the first level Modelica class must be a package (I updated the getting started document) with no extends and import.
Also, you will may have to use the latest OMC nighly build because there were changes in the OMC API.
Hope it helps.
Wladimir
Hi,
there is a new version of ModelicaML for Papyrus 0.8 available.
The ModelicaML simulation facilities are still under construction. We recommend to use OMEdit (it is part of the OpenModelica tooling) for simulating the generated Modelica code. For that you should load the (generated) top-level package.mo in OMEdit, open the class you want to simulate and follow the OMEdit simuilation wizard.
regards
Wladimir
Hi,
there is a new version of ModelicaML for Papyrus 0.8 available.
regards
Wladimir
Hi,
Unfortunately the migration to Papyrus 0.8.2 will take more effort than expected. Any contributions are welcome!
There is a new build of ModelicaML for Papyrus 0.7.4. In addition we put a .zip with the full eclipse for windows here: http://www.ida.liu.se/~pelab/modelica/O … /software/
I hope it helps.
Wladimir
Hi,
it sounds like the Papyrus MDT is not installed correctly.
Please follow carefully the instructions for updating Papyrus to the version 0.7.4.
Also take care not to install the new Acceleo version 3.x but the old version 2.8.
Hope this helps.
Wladimir
Hi,
this is a bug in the Eclipse simulation plugin. We are fixing it.
In the meantime you can generate code from the ModelicaML model, load it in OMEdit and simulate it there.
Hope it helps.
Wladimir
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
Hi,
ModelicaML eclipse plugins can only be used for the old Papyrus version (see http://www.papyrusuml.org).
We plan to migrate ModelicaML plugins to the new Papyrus MDT version after its release (see http://www.eclipse.org/modeling/mdt/papyrus/).
Wladimir
Hi,
there is no need to import the ModelicaML profile.
After having created a Papyrus project you can apply the profile to the top-level UML Model element (see ModelicaML: Getting Started, section 2.9).
Then you can create ModelicaML elements by using the ModelicaML outline actions (see ModelicaML: Getting Started, p.7).
For generating modelica code see ModelicaML: Getting Started, p.8.
Hope it helps.
Wladimir
Hi,
there is a new version of ModelicaML: Getting Started with updated screenshots.
Regarding installation: We are still using the "old" versions of Acceleo and Papyrus. These are not included into the Eclipse MDT project.
Wladimir
- Index
- » Users
- » wladimir
- » Profile