Sebastian Micluța-Câmpeanu
Sebastian Micluța-Câmpeanu
If you want to replace _all_ occurances of a subsystem, you can use `substitute` with a `Dict` of system names to new systems and that will replace all the occurrences...
Yeah, I'm not sure if this is public API. It's not documented as far as I can tell 😅
The thing is that the default values for parameters encode that they should only initially be that and not that it's a relationship that needs to be enforced. To enforce...
I found a (better?) solution that should work without callable parameters in https://github.com/SciML/ModelingToolkitStandardLibrary.jl/pull/314
This seems to happen due to function registration. Consider the following: ```julia using ModelingToolkitStandardLibrary.Blocks @named out_inside = RealOutputArray(nout=2) @named out_outside = RealOutputArray(nout=2) @named in_inside = RealInputArray(nin=2) @named in_outside = RealInputArray(nin=2)...
Yes, function registration is crucial for this to work.
As a workaround you can use `eqs = [model.nn_in.u~nn.output.u, model.nn_out.u~nn.input.u]` instead of `eqs = [connect(model.nn_in, nn.output). connect(model.nn_out, nn.input)]`, but that's not ideal. Hopefully we can get this fixed somehow.
As I understand this is still work in progress. See https://github.com/SciML/SciMLSensitivity.jl/pull/1085 for more details.
`AutoZygote` should work, but `AutoReverseDiff` (& `AutoEnzyme`) don't seem to work yet. One thing to note is that currently replacing the entire parameter vector is required as `setp_oop` is not...
```julia using ModelingToolkit import ModelingToolkit.t_nounits as t import ModelingToolkit.D_nounits as D using SciMLStructures: SciMLStructures, canonicalize, Tunable using SciMLSensitivity using SymbolicIndexingInterface using OrdinaryDiffEq, Plots using Optimization using OptimizationOptimJL using BenchmarkTools using...