Skip to content

Commit f109d22

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents eb681c1 + ac39aab commit f109d22

Some content is hidden

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

43 files changed

+2275
-460
lines changed

.github/workflows/Documentation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v4
2121
- uses: julia-actions/setup-julia@latest
2222
with:
23-
version: '1'
23+
version: 'lts'
2424
- 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
2525
- name: Install dependencies
2626
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
@@ -31,8 +31,8 @@ jobs:
3131
JULIA_DEBUG: "Documenter"
3232
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs/ --code-coverage=user docs/make.jl
3333
- uses: julia-actions/julia-processcoverage@v1
34-
- uses: codecov/codecov-action@v4
34+
- uses: codecov/codecov-action@v5
3535
with:
36-
file: lcov.info
36+
files: lcov.info
3737
token: ${{ secrets.CODECOV_TOKEN }}
3838
fail_ci_if_error: true

.github/workflows/Downstream.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
exit(0) # Exit immediately, as a success
6969
end
7070
- uses: julia-actions/julia-processcoverage@v1
71-
- uses: codecov/codecov-action@v4
71+
- uses: codecov/codecov-action@v5
7272
with:
73-
file: lcov.info
73+
files: lcov.info
7474
token: ${{ secrets.CODECOV_TOKEN }}
75-
fail_ci_if_error: true
75+
fail_ci_if_error: false

Project.toml

Lines changed: 7 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.48.0"
4+
version = "9.53.0"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
@@ -21,6 +21,7 @@ Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
2121
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
2222
DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
2323
DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821"
24+
EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56"
2425
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
2526
Expronicon = "6b7a57c9-7cc1-4fdf-b7f5-e857abae3636"
2627
FindFirstFunctions = "64ca27bc-2ba2-4a57-88aa-44e436879224"
@@ -94,6 +95,7 @@ Distributions = "0.23, 0.24, 0.25"
9495
DocStringExtensions = "0.7, 0.8, 0.9"
9596
DomainSets = "0.6, 0.7"
9697
DynamicQuantities = "^0.11.2, 0.12, 0.13, 1"
98+
EnumX = "1.0.4"
9799
ExprTools = "0.1.10"
98100
Expronicon = "0.8"
99101
FindFirstFunctions = "1"
@@ -111,7 +113,7 @@ Libdl = "1"
111113
LinearAlgebra = "1"
112114
MLStyle = "0.4.17"
113115
NaNMath = "0.3, 1"
114-
NonlinearSolve = "3.14"
116+
NonlinearSolve = "3.14, 4"
115117
OffsetArrays = "1"
116118
OrderedCollections = "1"
117119
OrdinaryDiffEq = "6.82.0"
@@ -125,13 +127,13 @@ SciMLBase = "2.57.1"
125127
SciMLStructures = "1.0"
126128
Serialization = "1"
127129
Setfield = "0.7, 0.8, 1"
128-
SimpleNonlinearSolve = "0.1.0, 1"
130+
SimpleNonlinearSolve = "0.1.0, 1, 2"
129131
SparseArrays = "1"
130132
SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0, 2"
131133
StaticArrays = "0.10, 0.11, 0.12, 1.0"
132-
SymbolicIndexingInterface = "0.3.31"
134+
SymbolicIndexingInterface = "0.3.35"
133135
SymbolicUtils = "3.7"
134-
Symbolics = "6.15.2"
136+
Symbolics = "6.19"
135137
URIs = "1"
136138
UnPack = "0.1, 1.0"
137139
Unitful = "1.1"

docs/Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ Distributions = "0.25"
3030
Documenter = "1"
3131
DynamicQuantities = "^0.11.2, 0.12, 1"
3232
ModelingToolkit = "8.33, 9"
33-
NonlinearSolve = "3"
33+
NonlinearSolve = "3, 4"
3434
Optim = "1.7"
35-
Optimization = "3.9"
36-
OptimizationOptimJL = "0.1"
35+
Optimization = "3.9, 4"
36+
OptimizationOptimJL = "0.1, 0.4"
3737
OrdinaryDiffEq = "6.31"
3838
Plots = "1.36"
3939
SciMLStructures = "1.1"

docs/src/basics/FAQ.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ parameter_index(sys, sym)
8282
Note that while the variable index will be an integer, the parameter index is a struct of
8383
type `ParameterIndex` whose internals should not be relied upon.
8484

85+
## Can I index with strings?
86+
87+
Strings are not considered symbolic variables, and thus cannot directly be used for symbolic
88+
indexing. However, ModelingToolkit does provide a method to parse the string representation of
89+
a variable, given the system in which that variable exists.
90+
91+
```@docs
92+
ModelingToolkit.parse_variable
93+
```
94+
8595
## Transforming value maps to arrays
8696

8797
ModelingToolkit.jl allows (and recommends) input maps like `[x => 2.0, y => 3.0]`

docs/src/basics/MTKLanguage.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ julia> ModelingToolkit.getdefault(model_c1.v)
147147
2.0
148148
```
149149

150-
#### `@extend` begin block
150+
#### `@extend` statement
151151

152-
Partial systems can be extended in a higher system in two ways:
152+
One or more partial systems can be extended in a higher system with `@extend` statements. This can be done in two ways:
153153

154154
- `@extend PartialSystem(var1 = value1)`
155155

@@ -313,7 +313,8 @@ end
313313
- `:components`: The list of sub-components in the form of [[name, sub_component_name],...].
314314
- `:constants`: Dictionary of constants mapped to its metadata.
315315
- `:defaults`: Dictionary of variables and default values specified in the `@defaults`.
316-
- `:extend`: The list of extended unknowns, name given to the base system, and name of the base system.
316+
- `:extend`: The list of extended unknowns, parameters and components, name given to the base system, and name of the base system.
317+
When multiple extend statements are present, latter two are returned as lists.
317318
- `:structural_parameters`: Dictionary of structural parameters mapped to their metadata.
318319
- `:parameters`: Dictionary of symbolic parameters mapped to their metadata. For
319320
parameter arrays, length is added to the metadata as `:size`.

docs/src/basics/Variable_metadata.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,44 @@ hasbounds(u)
8686
getbounds(u)
8787
```
8888

89+
Bounds can also be specified for array variables. A scalar array bound is applied to each
90+
element of the array. A bound may also be specified as an array, in which case the size of
91+
the array must match the size of the symbolic variable.
92+
93+
```@example metadata
94+
@variables x[1:2, 1:2] [bounds = (-1, 1)]
95+
hasbounds(x)
96+
```
97+
98+
```@example metadata
99+
getbounds(x)
100+
```
101+
102+
```@example metadata
103+
getbounds(x[1, 1])
104+
```
105+
106+
```@example metadata
107+
getbounds(x[1:2, 1])
108+
```
109+
110+
```@example metadata
111+
@variables x[1:2] [bounds = (-Inf, [1.0, Inf])]
112+
hasbounds(x)
113+
```
114+
115+
```@example metadata
116+
getbounds(x)
117+
```
118+
119+
```@example metadata
120+
getbounds(x[2])
121+
```
122+
123+
```@example metadata
124+
hasbounds(x[2])
125+
```
126+
89127
## Guess
90128

91129
Specify an initial guess for custom initial conditions of an `ODESystem`.

0 commit comments

Comments
 (0)