Skip to content

Commit

Permalink
improve linearize docstring
Browse files Browse the repository at this point in the history
rm kwargs...
  • Loading branch information
baggepinnen committed Nov 3, 2023
1 parent 527a96b commit dd23d21
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/systems/abstractsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1285,12 +1285,12 @@ The `simplified_sys` has undergone [`structural_simplify`](@ref) and had any occ
See also [`linearize`](@ref) which provides a higher-level interface.
"""
function linearization_function(sys::AbstractSystem, inputs,
outputs; simplify = false,
initialize = true,
op = Dict(),
p = DiffEqBase.NullParameters(),
zero_dummy_der = false,
kwargs...)
outputs; simplify = false,
initialize = true,
op = Dict(),
p = DiffEqBase.NullParameters(),
zero_dummy_der = false,
kwargs...)
inputs isa AbstractVector || (inputs = [inputs])
outputs isa AbstractVector || (outputs = [outputs])

Check warning on line 1295 in src/systems/abstractsystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/abstractsystem.jl#L1294-L1295

Added lines #L1294 - L1295 were not covered by tests
ssys, diff_idxs, alge_idxs, input_idxs = io_preprocessing(sys, inputs, outputs;
Expand Down Expand Up @@ -1488,7 +1488,7 @@ end
(; A, B, C, D), simplified_sys = linearize(sys, inputs, outputs; t=0.0, op = Dict(), allow_input_derivatives = false, zero_dummy_der=false, kwargs...)
(; A, B, C, D) = linearize(simplified_sys, lin_fun; t=0.0, op = Dict(), allow_input_derivatives = false, zero_dummy_der=false)
Return a NamedTuple with the matrices of a linear statespace representation
Linearize `sys` between `inputs` and `outputs`, both vectors of variables. Return a NamedTuple with the matrices of a linear statespace representation
on the form
```math
Expand Down Expand Up @@ -1586,7 +1586,7 @@ lsys_sym, _ = ModelingToolkit.linearize_symbolic(cl, [f.u], [p.x])
```
"""
function linearize(sys, lin_fun; t = 0.0, op = Dict(), allow_input_derivatives = false,
p = DiffEqBase.NullParameters(), kwargs...)
p = DiffEqBase.NullParameters())
x0 = merge(defaults(sys), op)
u0, p2, _ = get_u0_p(sys, x0, p; use_union = false, tofloat = true)

Expand Down

0 comments on commit dd23d21

Please sign in to comment.