Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
fc3db87
refactor: use `IRInfo` and `IRStructure` for `full_equations`
AayushSabharwal May 12, 2026
338e20f
fix: do not mutate decomposition subsystems in `SCCNonlinearProblem`
AayushSabharwal May 13, 2026
dfb8ad1
test: minor test update to account for new `full_equations`
AayushSabharwal May 15, 2026
751b593
avoid calling `unhack_system` twice for the same `system`
KristofferC May 18, 2026
411ae9f
Merge pull request #4525 from SciML/as/faster-full-eqs
AayushSabharwal May 19, 2026
052a8d1
Merge pull request #4544 from KristofferC/kc/unhack_unhack
AayushSabharwal May 19, 2026
53dcd46
refactor: add `wrap_as_any` flag to `concrete_getu`
AayushSabharwal May 19, 2026
eeb66ca
fix spelling typos identified by CI
KristofferC May 19, 2026
bbd1c3b
refactor: improve `isinitial`
AayushSabharwal May 19, 2026
d060e81
fix: avoid generating massive functions in `get_mtkparameters_reconst…
AayushSabharwal May 15, 2026
53a488f
refactor: improve `get_updated_symbolic_problem`
AayushSabharwal May 19, 2026
1f026bd
feat: add MTKTrackerExt
AayushSabharwal May 19, 2026
2845a60
fix trailing whitespace
KristofferC May 19, 2026
d284517
Merge pull request #4539 from SciML/as/faster-iprobpmap
AayushSabharwal May 20, 2026
a0b1c0d
build: bump MTKBase patch version
AayushSabharwal May 20, 2026
f6a820b
build: bump MTK patch version
AayushSabharwal May 20, 2026
7d81c35
Merge pull request #4546 from SciML/as/bump-version
AayushSabharwal May 20, 2026
c20dbc6
Merge pull request #4545 from KristofferC/kc/typos_whitespace
AayushSabharwal May 20, 2026
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
80 changes: 40 additions & 40 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: Documentation
on:
push:
branches:
- master
- v10
- 'as/su-v4'
tags: '*'
pull_request:
concurrency:
# Skip intermediate builds: always, but for the master branch.
# Cancel intermediate builds: always, but for the master branch.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*'}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@latest
with:
version: 'lts'
- run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
- name: Install dependencies
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs/ -e 'using Pkg; Pkg.develop([PackageSpec(path=pwd()), PackageSpec(path=joinpath(pwd(), "lib", "ModelingToolkitBase")), PackageSpec(path=joinpath(pwd(), "lib", "SciCompDSL"))]); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
JULIA_DEBUG: "Documenter"
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs/ --code-coverage=user docs/make.jl
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v6
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
name: Documentation

on:
push:
branches:
- master
- v10
- 'as/su-v4'
tags: '*'
pull_request:

concurrency:
# Skip intermediate builds: always, but for the master branch.
# Cancel intermediate builds: always, but for the master branch.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*'}}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@latest
with:
version: 'lts'
- run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
- name: Install dependencies
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs/ -e 'using Pkg; Pkg.develop([PackageSpec(path=pwd()), PackageSpec(path=joinpath(pwd(), "lib", "ModelingToolkitBase")), PackageSpec(path=joinpath(pwd(), "lib", "SciCompDSL"))]); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
JULIA_DEBUG: "Documenter"
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs/ --code-coverage=user docs/make.jl
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v6
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
- name: Checkout Actions Repository
uses: actions/checkout@v6
- name: Check spelling
uses: crate-ci/typos@v1.18.0
uses: crate-ci/typos@v1.18.0
4 changes: 4 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ ser = "ser"
isconnection = "isconnection"
Ue = "Ue"
Derivate = "Derivate"
missings = "missings"
alph = "alph"
fo = "fo"
shs = "shs"
30 changes: 15 additions & 15 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ The ModelingToolkit.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2018-22: Yingbo Ma, Christopher Rackauckas, Julia Computing, and
> contributors
>
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
>
>
> of this software and associated documentation files (the "Software"), to deal
>
>
> in the Software without restriction, including without limitation the rights
>
>
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
>
>
> copies of the Software, and to permit persons to whom the Software is
>
>
> furnished to do so, subject to the following conditions:
>
>
> The above copyright notice and this permission notice shall be included in all
>
>
> copies or substantial portions of the Software.
>
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>
>
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>
>
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
>
>
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
>
>
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
>
>
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
>
>
> SOFTWARE.
6 changes: 3 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ now always performs this wrapping.
### Upgrade guide

- The function `states` is renamed to `unknowns`. In a similar vein:

+ `unknown_states` is now `solved_unknowns`.
+ `get_states` is `get_unknowns`.
+ `get_unknown_states` is now `get_solved_unknowns`.
Expand All @@ -498,7 +498,7 @@ now always performs this wrapping.
- ModelingToolkit.jl now exports common definitions of `t` (time independent variable)
and `D` (the first derivative with respect to `t`). Any models made using ModelingToolkit.jl
should leverage these common definitions. There are three variants:

+ `t` and `D` use DynamicQuantities.jl units. This is the default for standard library
components.
+ `t_unitful` and `D_unitful` use Unitful.jl units.
Expand All @@ -522,7 +522,7 @@ now always performs this wrapping.
parameters. Their value cannot be modified directly. Whenever a parameter value is changed, dependent
parameter values are recalculated. For example, if `@parameters p1 p2 = 3p1` then `p2` can not be
modified directly. If `p1` is changed, then `p2` will be updated accordingly. To restore the old behavior:

+ Pass the `split = false` keyword to `structural_simplify`. E.g. `ss = structural_simplify(sys; split = false)`.
+ Pass `split = false` to `@mtkbuild`. E.g. `@mtkbuild sys = ODESystem(...) split = false`.
- Discrete-time system using `Difference` are unsupported. Instead, use the new `Clock`-based syntax.
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ModelingToolkit"
uuid = "961ee093-0014-501f-94e3-6117800e7a78"
version = "11.26.3"
version = "11.26.4"
authors = ["Yingbo Ma <mayingbo5@gmail.com>", "Chris Rackauckas <accounts@chrisrackauckas.com> and contributors"]

[deps]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/API/System.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ namespaced version of `var`. Note that this can also be used to access subsystem
or analysis points.

!!! note

By default, top-level systems not marked as `complete` will apply their namespace. Systems
marked as `complete` will not do this namespacing. This namespacing behavior can be toggled
independently of whether the system is completed using [`toggle_namespacing`](@ref) and the
Expand Down
4 changes: 2 additions & 2 deletions docs/src/API/model_building.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ has the ability to represent them. Compilation strategies can be implemented ind
on top of [`mtkcompile`](@ref) using the `additional_passes` functionality.

!!! warn

These operators are considered experimental API.

```@docs; canonical = false
Expand All @@ -266,7 +266,7 @@ While ModelingToolkit has the capability to represent state machines, it lacks t
to compile and simulate them.

