Skip to content

Commit 5bcfdff

Browse files
committed
up
2 parents 7878225 + 5cdb4ba commit 5bcfdff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2724
-350
lines changed

Project.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ModelingToolkit"
22
uuid = "961ee093-0014-501f-94e3-6117800e7a78"
33
authors = ["Yingbo Ma <[email protected]>", "Chris Rackauckas <[email protected]> and contributors"]
4-
version = "9.60.0"
4+
version = "9.61.0"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
@@ -119,12 +119,13 @@ Latexify = "0.11, 0.12, 0.13, 0.14, 0.15, 0.16"
119119
Libdl = "1"
120120
LinearAlgebra = "1"
121121
MLStyle = "0.4.17"
122+
ModelingToolkitStandardLibrary = "2.19"
122123
NaNMath = "0.3, 1"
123124
NonlinearSolve = "4.3"
124125
OffsetArrays = "1"
125126
OrderedCollections = "1"
126127
OrdinaryDiffEq = "6.82.0"
127-
OrdinaryDiffEqCore = "1.13.0"
128+
OrdinaryDiffEqCore = "1.15.0"
128129
OrdinaryDiffEqDefault = "1.2"
129130
OrdinaryDiffEqNonlinearSolve = "1.3.0"
130131
PrecompileTools = "1"
@@ -133,7 +134,7 @@ RecursiveArrayTools = "3.26"
133134
Reexport = "0.2, 1"
134135
RuntimeGeneratedFunctions = "0.5.9"
135136
SCCNonlinearSolve = "1.0.0"
136-
SciMLBase = "2.68.1"
137+
SciMLBase = "2.71.1"
137138
SciMLStructures = "1.0"
138139
Serialization = "1"
139140
Setfield = "0.7, 0.8, 1"
@@ -144,8 +145,8 @@ StaticArrays = "0.10, 0.11, 0.12, 1.0"
144145
StochasticDelayDiffEq = "1.8.1"
145146
StochasticDiffEq = "6.72.1"
146147
SymbolicIndexingInterface = "0.3.36"
147-
SymbolicUtils = "3.7"
148-
Symbolics = "6.19"
148+
SymbolicUtils = "3.10"
149+
Symbolics = "6.22.1"
149150
URIs = "1"
150151
UnPack = "0.1, 1.0"
151152
Unitful = "1.1"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ lower it to a first order system, symbolically generate the Jacobian function
3636
for the numerical integrator, and solve it.
3737

