@@ -79,7 +79,7 @@ function SymbolicIndexingInterface.all_symbols(sys::ExampleSystem)
7979end
8080
8181function SymbolicIndexingInterface. default_values (sys:: ExampleSystem )
82- return sys. defaults
82+ return sys. defaults
8383end
8484```
8585
@@ -360,26 +360,26 @@ Introducing a type to represent expression trees:
360360
361361``` julia
362362struct MyExpr
363- op:: Function
364- args:: Vector{Union{MyExpr, MySym, MySymArr, Number, Array}}
363+ op:: Function
364+ args:: Vector{Union{MyExpr, MySym, MySymArr, Number, Array}}
365365end
366366```
367367
368368[ ` symbolic_evaluate ` ] ( @ref ) can be implemented as follows:
369369
370370``` julia
371371function symbolic_evaluate (expr:: Union{MySym, MySymArr} , syms:: Dict )
372- get (syms, expr, expr)
372+ get (syms, expr, expr)
373373end
374374function symbolic_evaluate (expr:: MyExpr , syms:: Dict )
375- for i in eachindex (expr. args)
376- if expr. args[i] isa Union{MySym, MySymArr, MyExpr}
377- expr. args[i] = symbolic_evaluate (expr. args[i], syms)
375+ for i in eachindex (expr. args)
376+ if expr. args[i] isa Union{MySym, MySymArr, MyExpr}
377+ expr. args[i] = symbolic_evaluate (expr. args[i], syms)
378+ end
379+ end
380+ if all (x -> symbolic_type (x) === NotSymbolic (), expr. args)
381+ return expr. op (expr. args... )
378382 end
379- end
380- if all (x -> symbolic_type (x) === NotSymbolic (), expr. args)
381- return expr. op (expr. args... )
382- end
383383end
384384```
385385
429429SymbolicIndexingInterface.parameter_timeseries(fs::ExampleSolution2) = fs.pt
430430# Mark the object as a `Timeseries` object
431431SymbolicIndexingInterface.is_timeseries(::Type{ExampleSolution2}) = Timeseries()
432-
433432```
434433
435434Now we can create an example object and observe the new functionality. Note that
0 commit comments