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
Copy file name to clipboardExpand all lines: src/systems/codegen.jl
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -943,6 +943,8 @@ Generates a function that computes the observed value(s) `ts` in the system `sys
943
943
- `throw = true` if true, throw an error when generating a function for `ts` that reference variables that do not exist.
944
944
- `mkarray`: only used if the output is an array (that is, `!isscalar(ts)` and `ts` is not a tuple, in which case the result will always be a tuple). Called as `mkarray(ts, output_type)` where `ts` are the expressions to put in the array and `output_type` is the argument of the same name passed to build_explicit_observed_function.
945
945
- `cse = true`: Whether to use Common Subexpression Elimination (CSE) to generate a more efficient function.
946
+
- `wrap_delays = is_dde(sys)`: Whether to add an argument for the history function and use
947
+
it to calculate all delayed variables.
946
948
947
949
## Returns
948
950
@@ -981,7 +983,8 @@ function build_explicit_observed_function(sys, ts;
981
983
op = Operator,
982
984
throw =true,
983
985
cse =true,
984
-
mkarray =nothing)
986
+
mkarray =nothing,
987
+
wrap_delays =is_dde(sys))
985
988
#TODO: cleanup
986
989
is_tuple = ts isa Tuple
987
990
if is_tuple
@@ -1068,14 +1071,15 @@ function build_explicit_observed_function(sys, ts;
0 commit comments