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
@@ -470,7 +470,7 @@ Generates a function that computes the observed value(s) `ts` in the system `sys
470
470
- `eval_expression = false`: If true and `expression = false`, evaluates the returned function in the module `eval_module`
471
471
- `output_type = Array` the type of the array generated by a out-of-place vector-valued function
472
472
- `param_only = false` if true, only allow the generated function to access system parameters
473
-
- `inputs = nothing` additinoal symbolic variables that should be provided to the generated function
473
+
- `inputs = Any[]` additional symbolic variables that should be provided to the generated function
474
474
- `checkbounds = true` checks bounds if true when destructuring parameters
475
475
- `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.
476
476
- `throw = true` if true, throw an error when generating a function for `ts` that reference variables that do not exist.
@@ -500,8 +500,8 @@ For example, a function `g(op, unknowns, p..., inputs, t)` will be the in-place
500
500
an array of inputs `inputs` is given, and `param_only` is false for a time-dependent system.
501
501
"""
502
502
functionbuild_explicit_observed_function(sys, ts;
503
-
inputs =nothing,
504
-
disturbance_inputs =nothing,
503
+
inputs =Any[],
504
+
disturbance_inputs =Any[],
505
505
disturbance_argument =false,
506
506
expression =false,
507
507
eval_expression =false,
@@ -574,13 +574,13 @@ function build_explicit_observed_function(sys, ts;
574
574
else
575
575
(unknowns(sys),)
576
576
end
577
-
if inputs===nothing
577
+
ifisempty(inputs)
578
578
inputs = ()
579
579
else
580
580
ps =setdiff(ps, inputs) # Inputs have been converted to parameters by io_preprocessing, remove those from the parameter list
581
581
inputs = (inputs,)
582
582
end
583
-
ifdisturbance_inputs !==nothing
583
+
if!isempty(disturbance_inputs)
584
584
# Disturbance inputs may or may not be included as inputs, depending on disturbance_argument
0 commit comments