@@ -148,6 +148,11 @@ function SymbolicIndexingInterface.parameter_values(f::LinearizationFunction)
148
148
end
149
149
SymbolicIndexingInterface. current_time (f:: LinearizationFunction ) = current_time (f. prob)
150
150
151
+ """
152
+ $(TYPEDSIGNATURES)
153
+
154
+ Linearize the wrapped system at the point given by `(u, p, t)`.
155
+ """
151
156
function (linfun:: LinearizationFunction )(u, p, t)
152
157
if eltype (p) <: Pair
153
158
p = todict (p)
@@ -241,11 +246,33 @@ SymbolicIndexingInterface.parameter_values(integ::MockIntegrator) = integ.p
241
246
SymbolicIndexingInterface. current_time (integ:: MockIntegrator ) = integ. t
242
247
SciMLBase. get_tmp_cache (integ:: MockIntegrator ) = integ. cache
243
248
249
+ """
250
+ $(TYPEDEF)
251
+
252
+ A struct representing a linearization operation to be performed. Can be symbolically
253
+ indexed to efficiently update the operating point for multiple linearizations in a loop.
254
+ The value of the independent variable can be set by mutating the `.t` field of this struct.
255
+ """
244
256
mutable struct LinearizationProblem{F <: LinearizationFunction , T}
257
+ """
258
+ The wrapped `LinearizationFunction`
259
+ """
245
260
const f:: F
246
261
t:: T
247
262
end
248
263
264
+ """
265
+ $(TYPEDSIGNATURES)
266
+
267
+ Construct a `LinearizationProblem` for linearizing the system `sys` with the given
268
+ `inputs` and `outputs`.
269
+
270
+ # Keyword arguments
271
+
272
+ - `t`: The value of the independent variable
273
+
274
+ All other keyword arguments are forwarded to `linearization_function`.
275
+ """
249
276
function LinearizationProblem (sys:: AbstractSystem , inputs, outputs; t = 0.0 , kwargs... )
250
277
linfun, _ = linearization_function (sys, inputs, outputs; kwargs... )
251
278
return LinearizationProblem (linfun, t)
0 commit comments