3838
```julia
39-
using DifferentialEquations, ModelingToolkit
39+
using OrdinaryDiffEqDefault, ModelingToolkit
4040
using ModelingToolkit: t_nounits as t, D_nounits as D
4141

4242
@parameters σ ρ β

docs/Project.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[deps]
22
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
33
BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665"
4+
ControlSystemsBase = "aaaaaaaa-a6ca-5380-bf3e-84a91bcd477e"
45
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
5-
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
66
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
77
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
88
DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821"
99
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1010
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
11+
ModelingToolkitStandardLibrary = "16a59e39-deab-5bd0-87e4-056b12336739"
1112
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
1213
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
1314
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
@@ -26,11 +27,11 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
2627
BenchmarkTools = "1.3"
2728
BifurcationKit = "0.4"
2829
DataInterpolations = "6.5"
29-
DifferentialEquations = "7.6"
3030
Distributions = "0.25"
3131
Documenter = "1"
3232
DynamicQuantities = "^0.11.2, 0.12, 1"
3333
ModelingToolkit = "8.33, 9"
34+
ModelingToolkitStandardLibrary = "2.19"
3435
NonlinearSolve = "3, 4"
3536
Optim = "1.7"
3637
Optimization = "3.9, 4"

docs/make.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ makedocs(sitename = "ModelingToolkit.jl",
2525
modules = [ModelingToolkit],
2626
clean = true, doctest = false, linkcheck = true,
2727
warnonly = [:docs_block, :missing_docs, :cross_references],
28-
linkcheck_ignore = ["https://epubs.siam.org/doi/10.1137/0903023"],
28+
linkcheck_ignore = [
29+
"https://epubs.siam.org/doi/10.1137/0903023",
30+
# this link tends to fail linkcheck stochastically and often takes much longer to succeed
31+
# even in the browser it takes ages
32+
"http://www.scholarpedia.org/article/Differential-algebraic_equations"
33+
],
2934
format = Documenter.HTML(;
3035
assets = ["assets/favicon.ico"],
3136
mathengine,

docs/pages.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ pages = [
1313
"tutorials/bifurcation_diagram_computation.md",
1414
"tutorials/SampledData.md",
1515
"tutorials/domain_connections.md",
16-
"tutorials/callable_params.md"],
16+
"tutorials/callable_params.md",
17+
"tutorials/linear_analysis.md"],
1718
"Examples" => Any[
1819
"Basic Examples" => Any["examples/higher_order.md",
1920
"examples/spring_mass.md",
@@ -31,6 +32,7 @@ pages = [
3132
"basics/InputOutput.md",
3233
"basics/MTKLanguage.md",
3334
"basics/Validation.md",
35+
"basics/Debugging.md",
3436
"basics/DependencyGraphs.md",
3537
"basics/Precompilation.md",
3638
"basics/FAQ.md"],

docs/src/basics/Composition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ x0 = [decay1.x => 1.0
5656
p = [decay1.a => 0.1
5757
decay2.a => 0.2]
5858
59-
using DifferentialEquations
59+
using OrdinaryDiffEq
6060
prob = ODEProblem(simplified_sys, x0, (0.0, 100.0), p)
6161
sol = solve(prob, Tsit5())
6262
sol[decay2.f]

docs/src/basics/Debugging.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Debugging
2+
3+
Every (mortal) modeler writes models that contain mistakes or are susceptible to numerical errors in their hunt for the perfect model.
4+
Debugging such errors is part of the modeling process, and ModelingToolkit includes some functionality that helps with this.
5+
6+
For example, consider an ODE model with "dangerous" functions (here ``):
7+
8+
```@example debug
9+
using ModelingToolkit, OrdinaryDiffEq
10+
using ModelingToolkit: t_nounits as t, D_nounits as D
11+
12+
@variables u1(t) u2(t) u3(t)
13+
eqs = [D(u1) ~ -√(u1), D(u2) ~ -√(u2), D(u3) ~ -√(u3)]
14+
defaults = [u1 => 1.0, u2 => 2.0, u3 => 3.0]
15+
@named sys = ODESystem(eqs, t; defaults)
16+
sys = structural_simplify(sys)
17+
```
18+
19+
This problem causes the ODE solver to crash:
20+
21+
```@repl debug
22+
prob = ODEProblem(sys, [], (0.0, 10.0), []);
23+
sol = solve(prob, Tsit5());
24+
```
25+
26+
This suggests *that* something went wrong, but not exactly *what* went wrong and *where* it did.
27+
In such situations, the `debug_system` function is helpful:
28+
29+
```@repl debug
30+
dsys = debug_system(sys; functions = [sqrt]);
31+
dprob = ODEProblem(dsys, [], (0.0, 10.0), []);
32+
dsol = solve(dprob, Tsit5());
33+
```
34+
35+
Now we see that it crashed because `u1` decreased so much that it became negative and outside the domain of the `` function.
36+
We could have figured that out ourselves, but it is not always so obvious for more complex models.
37+
38+
```@docs
39+
debug_system
40+
```

docs/src/examples/perturbation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ These are the ODEs we want to solve. Now construct an `ODESystem`, which automat
4949
To solve the `ODESystem`, we generate an `ODEProblem` with initial conditions $x(0) = 0$, and $ẋ(0) = 1$, and solve it:
5050

5151
```@example perturbation
52-
using DifferentialEquations
52+
using OrdinaryDiffEq
5353
u0 = Dict([unknowns(sys) .=> 0.0; D(y[0]) => 1.0]) # nonzero initial velocity
5454
prob = ODEProblem(sys, u0, (0.0, 3.0))
5555
sol = solve(prob)

docs/src/examples/sparse_jacobians.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ First, let's start out with an implementation of the 2-dimensional Brusselator
1111
partial differential equation discretized using finite differences:
1212

1313
```@example sparsejac
14-
using DifferentialEquations, ModelingToolkit
14+
using OrdinaryDiffEq, ModelingToolkit
1515
1616
const N = 32
1717
const xyd_brusselator = range(0, stop = 1, length = N)

docs/src/examples/spring_mass.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ In this tutorial, we will build a simple component-based model of a spring-mass
55
## Copy-Paste Example
66

77
```@example component
8-
using ModelingToolkit, Plots, DifferentialEquations, LinearAlgebra
8+
using ModelingToolkit, Plots, OrdinaryDiffEq, LinearAlgebra
99
using ModelingToolkit: t_nounits as t, D_nounits as D
1010
using Symbolics: scalarize
1111

0 commit comments

Comments
 (0)