Skip to content

Commit 943d103

Browse files
committed
revert rename
1 parent ca589bb commit 943d103

File tree

102 files changed

+402
-407
lines changed

Some content is hidden

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

102 files changed

+402
-407
lines changed

docs/src/basics/AbstractSystem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ a lower level in the system.
152152
## Namespacing
153153

154154
By default, unsimplified systems will namespace variables accessed via `getproperty`.
155-
Systems created via `@mtkbuild`, or ones passed through `mtkbuild` or
155+
Systems created via `@mtkbuild`, or ones passed through `structural_simplify` or
156156
`complete` will not perform this namespacing. However, all of these processes modify
157157
the system in a variety of ways. To toggle namespacing without transforming any other
158158
property of the system, use `toggle_namespacing`.

docs/src/basics/Composition.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ equations(connected)
4242
# Differential(t)(decay1₊x(t)) ~ decay1₊f(t) - (decay1₊a*(decay1₊x(t)))
4343
# Differential(t)(decay2₊x(t)) ~ decay2₊f(t) - (decay2₊a*(decay2₊x(t)))
4444
45-
simplified_sys = mtkbuild(connected)
45+
simplified_sys = structural_simplify(connected)
4646
4747
equations(simplified_sys)
4848
```
@@ -84,7 +84,7 @@ example, let's say there is a variable `x` in `unknowns` and a variable
8484
`x` in `subsys`. We can declare that these two variables are the same
8585
by specifying their equality: `x ~ subsys.x` in the `eqs` for `sys`.
8686
This algebraic relationship can then be simplified by transformations
87-
like `mtkbuild` which will be described later.
87+
like `structural_simplify` which will be described later.
8888

8989
### Numerics with Composed Models
9090

@@ -169,7 +169,7 @@ parameters(level3)
169169

170170
In many cases, the nicest way to build a model may leave a lot of
171171
unnecessary variables. Thus one may want to remove these equations
172-
before numerically solving. The `mtkbuild` function removes
172+
before numerically solving. The `structural_simplify` function removes
173173
these trivial equality relationships and trivial singularity equations,
174174
i.e. equations which result in `0~0` expressions, in over-specified systems.
175175

@@ -227,7 +227,7 @@ values. The user of this model can then solve this model simply by
227227
specifying the values at the highest level:
228228

229229
```@example compose
230-
sireqn_simple = mtkbuild(sir)
230+
sireqn_simple = structural_simplify(sir)
231231
232232
equations(sireqn_simple)
233233
```
@@ -251,7 +251,7 @@ sol[reqn.R]
251251
## Tearing Problem Construction
252252

253253
Some system types (specifically `NonlinearSystem`) can be further
254-
reduced if `mtkbuild` has already been applied to them. This is done
254+
reduced if `structural_simplify` has already been applied to them. This is done
255255
by using the alternative problem constructors (`BlockNonlinearProblem`).
256256
In these cases, the constructor uses the knowledge of the
257257
strongly connected components calculated during the process of simplification

docs/src/basics/Debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
1313
eqs = [D(u1) ~ -√(u1), D(u2) ~ -√(u2), D(u3) ~ -√(u3)]
1414
defaults = [u1 => 1.0, u2 => 2.0, u3 => 3.0]
1515
@named sys = ODESystem(eqs, t; defaults)
16-
sys = mtkbuild(sys)
16+
sys = structural_simplify(sys)
1717
```
1818

1919
This problem causes the ODE solver to crash:

docs/src/basics/Events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ to the system.
472472
```@example events
473473
@named sys = ODESystem(
474474
eqs, t, [temp], params; continuous_events = [furnace_disable, furnace_enable])
475-
ss = mtkbuild(sys)
475+
ss = structural_simplify(sys)
476476
prob = ODEProblem(ss, [temp => 0.0, furnace_on => true], (0.0, 10.0))
477477
sol = solve(prob, Tsit5())
478478
plot(sol)
@@ -585,7 +585,7 @@ We can now simulate the encoder.
585585
```@example events
586586
@named sys = ODESystem(
587587
eqs, t, [theta, omega], params; continuous_events = [qAevt, qBevt])
588-
ss = mtkbuild(sys)
588+
ss = structural_simplify(sys)
589589
prob = ODEProblem(ss, [theta => 0.0], (0.0, pi))
590590
sol = solve(prob, Tsit5(); dtmax = 0.01)
591591
sol.ps[cnt]

