- Index
- » Developer
- » OpenModelica development
- » Python Modelica Compiler/ Anyone want...
Python Modelica Compiler/ Anyone want to help?
Python Modelica Compiler/ Anyone want to help?
I've been working with openmodelica for awhile and always have found it difficult to extend the compiler for my needs. Recently ANTLR released a python runtime. I was able to easily combine the AST created with antlr and the jinja templates engine to create a compiler from modelica to a python based simulation for simple examples. I'm looking for anyone with interest in helping me out.
https://github.com/jgoppert/pymola
Jinja template to render AST into python simulation:
https://github.com/jgoppert/pymola/blob … ympy.jinja
ANTLR 4 Modelica Grammar:
https://github.com/jgoppert/pymola/blob … odelica.g4
Re: Python Modelica Compiler/ Anyone want to help?
I just finished a hello world ipython notebook example using pymola:
Features:
1. Analytical jacobians with sympy
2. Scipy python ode solver
https://github.com/jgoppert/pymola/blob … mple.ipynb
- Index
- » Developer
- » OpenModelica development
- » Python Modelica Compiler/ Anyone want...