- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » ModelicaML code-sync problem
ModelicaML code-sync problem
ModelicaML code-sync problem
Hi,
I am following the ModelicaML: Getting Started pdf to build ModelicaML model based on existing .mo file. So I put .mo files under code-sync, somehow it doesn't pick up the model. I also tried the two tank model code, which is auto generated, but still nothing being pick up. The following is the proxy synchronization report.
Number of loaded classes: 0
Number of loaded components: 0
Number of loaded extends relations: 0
******************** LOG ********************
Is there particular steps, I have to do before putting models under code-sync folder? Is there any constraint on the code structure?
Thanks,
Yuchen
Re: ModelicaML code-sync problem
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
- wladimir
- 37 Posts
Re: ModelicaML code-sync problem
Hi Wladimir,
I was using 1.8.1 r10984. I wish that's not the problem.
Can you upload the example in the start up tutorial for code-sync model, so I can refer to as what it should look like?
I tried very simple model like the following,
package testModel
class SamplingClock
parameter Modelica.SIunits.Time first = 0;
parameter Modelica.SIunits.Time interval = 1;
Boolean clock;
Real x(start=1);
equation
clock = sample(first,interval);
when clock then
x=-pre(x);
end when;
end SamplingClock;
end testModel;
Thank you,
Yuchen
Re: ModelicaML code-sync problem
That's already ancient, take the latest build from here:
http://build.openmodelica.org/omc/build … ly-builds/
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: ModelicaML code-sync problem
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
- wladimir
- 37 Posts
Re: ModelicaML code-sync problem
Hi,
what is the result, are there any messages? Have you tried the project I created?
Wladimir
- wladimir
- 37 Posts
Re: ModelicaML code-sync problem
Same result as before it doesn't recognize the model in the folder, which is
Number of loaded classes: 0
Number of loaded components: 0
Number of loaded extends relations: 0
******************** LOG ********************
I tried that project, and whenever I want to refresh it complains about not being able to find the model file.
Re: ModelicaML code-sync problem
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
- wladimir
- 37 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » ModelicaML code-sync problem