-
-
Notifications
You must be signed in to change notification settings - Fork 213
/
Copy pathindex.html
51 lines (45 loc) · 20.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html><HTML lang="en"><head><meta charset="UTF-8"/><meta content="width=device-width, initial-scale=1.0" name="viewport"/><title>Home · ModelingToolkit.jl</title><link href="https://mtk.sciml.ai/stable/" rel="canonical"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script data-main="assets/documenter.js" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link href="assets/favicon.ico" rel="icon" type="image/x-icon"/><link class="docs-theme-link" data-theme-name="documenter-dark" href="assets/themes/documenter-dark.css" rel="stylesheet" type="text/css"/><link class="docs-theme-link" data-theme-name="documenter-light" data-theme-primary="" href="assets/themes/documenter-light.css" rel="stylesheet" type="text/css"/><script src="assets/themeswap.js"></script><script data-outdated-warner="">function maybeAddWarning () {
const head = document.getElementsByTagName('head')[0];
// Add a noindex meta tag (unless one exists) so that search engines don't index this version of the docs.
if (document.body.querySelector('meta[name="robots"]') === null) {
const meta = document.createElement('meta');
meta.name = 'robots';
meta.content = 'noindex';
head.appendChild(meta);
};
// Add a stylesheet to avoid inline styling
const style = document.createElement('style');
style.type = 'text/css';
style.appendChild(document.createTextNode('.outdated-warning-overlay { position: fixed; top: 0; left: 0; right: 0; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); z-index: 999; background-color: #ffaba7; color: rgba(0, 0, 0, 0.7); border-bottom: 3px solid #da0b00; padding: 10px 35px; text-align: center; font-size: 15px; } .outdated-warning-overlay .outdated-warning-closer { position: absolute; top: calc(50% - 10px); right: 18px; cursor: pointer; width: 12px; } .outdated-warning-overlay a { color: #2e63b8; } .outdated-warning-overlay a:hover { color: #363636; }'));
head.appendChild(style);
const div = document.createElement('div');
div.classList.add('outdated-warning-overlay');
const closer = document.createElement('div');
closer.classList.add('outdated-warning-closer');
// Icon by font-awesome (license: https://fontawesome.com/license, link: https://fontawesome.com/icons/times?style=solid)
closer.innerHTML = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="times" class="svg-inline--fa fa-times fa-w-11" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><path fill="currentColor" d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"></path></svg>';
closer.addEventListener('click', function () {
document.body.removeChild(div);
});
let href = '/stable';
if (window.documenterBaseURL) {
href = window.documenterBaseURL + '/../stable';
}
div.innerHTML = 'This is an old version of the documentation. <br> <a href="' + href + '">Go to the newest version</a>.';
div.appendChild(closer);
document.body.appendChild(div);
};
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', maybeAddWarning);
} else {
maybeAddWarning();
};
</script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href=""><img alt="ModelingToolkit.jl logo" src="assets/logo.png"/></a><div class="docs-package-name"><span class="docs-autofit">ModelingToolkit.jl</span></div><form action="search/" class="docs-search"><input class="docs-search-query" id="documenter-search-query" name="q" placeholder="Search docs" type="text"/></form><ul class="docs-menu"><li class="is-active"><a class="tocitem" href="">Home</a><ul class="internal"><li><a class="tocitem" href="#Installation-1"><span>Installation</span></a></li><li><a class="tocitem" href="#Citation-1"><span>Citation</span></a></li><li><a class="tocitem" href="#Feature-Summary-1"><span>Feature Summary</span></a></li><li><a class="tocitem" href="#Model-Import-Formats-1"><span>Model Import Formats</span></a></li><li><a class="tocitem" href="#Extension-Libraries-1"><span>Extension Libraries</span></a></li><li><a class="tocitem" href="#Compatible-Numerical-Solvers-1"><span>Compatible Numerical Solvers</span></a></li><li><a class="tocitem" href="#Contributing-1"><span>Contributing</span></a></li></ul></li><li><span class="tocitem">Symbolic Modeling Tutorials</span><ul><li><a class="tocitem" href="tutorials/ode_modeling/">Composing Ordinary Differential Equations</a></li><li><a class="tocitem" href="tutorials/acausal_components/">Acausal Component-Based Modeling the RC Circuit</a></li><li><a class="tocitem" href="tutorials/higher_order/">Automatic Transformation of Nth Order ODEs to 1st Order ODEs</a></li><li><a class="tocitem" href="tutorials/tearing_parallelism/">Exposing More Parallelism By Tearing Algebraic Equations in ODESystems</a></li><li><a class="tocitem" href="tutorials/nonlinear/">Modeling Nonlinear Systems</a></li><li><a class="tocitem" href="tutorials/optimization/">Modeling Optimization Problems</a></li><li><a class="tocitem" href="tutorials/stochastic_diffeq/">Modeling with Stochasticity</a></li><li><a class="tocitem" href="tutorials/nonlinear_optimal_control/">Nonlinear Optimal Control</a></li></ul></li><li><span class="tocitem">ModelingToolkitize Tutorials</span><ul><li><a class="tocitem" href="mtkitize_tutorials/modelingtoolkitize/">Automatically Accelerating ODEProblem Code</a></li><li><a class="tocitem" href="mtkitize_tutorials/modelingtoolkitize_index_reduction/">Automated Index Reduction of DAEs</a></li></ul></li><li><span class="tocitem">Basics</span><ul><li><a class="tocitem" href="basics/AbstractSystem/">The AbstractSystem Interface</a></li><li><a class="tocitem" href="basics/ContextualVariables/">Contextual Variable Types</a></li><li><a class="tocitem" href="basics/Composition/">Composing Models and Building Reusable Components</a></li><li><a class="tocitem" href="basics/Validation/">Model Validation and Units</a></li><li><a class="tocitem" href="basics/DependencyGraphs/">Dependency Graphs</a></li><li><a class="tocitem" href="basics/FAQ/">Frequently Asked Questions</a></li></ul></li><li><span class="tocitem">System Types</span><ul><li><a class="tocitem" href="systems/ODESystem/">ODESystem</a></li><li><a class="tocitem" href="systems/SDESystem/">SDESystem</a></li><li><a class="tocitem" href="systems/JumpSystem/">JumpSystem</a></li><li><a class="tocitem" href="systems/NonlinearSystem/">NonlinearSystem</a></li><li><a class="tocitem" href="systems/OptimizationSystem/">OptimizationSystem</a></li><li><a class="tocitem" href="systems/ControlSystem/">ControlSystem</a></li><li><a class="tocitem" href="systems/ReactionSystem/">ReactionSystem</a></li><li><a class="tocitem" href="systems/PDESystem/">PDESystem</a></li></ul></li><li><a class="tocitem" href="comparison/">Comparison of ModelingToolkit vs Equation-Based Modeling Languages</a></li><li><a class="tocitem" href="internals/">Internal Details</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="">Home</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="">Home</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/SciML/ModelingToolkit.jl/blob/master/docs/src/index.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" href="#" id="documenter-settings-button" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" href="#" id="documenter-sidebar-button"></a></div></header><article class="content" id="documenter-page"><h1 id="ModelingToolkit.jl:-High-Performance-Symbolic-Numeric-Equation-Based-Modeling-1"><a class="docs-heading-anchor" href="#ModelingToolkit.jl:-High-Performance-Symbolic-Numeric-Equation-Based-Modeling-1">ModelingToolkit.jl: High-Performance Symbolic-Numeric Equation-Based Modeling</a><a class="docs-heading-anchor-permalink" href="#ModelingToolkit.jl:-High-Performance-Symbolic-Numeric-Equation-Based-Modeling-1" title="Permalink"></a></h1><p>ModelingToolkit.jl is a modeling language for high-performance symbolic-numeric computation in scientific computing and scientific machine learning. It then mixes ideas from symbolic computational algebra systems with causal and acausal equation-based modeling frameworks to give an extendable and parallel modeling system. It allows for users to give a high-level description of a model for symbolic preprocessing to analyze and enhance the model. Automatic transformations, such as index reduction, can be applied to the model before solving in order to make it easily handle equations would could not be solved when modeled without symbolic intervention.</p><h2 id="Installation-1"><a class="docs-heading-anchor" href="#Installation-1">Installation</a><a class="docs-heading-anchor-permalink" href="#Installation-1" title="Permalink"></a></h2><p>To install ModelingToolkit.jl, use the Julia package manager:</p><pre><code class="language-julia">using Pkg
Pkg.add("ModelingToolkit")</code></pre><h2 id="Citation-1"><a class="docs-heading-anchor" href="#Citation-1">Citation</a><a class="docs-heading-anchor-permalink" href="#Citation-1" title="Permalink"></a></h2><p>If you use ModelingToolkit in your work, please cite the following:</p><pre><code class="language-none">@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}
}</code></pre><h2 id="Feature-Summary-1"><a class="docs-heading-anchor" href="#Feature-Summary-1">Feature Summary</a><a class="docs-heading-anchor-permalink" href="#Feature-Summary-1" title="Permalink"></a></h2><p>ModelingToolkit.jl is a symbolic-numeric modeling package. Thus it combines some of the features from symbolic computing packages like SymPy or Mathematica with the ideas of equation-based modeling systems like the causal Simulink and the acausal Modelica. It bridges the gap between many different kinds of equations, allowing one to quickly and easily transform systems of DAEs into optimization problems, or vice-versa, and then simplify and parallelize the resulting expressions before generating code.</p><h3 id="Feature-List-1"><a class="docs-heading-anchor" href="#Feature-List-1">Feature List</a><a class="docs-heading-anchor-permalink" href="#Feature-List-1" title="Permalink"></a></h3><ul><li>Causal and acausal modeling (Simulink/Modelica)</li><li>Automated model transformation, simplification, and composition</li><li>Automatic conversion of numerical models into symbolic models</li><li>Composition of models through the components, a lazy connection system, and tools for expanding/flattening</li><li>Pervasive parallelism in symbolic computations and generated functions</li><li>Transformations like alias elimination and tearing of nonlinear systems for efficiently numerically handling large-scale systems of equations</li><li>The ability to use the entire Symbolics.jl Computer Algebra System (CAS) as part of the modeling process.</li><li>Import models from common formats like SBML, CellML, BioNetGen, and more.</li><li>Extendability: the whole system is written in pure Julia, so adding new functions, simplification rules, and model transformations has no barrier.</li></ul><p>For information on how to use the Symbolics.jl CAS system that ModelingToolkit.jl is built on, consult the <a href="https://github.com/JuliaSymbolics/Symbolics.jl">Symbolics.jl documentation</a></p><h3 id="Equation-Types-1"><a class="docs-heading-anchor" href="#Equation-Types-1">Equation Types</a><a class="docs-heading-anchor-permalink" href="#Equation-Types-1" title="Permalink"></a></h3><ul><li>Ordinary differential equations</li><li>Stochastic differential equations</li><li>Partial differential equations</li><li>Nonlinear systems</li><li>Optimization problems</li><li>Continuous-Time Markov Chains</li><li>Chemical Reactions</li><li>Nonlinear Optimal Control</li></ul><h2 id="Model-Import-Formats-1"><a class="docs-heading-anchor" href="#Model-Import-Formats-1">Model Import Formats</a><a class="docs-heading-anchor-permalink" href="#Model-Import-Formats-1" title="Permalink"></a></h2><ul><li><a href="https://github.com/SciML/CellMLToolkit.jl">CellMLToolkit.jl</a>: Import <a href="https://www.cellml.org/">CellML</a> models into ModelingToolkit<ul><li>Repository of more than a thousand pre-made models</li><li>Focus on biomedical models in areas such as: Calcium Dynamics, Cardiovascular Circulation, Cell Cycle, Cell Migration, Circadian Rhythms, Electrophysiology, Endocrine, Excitation-Contraction Coupling, Gene Regulation, Hepatology, Immunology, Ion Transport, Mechanical Constitutive Laws, Metabolism, Myofilament Mechanics, Neurobiology, pH Regulation, PKPD, Protein Modules, Signal Transduction, and Synthetic Biology.</li></ul></li><li><a href="https://github.com/paulflang/SbmlInterface.jl">SbmlInterface.jl</a>: Import <a href="http://sbml.org/Main_Page">SBML</a> models into ModelingToolkit<ul><li>Uses the robust libsbml library for parsing and transforming the SBML</li></ul></li><li><a href="https://github.com/isaacsas/ReactionNetworkImporters.jl">ReactionNetworkImporters.jl</a>: Import various models into ModelingToolkit<ul><li>Supports the BioNetGen <code>.net</code> file</li><li>Supports importing networks specified by stoichiometric matrices</li></ul></li></ul><h2 id="Extension-Libraries-1"><a class="docs-heading-anchor" href="#Extension-Libraries-1">Extension Libraries</a><a class="docs-heading-anchor-permalink" href="#Extension-Libraries-1" title="Permalink"></a></h2><p>Because ModelingToolkit.jl is the core foundation of a equation-based modeling ecosystem, there is a large set of libraries adding features to this system. Below is an incomplete list of extension libraries one may want to be aware of:</p><ul><li><a href="https://github.com/SciML/Catalyst.jl">Catalyst.jl</a>: Symbolic representations of chemical reactions<ul><li>Symbolically build and represent large systems of chemical reactions</li><li>Generate code for ODEs, SDEs, continuous-time Markov Chains, and more</li><li>Simulate the models using the SciML ecosystem with O(1) Gillespie methods</li></ul></li><li><a href="https://github.com/SciML/DataDrivenDiffEq.jl">DataDrivenDiffEq.jl</a>: Automatic identification of equations from data<ul><li>Automated construction of ODEs and DAEs from data</li><li>Representations of Koopman operators and Dynamic Mode Decomposition (DMD)</li></ul></li><li><a href="https://github.com/augustinas1/MomentClosure.jl">MomentClosure.jl</a>: Automatic transformation of ReactionSystems into deterministic systems<ul><li>Generates ODESystems for the moment closures</li><li>Allows for geometrically-distributed random reaction rates</li></ul></li><li><a href="https://github.com/ReactionMechanismGenerator/ReactionMechanismSimulator.jl">ReactionMechanismSimulator.jl</a>: simulating and analyzing large chemical reaction mechanisms<ul><li>Ideal gas and dilute liquid phases.</li><li>Constant T and P and constant V adiabatic ideal gas reactors.</li><li>Constant T and V dilute liquid reactors.</li><li>Diffusion limited rates. Sensitivity analysis for all reactors.</li><li>Flux diagrams with molecular images (if molecular information is provided).</li></ul></li></ul><h2 id="Compatible-Numerical-Solvers-1"><a class="docs-heading-anchor" href="#Compatible-Numerical-Solvers-1">Compatible Numerical Solvers</a><a class="docs-heading-anchor-permalink" href="#Compatible-Numerical-Solvers-1" title="Permalink"></a></h2><p>All of the symbolic systems have a direct conversion to a numerical system which can then be handled through the SciML interfaces. For example, after building a model and performing symbolic manipulations, an <code>ODESystem</code> can be converted into an <code>ODEProblem</code> to then be solved by a numerical ODE solver. Below is a list of the solver libraries which are the numerical targets of the ModelingToolkit system:</p><ul><li><a href="https://diffeq.sciml.ai/stable/">DifferentialEquations.jl</a><ul><li>Multi-package interface of high performance numerical solvers for <code>ODESystem</code>, <code>SDESystem</code>, and <code>JumpSystem</code></li></ul></li><li><a href="https://github.com/JuliaComputing/NonlinearSolve.jl">NonlinearSolve.jl</a><ul><li>High performance numerical solving of <code>NonlinearSystem</code></li></ul></li><li><a href="https://github.com/SciML/GalacticOptim.jl">GalacticOptim.jl</a><ul><li>Multi-package interface for numerical solving <code>OptimizationSystem</code></li></ul></li><li><a href="https://github.com/SciML/NeuralPDE.jl">NeuralPDE.jl</a><ul><li>Physics-Informed Neural Network (PINN) training on <code>PDESystem</code></li></ul></li><li><a href="https://github.com/SciML/DiffEqOperators.jl">DiffEqOperators.jl</a><ul><li>Automated finite difference method (FDM) discretization of <code>PDESystem</code></li></ul></li></ul><h2 id="Contributing-1"><a class="docs-heading-anchor" href="#Contributing-1">Contributing</a><a class="docs-heading-anchor-permalink" href="#Contributing-1" title="Permalink"></a></h2><ul><li>Please refer to the <a href="https://github.com/SciML/ColPrac/blob/master/README.md">SciML ColPrac: Contributor's Guide on Collaborative Practices for Community Packages</a> for guidance on PRs, issues, and other matters relating to contributing to ModelingToolkit.</li><li>There are a few community forums:<ul><li>The #diffeq-bridged channel in the <a href="https://julialang.org/slack/">Julia Slack</a></li><li><a href="https://gitter.im/JuliaDiffEq/Lobby">JuliaDiffEq</a> on Gitter</li><li>On the Julia Discourse forums (look for the <a href="https://discourse.julialang.org/tag/modelingtoolkit">modelingtoolkit tag</a></li><li>See also <a href="https://sciml.ai/community/">SciML Community page</a></li></ul></li></ul></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="tutorials/ode_modeling/">Composing Ordinary Differential Equations »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label></p><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div><p></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Friday 28 May 2021 22:23">Friday 28 May 2021</span>. Using Julia version 1.6.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></HTML>