Skip to content

Bump documentation dependencies to latest major versions only #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
AdvancedHMC = "0.6, 0.7"
AdvancedHMC = "0.8"
BenchmarkTools = "1"
CSV = "0.10"
CUDA = "5"
Expand All @@ -70,24 +70,24 @@ DiffEqGPU = "3"
DifferentialEquations = "7"
Distributions = "0.25"
Documenter = "1"
DomainSets = "0.6, 0.7"
Flux = "0.13, 0.14, 0.15, 0.16"
DomainSets = "0.7"
Flux = "0.16"
ForwardDiff = "0.10, 1"
IncompleteLU = "0.2"
Integrals = "4"
LineSearches = "7"
LinearSolve = "2, 3"
LinearSolve = "3"
Lux = "1"
LuxCUDA = "0.3"
LuxCore = "1"
MCMCChains = "6"
MCMCChains = "7"
Measurements = "2"
MethodOfLines = "0.11"
ModelingToolkit = "9.9"
ModelingToolkitNeuralNets = "1"
MultiDocumenter = "0.7, 0.8"
ModelingToolkit = "10"
ModelingToolkitNeuralNets = "2"
MultiDocumenter = "0.8"
NeuralPDE = "5.15"
NonlinearSolve = "3, 4"
NonlinearSolve = "4"
Optimization = "4"
OptimizationBBO = "0.4"
OptimizationMOI = "0.5"
Expand All @@ -109,4 +109,4 @@ SymbolicIndexingInterface = "0.3"
SymbolicRegression = "1"
Symbolics = "6"
Unitful = "1"
Zygote = "0.6, 0.7"
Zygote = "0.7"
8 changes: 4 additions & 4 deletions docs/src/getting_started/find_root.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ With the parameter values ``\sigma = 10.0``, ``\rho = 26.0``, ``\beta = 8/3``.
# Import the packages
import ModelingToolkit as MTK
import NonlinearSolve as NLS
import ModelingToolkit: @variables, @parameters, @mtkbuild
import ModelingToolkit: @variables, @parameters, @mtkcompile, mtkcompile

# Define the nonlinear system
@variables x=1.0 y=0.0 z=0.0
Expand All @@ -49,7 +49,7 @@ import ModelingToolkit: @variables, @parameters, @mtkbuild
eqs = [0 ~ σ * (y - x),
0 ~ x * (ρ - z) - y,
0 ~ x * y - β * z]
@mtkbuild ns = MTK.NonlinearSystem(eqs, [x, y, z], [σ, ρ, β])
@mtkcompile ns = MTK.NonlinearSystem(eqs, [x, y, z], [σ, ρ, β])

# Convert the symbolic system into a numerical system
prob = NLS.NonlinearProblem(ns, [])
Expand Down Expand Up @@ -83,7 +83,7 @@ Now we're ready. Let's load in these packages:
# Import the packages
import ModelingToolkit as MTK
import NonlinearSolve as NLS
import ModelingToolkit: @variables, @parameters, @mtkbuild
import ModelingToolkit: @variables, @parameters, @mtkcompile, mtkcompile
```

### Step 2: Define the Nonlinear System
Expand Down Expand Up @@ -126,7 +126,7 @@ Finally, we bring these pieces together, the equation along with its states and
define our `NonlinearSystem`:

```@example first_rootfind
@mtkbuild ns = MTK.NonlinearSystem(eqs, [x, y, z], [σ, ρ, β])
@mtkcompile ns = MTK.NonlinearSystem(eqs, [x, y, z], [σ, ρ, β])
```

### Step 3: Convert the Symbolic Problem to a Numerical Problem
Expand Down
10 changes: 5 additions & 5 deletions docs/src/getting_started/first_simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import DifferentialEquations as DE
import ModelingToolkit as MTK
import Plots
import ModelingToolkit: t_nounits as t, D_nounits as D,
@variables, @parameters, @named, @mtkbuild
@variables, @parameters, @named, @mtkcompile, mtkcompile

# Define our state variables: state(t) = initial condition
@variables x(t)=1 y(t)=1 z(t)
Expand All @@ -67,7 +67,7 @@ eqs = [D(x) ~ α * x - β * x * y
z ~ x + y]

# Bring these pieces together into an ODESystem with independent variable t
@mtkbuild sys = MTK.ODESystem(eqs, t)
@mtkcompile sys = MTK.ODESystem(eqs, t)

# Convert from a symbolic to a numerical problem to simulate
tspan = (0.0, 10.0)
Expand Down Expand Up @@ -106,7 +106,7 @@ Now we're ready. Let's load in these packages:
import DifferentialEquations as DE
import ModelingToolkit as MTK
import Plots
import ModelingToolkit: t_nounits as t, D_nounits as D, @variables, @parameters, @named, @mtkbuild
import ModelingToolkit: t_nounits as t, D_nounits as D, @variables, @parameters, @named, @mtkcompile, mtkcompile
```

### Step 2: Define our ODE Equations
Expand Down Expand Up @@ -170,7 +170,7 @@ to represent an `ODESystem` with the following:

```@example first_sim
# Bring these pieces together into an ODESystem with independent variable t
@mtkbuild sys = MTK.ODESystem(eqs, t)
@mtkcompile sys = MTK.ODESystem(eqs, t)
```

Notice that in our equations we have an algebraic equation `z ~ x + y`. This is not a
Expand Down Expand Up @@ -274,7 +274,7 @@ D = MTK.Differential(t)
eqs = [D(🐰) ~ α * 🐰 - β * 🐰 * 🐺,
D(🐺) ~ -γ * 🐺 + δ * 🐰 * 🐺]

