ModelingToolkit.jl
ModelingToolkit.jl copied to clipboard
Add boundscheck to `setp`/`setu`
Is your feature request related to a problem? Please describe.
Calling a setter!
created with setter! = setp(sys, [sys.my_param])
doesn't ensure that the length of the array/tuple passed to the functor is the same as the number of symbolic parameters passed to setp
/setu
.
Describe the solution you’d like
setter!
should have a boundscheck.
Additional context
If there is runtime overhead to the check, add the option to disable it for compiled code.