What does HackerNews think of Modia.jl?

Modeling and simulation of multidomain engineering systems

Language: Julia

For circuits a lot of them are represented by differential-algebraic equations (DAEs) and require modeling tools in order to handle the high differential index of the systems. This is the reason why they are typically handled via acausal modeling systems which can do index reduction. For Julia, this is the ModelingToolkit portion of the SciML ecosystem (https://docs.sciml.ai/ModelingToolkit/stable/), and some modeling tools like https://github.com/ModiaSim/Modia.jl and OpenModelica front-ends https://github.com/OpenModelica/OMJulia.jl.
The creators of Modelica, Hilding Elmqvist and Martin Otter, work in Julia these days so there's been a boom to the development of acausal modeling tooling in Julia. They built https://github.com/ModiaSim/Modia.jl and then we collaborated with them on some ideas to build ModelingToolkit.jl (https://docs.sciml.ai/ModelingToolkit/dev/). The latest versions and experiments in OpenModelica are now targeting ModelingToolkit as a compilation backend, which gives a pathway for legacy Modelica code to be used with the MTK ecosystem. The OpenModelica community has always been a very small group in comparison to the Dymola compiler team and so the open part of Modelica never really caught on, but we hope to help them piggyback off of our compiler to get it there. We'll have a workshop on this collaboration in Linköping next February if you're interested in the details.
The thing to watch in the space of Simulink/Modelica is https://github.com/SciML/ModelingToolkit.jl . It's an acausal modeling system similar to Modelica (though extended to things like SDEs, PDEs, and nonlinear optimization), and has a standard library (https://github.com/SciML/ModelingToolkitStandardLibrary.jl) similar to the MSL. There's still a lot to do, but it's pretty functional at this point. The two other projects to watch are FunctionalModels.jl (https://github.com/tshort/FunctionalModels.jl, which is the renamed Sims.jl), which is built using ModelingToolkit.jl and puts a more functional interface on it. Then there's Modia.jl (https://github.com/ModiaSim/Modia.jl) which had a complete rewrite not too long ago, and in its new form it's fairly similar to ModelingToolkit.jl and the differences are more in the details. For causal modeling similar to Simulink, there's Causal.jl (https://github.com/zekeriyasari/Causal.jl) which is fairly feature-complete, though I think a lot of people these days are going towards acausal modeling instead so flipping Simulink -> acausal, and in that transition picking up Julia, is what I think is the most likely direction (and given MTK has gotten 40,000 downloads in the last year, I think there's good data backing it up).

And quick mention to bring it back to the main thread here, the DataDrivenDiffEq symbolic regression API gives back Symbolics.jl/ModelingToolkit.jl objects, meaning that the learned equations can be put directly into the simulation tools or composed with other physical models. We're really trying to marry this process modeling and engineering world with these "newer" AI tools.

Maybe of interest in that context:

https://github.com/ModiaSim/Modia.jl

The authors of that tool have a strong background in modeling and simulation of differential algebraic equations. Not so much in designing DSLs, though, so there maybe some technical oddities. But I expect the simulation aspect to be quite decent.

There's a project to create a language similar to Modelica as a DSL in Julia, Modia[1]. I'm not currently a user of either language, but saw a presentation at JuliaCon about it[2] and thought it looked interesting.

[1] https://github.com/ModiaSim/Modia.jl [2] https://youtu.be/hVg1eL1Qkws

For simulation there is also a library that reimplements the Modelica language in Julia using macros:

https://github.com/ModiaSim/Modia.jl

Julia's meta-programming functionality is ideal for implementing such domain-specific languages (the popular JuMP suite is a flagship example in a different domain: https://jump.readthedocs.io/en/latest/).

Several groups are working on systems inspired by Modelica, including:

http://tshort.github.io/Sims.jl/latest/

and

https://www.modelica.org/events/modelica2017/proceedings/htm... (https://github.com/ModiaSim/Modia.jl)