@mtkbuild sys = MTK.ODESystem(eqs, t)
@mtkcompile sys = MTK.ODESystem(eqs, t)
prob = DE.ODEProblem(sys, [], (0.0, 10.0))
sol = DE.solve(prob)
```
Expand Down
4 changes: 2 additions & 2 deletions docs/src/showcase/bayesian_neural_ode.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ We use the NUTS sampler with an acceptance ratio of δ= 0.45 in this example. In
We sample using 500 warmup samples and 500 posterior samples.

```@example bnode
integrator = AdvancedHMC.Leapfrog(AdvancedHMC.find_good_stepsize(h, p))
integrator = AdvancedHMC.Leapfrog(AdvancedHMC.find_good_stepsize(h, Array(p)))
kernel = AdvancedHMC.HMCKernel(AdvancedHMC.Trajectory{AdvancedHMC.MultinomialTS}(integrator, AdvancedHMC.GeneralisedNoUTurn()))
adaptor = AdvancedHMC.StanHMCAdaptor(AdvancedHMC.MassMatrixAdaptor(metric), AdvancedHMC.StepSizeAdaptor(0.45, integrator))
samples, stats = AdvancedHMC.sample(h, kernel, p, 500, adaptor, 500; progress = true)
samples, stats = AdvancedHMC.sample(h, kernel, Array(p), 500, adaptor, 500; progress = true)
```

## Step 5: Plot diagnostics
Expand Down
2 changes: 1 addition & 1 deletion docs/src/showcase/brusselator.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ import MethodOfLines
import OrdinaryDiffEq as ODE
import LinearSolve as LS
import DomainSets
using ModelingToolkit: @parameters, @variables, Differential, Interval, PDESystem
using ModelingToolkit: @named, @parameters, @variables, Differential, Interval, PDESystem

@parameters x y t
@variables u(..) v(..)
Expand Down
16 changes: 8 additions & 8 deletions docs/src/showcase/optimal_data_gathering_for_missing_physics.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To this end, we will rely on the following packages:
using Random; Random.seed!(984519674645)
using StableRNGs; rng = StableRNG(845652695)
import ModelingToolkit as MTK
import ModelingToolkit: t_nounits as t, D_nounits as D
import ModelingToolkit: t_nounits as t, D_nounits as D, @mtkcompile, mtkcompile
import ModelingToolkitNeuralNets
import OrdinaryDiffEqRosenbrock as ODE
import SymbolicIndexingInterface
Expand Down Expand Up @@ -145,11 +145,11 @@ We also add some noise to the simulated data, to make it more realistic:
```@example DoE
optimization_state = zeros(15)
optimization_initial = optimization_state[1] # HACK CAN'T GET THIS TO WORK WITHOUT SEPARATE SCALAR
@mtkbuild true_bioreactor = TrueBioreactor()
@mtkcompile true_bioreactor = TrueBioreactor()
prob = ODE.ODEProblem(true_bioreactor, [], (0.0, 15.0), [], tstops = 0:15, save_everystep=false)
sol = ODE.solve(prob, ODE.Rodas5P())

@mtkbuild ude_bioreactor = UDEBioreactor()
@mtkcompile ude_bioreactor = UDEBioreactor()
ude_prob = ODE.ODEProblem(ude_bioreactor, [], (0.0, 15.0), [], tstops = 0:15, save_everystep=false)
ude_sol = ODE.solve(ude_prob, ODE.Rodas5P())

Expand Down Expand Up @@ -283,7 +283,7 @@ function get_probs_and_caches(model_structures)
μ ~ model_structures[i](C_s)
end
end
@mtkbuild plausible_bioreactor = PlausibleBioreactor()
@mtkcompile plausible_bioreactor = PlausibleBioreactor()
plausible_prob = ODE.ODEProblem(plausible_bioreactor, [], (0.0, 15.0), [], tstops=0:15, saveat=0:15)
probs_plausible[i] = plausible_prob

Expand Down Expand Up @@ -401,10 +401,10 @@ This causes the two aforementioned groups in the model structures to be easily d

We now gather a second dataset and perform the same exercise.
```@example DoE
@mtkbuild true_bioreactor2 = TrueBioreactor()
@mtkcompile true_bioreactor2 = TrueBioreactor()
prob2 = ODE.ODEProblem(true_bioreactor2, [], (0.0, 15.0), [], tstops=0:15, save_everystep=false)
sol2 = ODE.solve(prob2, ODE.Rodas5P())
@mtkbuild ude_bioreactor2 = UDEBioreactor()
@mtkcompile ude_bioreactor2 = UDEBioreactor()
ude_prob2 = ODE.ODEProblem(ude_bioreactor2, [], (0.0, 15.0), [ude_bioreactor2.Q_in => optimization_initial], tstops=0:15, save_everystep=false)
ude_sol2 = ODE.solve(ude_prob2, ODE.Rodas5P())
plot(ude_sol2[3,:])
Expand Down Expand Up @@ -516,10 +516,10 @@ After the staircase reaches the maximal control value, a zero control is used.
Some model structures decrease more rapidly in substrate concentration than others.

```@example DoE
@mtkbuild true_bioreactor3 = TrueBioreactor()
@mtkcompile true_bioreactor3 = TrueBioreactor()
prob3 = ODE.ODEProblem(true_bioreactor3, [], (0.0, 15.0), [], tstops=0:15, save_everystep=false)
sol3 = ODE.solve(prob3, ODE.Rodas5P())
@mtkbuild ude_bioreactor3 = UDEBioreactor()
@mtkcompile ude_bioreactor3 = UDEBioreactor()
ude_prob3 = ODE.ODEProblem(ude_bioreactor3, [], (0.0, 15.0), tstops=0:15, save_everystep=false)

x0 = reduce(vcat, getindex.((default_values(ude_bioreactor3),), tunable_parameters(ude_bioreactor3)))
Expand Down