!!! warn

This functionality is considered experimental API

```@docs
Expand Down
4 changes: 2 additions & 2 deletions docs/src/API/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ ModelingToolkit.isconstant
```

!!! note

[`@constants`](@ref) is a convenient way to create `@parameters` with `tunable = false`
metadata

Expand Down Expand Up @@ -422,7 +422,7 @@ system happen at discrete intervals on a clock. While ModelingToolkit cannot yet
such systems, it has the capability to represent them.

!!! warn

These operators are considered experimental API.

```@docs
Expand Down
2 changes: 1 addition & 1 deletion docs/src/basics/Events.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ event = SymbolicDiscreteCallback(
This way, we enforce that `y` will remain the same, and `p` will change.

!!! warning

Symbolic affects come with the guarantee that the state after the callback
will be consistent. However, when using [general functional affects](@ref func_affects)
or [imperative affects](@ref imp_affects) one must be more careful. In
Expand Down
2 changes: 1 addition & 1 deletion docs/src/basics/InputOutput.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ModelingToolkit can generate the dynamics of a system, the function ``M\dot x =
This function takes a vector of variables that are to be considered inputs, i.e., part of the vector ``u``. Alongside returning the function ``f``, [`ModelingToolkit.generate_control_function`](@ref) also returns the chosen state realization of the system after simplification. This vector specifies the order of the state variables ``x``, while the user-specified vector `u` specifies the order of the input variables ``u``.

!!! note "Un-simplified system"

This function expects `sys` to be un-simplified, i.e., `mtkcompile` or `@mtkcompile` should not be called on the system before passing it into this function. `generate_control_function` calls a special version of `mtkcompile` internally.

### Example:
Expand Down
4 changes: 2 additions & 2 deletions docs/src/basics/Linearization.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ using ModelingToolkit: inputs, outputs
```

