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

https://github.com/sciml/modelingtoolkit.jl

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

acausal computer-algebra dae dde delay-differential-equations differential-equations equation-based julia nonlinear-programming ode optimization ordinary-differential-equations pde scientific-machine-learning sciml sde stochastic-differential-equations symbolic symbolic-computation symbolic-numerics

Keywords from Contributors

julialang numerical differentialequations neural-ode programming-language partial-differential-equations neural-differential-equations differential-algebraic-equations matrix-exponential automatic-differentiation
Last synced: 4 months ago · JSON representation ·

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
acausal computer-algebra dae dde delay-differential-equations differential-equations equation-based julia nonlinear-programming ode optimization ordinary-differential-equations pde scientific-machine-learning sciml sde stochastic-differential-equations symbolic symbolic-computation symbolic-numerics
Created almost 8 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

ModelingToolkit.jl

Join the chat at https://julialang.zulipchat.com #sciml-bridged Global Docs

codecov Coverage Status Build Status

ColPrac: Contributor's Guide on Collaborative Practices for Community Packages SciML Code Style

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)) ```

Lorenz2

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

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

All Time
  • Total Commits: 6,206
  • Total Committers: 137
  • Avg Commits per committer: 45.299
  • Development Distribution Score (DDS): 0.769
Past Year
  • Commits: 2,063
  • Committers: 37
  • Avg Commits per committer: 55.757
  • Development Distribution Score (DDS): 0.54
Top Committers
Name Email 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...

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
bug (436) question (43) discrete-time (26) arrays (19) control (12) initialization (11) enhancement (10) events (6) usability (6) documentation (5) good first issue (5) input-output (4) linearization (3) transform (2) analysis (1) feature (1) modelingtoolkitize (1) symbolic performance (1) wontfix (1) juliasimcompiler (1)
Pull Request Labels
dependencies (18) discrete-time (7) v10 (4) github_actions (1)

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

  • Versions: 451
  • Dependent Packages: 90
  • Dependent Repositories: 14
  • Downloads: 1,911 Total
Rankings
Stargazers count: 0.3%
Forks count: 0.4%
Dependent packages count: 0.9%
Average: 1.0%
Dependent repos count: 2.4%
Last synced: 4 months ago
proxy.golang.org: github.com/SciML/ModelingToolkit.jl
  • Versions: 454
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 4 months ago
proxy.golang.org: github.com/sciml/modelingtoolkit.jl
  • Versions: 454
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 4 months ago

Dependencies

.github/workflows/Documentation.yml actions
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/setup-julia latest composite
.github/workflows/Downstream.yml actions
  • 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
.github/workflows/FormatCheck.yml actions
  • actions/checkout v1 composite
  • julia-actions/setup-julia latest composite
.github/workflows/Invalidations.yml actions
  • actions/checkout v3 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-invalidations v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/ci.yml actions
  • 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