docs/src/basics/FAQ.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ are similarly undocumented. Following is the list of behaviors that should be re
2828
- `setindex!(::MTKParameters, value, ::ParameterIndex)` can be used to set the value of a
2929
parameter with the given index.
3030
- `parameter_values(sys, sym)` will return a `ParameterIndex` object if `sys` has been
31-
`complete`d (through `mtkbuild`, `complete` or `@mtkbuild`).
31+
`complete`d (through `structural_simplify`, `complete` or `@mtkbuild`).
3232
- `copy(::MTKParameters)` is defined and duplicates the parameter object, including the
3333
memory used by the underlying buffers.
3434

@@ -194,7 +194,7 @@ p, replace, alias = SciMLStructures.canonicalize(Tunable(), prob.p)
194194

195195
# ERROR: ArgumentError: SymbolicUtils.BasicSymbolic{Real}[xˍt(t)] are missing from the variable map.
196196

197-
This error can come up after running `mtkbuild` on a system that generates dummy derivatives (i.e. variables with `ˍt`). For example, here even though all the variables are defined with initial values, the `ODEProblem` generation will throw an error that defaults are missing from the variable map.
197+
This error can come up after running `structural_simplify` on a system that generates dummy derivatives (i.e. variables with `ˍt`). For example, here even though all the variables are defined with initial values, the `ODEProblem` generation will throw an error that defaults are missing from the variable map.
198198

199199
```julia
200200
using ModelingToolkit
@@ -206,7 +206,7 @@ eqs = [x1 + x2 + 1 ~ 0
206206
x1 + D(x3) + x4 + 3 ~ 0
207207
2 * D(D(x1)) + D(D(x2)) + D(D(x3)) + D(x4) + 4 ~ 0]
208208
@named sys = ODESystem(eqs, t)
209-
sys = mtkbuild(sys)
209+
sys = structural_simplify(sys)
210210
prob = ODEProblem(sys, [], (0, 1))
211211
```
212212

docs/src/basics/InputOutput.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ ModelingToolkit can generate the dynamics of a system, the function ``M\dot x =
2828

2929
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``.
3030

31+
!!! note "Un-simplified system"
32+
33+
This function expects `sys` to be un-simplified, i.e., `structural_simplify` or `@mtkbuild` should not be called on the system before passing it into this function. `generate_control_function` calls a special version of `structural_simplify` internally.
34+
3135
### Example:
3236

3337
The following example implements a simple first-order system with an input `u` and state `x`. The function `f` is generated using `generate_control_function`, and the function `f` is then tested with random input and state values.

docs/src/basics/Linearization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ eqs = [D(x) ~ v
7575
y.u ~ x]
7676
7777
@named duffing = ODESystem(eqs, t, systems = [y, u], defaults = [u.u => 0])
78-
duffing = mtkbuild(duffing, inputs = [u.u], outputs = [y.u])
78+
duffing = structural_simplify(duffing, inputs = [u.u], outputs = [y.u])
7979
8080
# pass a constant value for `x`, since it is the variable we will change in operating points
8181
linfun = linearization_function(duffing, [u.u], [y.u]; op = Dict(x => NaN));

docs/src/basics/MTKLanguage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,10 @@ This is equivalent to:
508508

509509
```julia
510510
@named model = CustomModel()
511-
sys = mtkbuild(model)
511+
sys = structural_simplify(model)
512512
```
513513

514-
Pass keyword arguments to `mtkbuild` using the following syntax:
514+
Pass keyword arguments to `structural_simplify` using the following syntax:
515515

516516
```julia
517517
@mtkbuild sys=CustomModel() fully_determined=false
@@ -521,5 +521,5 @@ This is equivalent to:
521521

522522
```julia
523523
@named model = CustomModel()
524-
sys = mtkbuild(model; fully_determined = false)
524+
sys = structural_simplify(model; fully_determined = false)
525525
```

docs/src/basics/Precompilation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using ModelingToolkit
2222

2323
@variables x(ModelingToolkit.t_nounits)
2424
@named sys = ODESystem([ModelingToolkit.D_nounits(x) ~ -x + 1], ModelingToolkit.t_nounits)
25-
prob = ODEProblem(mtkbuild(sys), [x => 30.0], (0, 100), [],
25+
prob = ODEProblem(structural_simplify(sys), [x => 30.0], (0, 100), [],
2626
eval_expression = true, eval_module = @__MODULE__)
2727

2828
end

docs/src/basics/Validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ ps = @parameters s=-1 [unit = u"cm"] c=c [unit = u"cm"]
112112
eqs = [D(a) ~ dummycomplex(c, s);]
113113
sys = ODESystem(
114114
eqs, t, [sts...;], [ps...;], name = :sys, checks = ~ModelingToolkit.CheckUnits)
115-
sys_simple = mtkbuild(sys)
115+
sys_simple = structural_simplify(sys)
116116
```
117117

118118
## `DynamicQuantities` Literals

0 commit comments

Comments
 (0)