!!! note "Inputs must be unconnected"

The model above has 4 variables but only three equations, there is no equation specifying the value of `r` since `r` is an input. This means that only unbalanced models can be linearized, or in other words, models that are balanced and can be simulated _cannot_ be linearized. To learn more about this, see [How to linearize a ModelingToolkit model (YouTube)](https://www.youtube.com/watch?v=-XOux-2XDGI&t=395s). Also see [ModelingToolkitStandardLibrary: Linear analysis](https://docs.sciml.ai/ModelingToolkit/stable/tutorials/linear_analysis/) for utilities that make linearization of completed models easier.

!!! note "Un-simplified system"

Linearization expects `sys` to be un-simplified, i.e., `mtkcompile` or `@mtkcompile` should not be called on the system before linearizing.

## Operating point
Expand Down
8 changes: 4 additions & 4 deletions docs/src/basics/MTKLanguage.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ julia> ModelingToolkit.getdefault(model_c1.v)
One or more partial systems can be extended in a higher system with `@extend` statements. This can be done in two ways:

- `@extend PartialSystem(var1 = value1)`

+ This is the recommended way of extending a base system.
+ The default values for the arguments of the base system can be declared in the `@extend` statement.
+ Note that all keyword arguments of the base system are added as the keyword arguments of the main system.

- `@extend var_to_unpack1, var_to_unpack2 = partial_sys = PartialSystem(var1 = value1)`

+ In this method: explicitly list the variables that should be unpacked, provide a name for the partial system and declare the base system.
+ Note that only the arguments listed out in the declaration of the base system (here: `var1`) are added as the keyword arguments of the higher system.

Expand Down Expand Up @@ -254,7 +254,7 @@ end
- Defining discrete events as described [here](https://docs.sciml.ai/ModelingToolkit/stable/basics/Events/#Discrete-events-support).
- If this block is not defined in the model, no discrete events will be added.
- The block can also handle `if`-statements (evaluated at compilation) and unpacked lists defined by [comprehension](https://docs.julialang.org/en/v1/manual/arrays/#man-comprehensions)
- Dicrete events have the form `*condition* => *affect*` where *condition* is a boolean expression
- Discrete events have the form `*condition* => *affect*` where *condition* is a boolean expression
- Discrete parameters and other keyword arguments should be specified in a vector, as seen below.

```@example mtkmodel-example
Expand Down Expand Up @@ -381,7 +381,7 @@ end
```

!!! note

For more examples of usage, checkout [ModelingToolkitStandardLibrary.jl](https://github.com/SciML/ModelingToolkitStandardLibrary.jl/)

## [More on `Model.structure`](@id model_structure)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/basics/PrecompileComponents.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ is the most reliable tool. Use `@descend` on the component constructor and look
(runtime-dispatch) calls. In Cthulhu, press `T` to switch to Typed IR, `o` to enable
optimizations, and `w` to highlight unstable code — this view is harder to read but gives the
most accurate picture of what the compiler actually infers. The Julia flags `--trace-compile`
and `--trace-compile-timing` are also useful for identifying methods that were not
and `--trace-compile-timing` are also useful for identifying methods that were not
precompiled or were invalidated at load time.

!!! note "Julia 1.12 and precompilation"
Expand Down
Loading
Loading