ModelingToolkit
An acausal modeling framework for automatically parallelized scientific machine learning (SciML) in Julia. A computer algebra system for integrated symbolics for physics-informed machine learning and automated transformations of differential equations
Science Score: 64.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
15 of 137 committers (10.9%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.3%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
An acausal modeling framework for automatically parallelized scientific machine learning (SciML) in Julia. A computer algebra system for integrated symbolics for physics-informed machine learning and automated transformations of differential equations
Basic Info
- Host: GitHub
- Owner: SciML
- License: other
- Language: Julia
- Default Branch: master
- Homepage: https://mtk.sciml.ai/dev/
- Size: 1010 MB
Statistics
- Stars: 1,549
- Watchers: 27
- Forks: 232
- Open Issues: 502
- Releases: 452
Topics
Metadata Files
README.md
ModelingToolkit.jl
ModelingToolkit.jl is a modeling framework for high-performance symbolic-numeric computation in scientific computing and scientific machine learning. It allows for users to give a high-level description of a model for symbolic preprocessing to analyze and enhance the model. ModelingToolkit can automatically generate fast functions for model components like Jacobians and Hessians, along with automatically sparsifying and parallelizing the computations. Automatic transformations, such as index reduction, can be applied to the model to make it easier for numerical solvers to handle.
For information on using the package, see the stable documentation. Use the in-development documentation for the version of the documentation which contains the unreleased features.
Standard Library
For a standard library of ModelingToolkit components and blocks, check out the ModelingToolkitStandardLibrary
High-Level Examples
First, let's define a second order riff on the Lorenz equations, symbolically lower it to a first order system, symbolically generate the Jacobian function for the numerical integrator, and solve it.
```julia using OrdinaryDiffEqDefault, ModelingToolkit using ModelingToolkit: tnounits as t, Dnounits as D
@parameters σ ρ β @variables x(t) y(t) z(t)
eqs = [D(D(x)) ~ σ * (y - x), D(y) ~ x * (ρ - z) - y, D(z) ~ x * y - β * z]
@mtkcompile sys = System(eqs, t)
u0 = [D(x) => 2.0, x => 1.0, y => 0.0, z => 0.0]
p = [σ => 28.0, ρ => 10.0, β => 8 / 3]
tspan = (0.0, 100.0) prob = ODEProblem(sys, u0, tspan, p, jac = true) sol = solve(prob) using Plots plot(sol, idxs = (x, y)) ```

This automatically will have generated fast Jacobian functions, making it more optimized than directly building a function. In addition, we can then use ModelingToolkit to compose multiple ODE subsystems. Now, let's define two interacting Lorenz equations and simulate the resulting Differential-Algebraic Equation (DAE):
```julia using DifferentialEquations, ModelingToolkit using ModelingToolkit: tnounits as t, Dnounits as D
@parameters σ ρ β @variables x(t) y(t) z(t)
eqs = [D(x) ~ σ * (y - x), D(y) ~ x * (ρ - z) - y, D(z) ~ x * y - β * z]
@named lorenz1 = System(eqs, t) @named lorenz2 = System(eqs, t)
@variables a(t) @parameters γ connections = [0 ~ lorenz1.x + lorenz2.y + a * γ] @mtkcompile connected = System(connections, t, systems = [lorenz1, lorenz2])
u0 = [lorenz1.x => 1.0, lorenz1.y => 0.0, lorenz1.z => 0.0, lorenz2.x => 0.0, lorenz2.y => 1.0, lorenz2.z => 0.0, a => 2.0]
p = [lorenz1.σ => 10.0, lorenz1.ρ => 28.0, lorenz1.β => 8 / 3, lorenz2.σ => 10.0, lorenz2.ρ => 28.0, lorenz2.β => 8 / 3, γ => 2.0]
tspan = (0.0, 100.0) prob = ODEProblem(connected, u0, tspan, p) sol = solve(prob)
using Plots plot(sol, idxs = (a, lorenz1.x, lorenz2.z)) ```

Citation
If you use ModelingToolkit.jl in your research, please cite this paper:
@misc{ma2021modelingtoolkit,
title={ModelingToolkit: A Composable Graph Transformation System For Equation-Based Modeling},
author={Yingbo Ma and Shashi Gowda and Ranjan Anantharaman and Chris Laughman and Viral Shah and Chris Rackauckas},
year={2021},
eprint={2103.05244},
archivePrefix={arXiv},
primaryClass={cs.MS}
}
Owner
- Name: SciML Open Source Scientific Machine Learning
- Login: SciML
- Kind: organization
- Email: contact@chrisrackauckas.com
- Website: https://sciml.ai
- Twitter: SciML_Org
- Repositories: 170
- Profile: https://github.com/SciML
Open source software for scientific machine learning
Citation (CITATION.bib)
@misc{ma2021modelingtoolkit,
title={ModelingToolkit: A Composable Graph Transformation System For Equation-Based Modeling},
author={Yingbo Ma and Shashi Gowda and Ranjan Anantharaman and Chris Laughman and Viral Shah and Chris Rackauckas},
year={2021},
eprint={2103.05244},
archivePrefix={arXiv},
primaryClass={cs.MS}
}
@article{DifferentialEquations.jl-2017,
author = {Rackauckas, Christopher and Nie, Qing},
doi = {10.5334/jors.151},
journal = {The Journal of Open Research Software},
keywords = {Applied Mathematics},
note = {Exported from https://app.dimensions.ai on 2019/05/05},
number = {1},
pages = {},
title = {DifferentialEquations.jl – A Performant and Feature-Rich Ecosystem for Solving Differential Equations in Julia},
url = {https://app.dimensions.ai/details/publication/pub.1085583166 and http://openresearchsoftware.metajnl.com/articles/10.5334/jors.151/galley/245/download/},
volume = {5},
year = {2017}
}
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Yingbo Ma | m****5@g****m | 1,432 |
| Christopher Rackauckas | a****s@c****m | 1,214 |
| Aayush Sabharwal | a****l@g****m | 1,137 |
| vyudu | v****n@g****m | 286 |
| Shashi Gowda | g****a@m****u | 261 |
| Samuel Isaacson | i****s | 235 |
| Herman Sletmoen | h****n@g****m | 164 |
| Fredrik Bagge Carlson | b****n@g****m | 129 |
| Harrison Grodin | h****n@g****m | 113 |
| Venkateshprasad | 3****k | 100 |
| Torkel | t****n@g****m | 83 |
| Benjamin Chung | c****e@g****m | 73 |
| Lucas Morton | 2****n | 60 |
| Valentin Kaisermayer | v****r@b****u | 53 |
| ArnoStrouwen | a****n@t****e | 52 |
| CompatHelper Julia | c****y@j****g | 51 |
| Keno Fischer | k****o@j****m | 46 |
| Sebastian Micluța-Câmpeanu | s****5@p****e | 40 |
| Mason Protter | m****r@i****m | 37 |
| anand jain | a****j@u****u | 35 |
| Brad Carman | b****n@i****m | 32 |
| contradict | c****t@g****m | 30 |
| github-actions[bot] | 4****] | 28 |
| Vaibhav Dixit | v****t@g****m | 27 |
| dd | dd | 24 |
| Pepijn de Vos | p****s@g****m | 21 |
| Sharan Yalburgi | s****i@g****m | 19 |
| xtalax | a****y@g****m | 19 |
| Chris Elrod | e****c@g****m | 18 |
| Dan Padilha | d****d@g****p | 16 |
| and 107 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 911
- Total pull requests: 1,761
- Average time to close issues: 9 months
- Average time to close pull requests: 23 days
- Total issue authors: 235
- Total pull request authors: 73
- Average comments per issue: 3.37
- Average comments per pull request: 1.54
- Merged pull requests: 1,304
- Bot issues: 1
- Bot pull requests: 134
Past Year
- Issues: 345
- Pull requests: 916
- Average time to close issues: 13 days
- Average time to close pull requests: 5 days
- Issue authors: 94
- Pull request authors: 40
- Average comments per issue: 1.7
- Average comments per pull request: 1.57
- Merged pull requests: 702
- Bot issues: 1
- Bot pull requests: 59
Top Authors
Issue Authors
- TorkelE (114)
- baggepinnen (90)
- hersle (50)
- ChrisRackauckas (39)
- bradcarman (30)
- isaacsas (25)
- AayushSabharwal (24)
- YingboMa (21)
- B-LIE (20)
- SebastianM-C (17)
- cstjean (15)
- Datseris (13)
- ArnoStrouwen (13)
- hexaeder (11)
- mtiller-jh (10)
Pull Request Authors
- AayushSabharwal (683)
- ChrisRackauckas (153)
- YingboMa (123)
- github-actions[bot] (116)
- baggepinnen (88)
- hersle (73)
- ven-k (56)
- vyudu (56)
- ArnoStrouwen (31)
- BenChung (25)
- SebastianM-C (24)
- TorkelE (23)
- contradict (21)
- devmotion (21)
- isaacsas (20)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- julia 1,911 total
-
Total dependent packages: 90
(may contain duplicates) -
Total dependent repositories: 14
(may contain duplicates) - Total versions: 1,359
juliahub.com: ModelingToolkit
An acausal modeling framework for automatically parallelized scientific machine learning (SciML) in Julia. A computer algebra system for integrated symbolics for physics-informed machine learning and automated transformations of differential equations
- Homepage: https://mtk.sciml.ai/dev/
- Documentation: https://docs.juliahub.com/General/ModelingToolkit/stable/
- License: MIT
-
Latest release: 10.20.0
published 5 months ago
Rankings
proxy.golang.org: github.com/SciML/ModelingToolkit.jl
- Documentation: https://pkg.go.dev/github.com/SciML/ModelingToolkit.jl#section-documentation
- License: other
-
Latest release: v10.21.0+incompatible
published 4 months ago
Rankings
proxy.golang.org: github.com/sciml/modelingtoolkit.jl
- Documentation: https://pkg.go.dev/github.com/sciml/modelingtoolkit.jl#section-documentation
- License: other
-
Latest release: v10.21.0+incompatible
published 4 months ago
Rankings
Dependencies
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/setup-julia latest composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/setup-julia v1 composite
- actions/checkout v1 composite
- julia-actions/setup-julia latest composite
- actions/checkout v3 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-invalidations v1 composite
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite
- actions/cache v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite