You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/basics/FAQ.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ are similarly undocumented. Following is the list of behaviors that should be re
28
28
-`setindex!(::MTKParameters, value, ::ParameterIndex)` can be used to set the value of a
29
29
parameter with the given index.
30
30
-`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`).
32
32
-`copy(::MTKParameters)` is defined and duplicates the parameter object, including the
33
33
memory used by the underlying buffers.
34
34
@@ -194,7 +194,7 @@ p, replace, alias = SciMLStructures.canonicalize(Tunable(), prob.p)
194
194
195
195
# ERROR: ArgumentError: SymbolicUtils.BasicSymbolic{Real}[xˍt(t)] are missing from the variable map.
196
196
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.
Copy file name to clipboardExpand all lines: docs/src/basics/InputOutput.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,10 @@ ModelingToolkit can generate the dynamics of a system, the function ``M\dot x =
28
28
29
29
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``.
30
30
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
+
31
35
### Example:
32
36
33
37
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.
0 commit comments