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
`f_oop` will have an extra state corresponding to the integrator in the disturbance model. This state will not be affected by any input, but will affect the dynamics from where it enters, in this case it will affect additively from `model.torque.tau.u`.
Copy file name to clipboardExpand all lines: src/systems/diffeqs/odesystem.jl
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -468,7 +468,7 @@ Generates a function that computes the observed value(s) `ts` in the system `sys
468
468
- `eval_expression = false`: If true and `expression = false`, evaluates the returned function in the module `eval_module`
469
469
- `output_type = Array` the type of the array generated by a out-of-place vector-valued function
470
470
- `param_only = false` if true, only allow the generated function to access system parameters
471
-
- `inputs = nothing` additinoal symbolic variables that should be provided to the generated function
471
+
- `inputs = Any[]` additional symbolic variables that should be provided to the generated function
472
472
- `checkbounds = true` checks bounds if true when destructuring parameters
473
473
- `op = Operator` sets the recursion terminator for the walk done by `vars` to identify the variables that appear in `ts`. See the documentation for `vars` for more detail.
474
474
- `throw = true` if true, throw an error when generating a function for `ts` that reference variables that do not exist.
@@ -498,8 +498,8 @@ For example, a function `g(op, unknowns, p..., inputs, t)` will be the in-place
498
498
an array of inputs `inputs` is given, and `param_only` is false for a time-dependent system.
499
499
"""
500
500
functionbuild_explicit_observed_function(sys, ts;
501
-
inputs =nothing,
502
-
disturbance_inputs =nothing,
501
+
inputs =Any[],
502
+
disturbance_inputs =Any[],
503
503
disturbance_argument =false,
504
504
expression =false,
505
505
eval_expression =false,
@@ -572,13 +572,13 @@ function build_explicit_observed_function(sys, ts;
572
572
else
573
573
(unknowns(sys),)
574
574
end
575
-
if inputs===nothing
575
+
ifisempty(inputs)
576
576
inputs = ()
577
577
else
578
578
ps =setdiff(ps, inputs) # Inputs have been converted to parameters by io_preprocessing, remove those from the parameter list
579
579
inputs = (inputs,)
580
580
end
581
-
ifdisturbance_inputs !==nothing
581
+
if!isempty(disturbance_inputs)
582
582
# Disturbance inputs may or may not be included as inputs, depending on disturbance_argument
0 commit comments