Modia.jl icon indicating copy to clipboard operation
Modia.jl copied to clipboard

More models converted from Modelica Standard Library

Open HildingElmqvist opened this issue 7 years ago • 6 comments

I am working on a recursive descent parser for Modelica written in Julia in order to automatically translate more Modelica models as test cases for Modia.

HildingElmqvist avatar Oct 22 '18 11:10 HildingElmqvist

Hello Modia People, Mr Elmqvist,

Will this software be available publicly ?

o314 avatar Oct 23 '18 03:10 o314

Yes. I just need to get it a bit more complete and robust. I will then put it under ModiaSim. What's a good name? Modelica2Modia?

HildingElmqvist avatar Oct 23 '18 06:10 HildingElmqvist

Yes. I just need to get it a bit more complete and robust. I will then put it under ModiaSim. What's a good name? Modelica2Modia?

ModelicaToModia (Modelica and Modia use correct English words and try to avoid abbreviations)

MartinOtter avatar Oct 23 '18 06:10 MartinOtter

Sorry, clicked on the wrong button. Did not want to close this issue.

MartinOtter avatar Oct 23 '18 06:10 MartinOtter

I initially wanted to map the Modelica package structure onto the Julia module structure. However, this does not work because there are cyclic dependencies between some Modelica packages.

I did not find any trick to handle cyclic module dependencies in Julia. Any input on this?

This would mean that the Modelica libraries needs to be flattened, i.e. sub-pacages removed and model paths such as Modelica.Blocks.Continuous.Integrator would be replaced by a name such as Modelica_Blocks_Continuous_Integrator.

Any othersuggestion?

HildingElmqvist avatar Oct 25 '18 12:10 HildingElmqvist

I don't know enough Julia already to specifically answer about Julia, but a generic good practice is to use the Inversion of Control pattern.

There is a good description there How to solve circular package dependencies

IMHO the flattening would lead to a double hierarchy, which could be very noisy and disturbing for users.

o314 avatar Oct 25 '18 13:10 o314