ModelicaCC is a Modelica C Compiler implemented in C++, the main goal of this project is to provide an environment to develop and test novel algorithms involved in the different compilation stages of large scale Modelica models. The different stages of the compilation pipeline follows the usual order:
- Parsing
- Flattening
- Index Reduction
- Sorting
- Code Generation
- Model Simulation
The input/output of each stage are valid Modelica models (except for the very last stage which produce C code). Each stage converts the Modelica model fed as input into a “simpler” equivalent one. As the compiler uses the QSS Solver for the C code generation and simulation, the goal of the previous stages is to obtain a valid μ–Modelica model.
The following tools are generated:
- parser
- antialias
- flatter
- causalize
- mmo
[1] Federico Bergero, Mariano Botta, Esteban Campostrini, Ernesto Kofman. Efficient Compilation of Large Scale Dynamical Systems Proceedings of the 11th International Modelica Conference 2015
[2] Pablo Zimmermann, Joaquin Fernandez, Ernesto Kofman. Set-based graph methods for fast equation sorting in large DAE systems EOOLT '19: Proceedings of the 9th International Workshop on Equation-based Object-oriented Modeling Languages and Tools 2019
[3] Denise Marzorati, Joaquín Fernández, and Ernesto Kofman. 2024. Efficient Matching in Large DAE Models. ACM Trans. Math. Softw. Just Accepted (June 2024). https://doi.org/10.1145/3674831
[4] Denise Marzorati, Joaquin Fernández, Ernesto Kofman. Connected Components in Undirected Set--Based Graphs. Applications in Object--Oriented Model Manipulation Applied Mathematics and Computation, Volume 418, 2022, 126842,ISSN 0096-3003, https://doi.org/10.1016/j.amc.2021.126842.
[5] Ernesto Kofman, Joaquín Fernández, Denise Marzorati. Compact sparse symbolic Jacobian computation in large systems of ODEs Applied Mathematics and Computation, Volume 403, 2021, 126181, ISSN 0096-3003, https://doi.org/10.1016/j.amc.2021.126181.
These are generic installation instructions.
In order to be able to install and compile ModelicaCC, the following dependencies must be installed:
* autoconf 2.69 (avoid 2.71)
* boost1.81
* cmake
* doxygen
* g++
* libginac-dev
* make
The simplest way to compile this package is to run the following commands from the library root directory (${MODELICACC_ROOT_DIR}):
-
mkdir build -
cd build -
cmake ..Note that by default the biuld type is set to
Release, to make a debug build, add-DCMAKE_BUILD_TYPE=Debug -
make -
You can remove the generated library and object files from the source code directory by typing
make clean-all.
The makefile script accepts the following targets:
-
update_sbg: updates the SBG library.
-
main_test: builds and run integration and unit tests.
-
doc: builds the documentation.
To list all the available targets run make help.
- Integrate SCC SBG library algorithm for causalization.
- Generate Modelica code to solve algebraic loops.
- Implemented SBGraphs as an independent library. As such, new algorithms for causalization will be listed in its corresponding repository.
- Implemented SBGraphs data structures and helper classes.
- Implemented new flatter algorithm based on SBGraphs.
Please see the file called LICENSE.
Report bugs to: fernandez@cifasis-conicet.gov.ar