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
(; A, B, C, D), simplified_sys = linearize(sys, inputs, outputs; t=0.0, op = Dict(), allow_input_derivatives = false, zero_dummy_der=false, kwargs...)
622
-
(; A, B, C, D) = linearize(simplified_sys, lin_fun; t=0.0, op = Dict(), allow_input_derivatives = false, zero_dummy_der=false)
624
+
(; A, B, C, D), simplified_sys, extras = linearize(sys, inputs, outputs; t=0.0, op = Dict(), allow_input_derivatives = false, zero_dummy_der=false, kwargs...)
625
+
(; A, B, C, D), extras = linearize(simplified_sys, lin_fun; t=0.0, op = Dict(), allow_input_derivatives = false, zero_dummy_der=false)
623
626
624
627
Linearize `sys` between `inputs` and `outputs`, both vectors of variables. Return a NamedTuple with the matrices of a linear statespace representation
625
628
on the form
@@ -641,6 +644,8 @@ If `allow_input_derivatives = false`, an error will be thrown if input derivativ
641
644
642
645
`zero_dummy_der` can be set to automatically set the operating point to zero for all dummy derivatives.
643
646
647
+
The return value `extras` is a NamedTuple `(; x, p, t)` containing the result of the initialization problem that was solved to determine the operating point.
648
+
644
649
See also [`linearization_function`](@ref) which provides a lower-level interface, [`linearize_symbolic`](@ref) and [`ModelingToolkit.reorder_unknowns`](@ref).
645
650
646
651
See extended help for an example.
@@ -750,7 +755,8 @@ function linearize(sys, inputs, outputs; op = Dict(), t = 0.0,
Copy file name to clipboardExpand all lines: test/downstream/inversemodel.jl
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -132,28 +132,28 @@ sol = solve(prob, Rodas5P())
132
132
133
133
# we need to provide `op` so the initialization system knows what to hold constant
134
134
# the values don't matter
135
-
Sf, simplified_sys =Blocks.get_sensitivity_function(model, :y; op); # This should work without providing an operating opint containing a dummy derivative
135
+
Sf, simplified_sys =get_sensitivity_function(model, :y; op); # This should work without providing an operating opint containing a dummy derivative
0 commit comments