ModelingToolkit.jl
ModelingToolkit.jl copied to clipboard
introduce cache array to make discrete-time state update atomic
One step towards solving #2701
system in issue above now produces the correct answer
@AayushSabharwal the test failure indicates that the indices used to index into p are of some magical type? Tests pass locally so I assume this is some recent change upstream?
So view won't work either. There are a bunch of branches based on whether has_index_cache(sys) && get_index_cache(sys) !== nothing (which is basically a check for if the parameter object is an array or MTKParameters). The view version is never used for MTKParameters.
There are likely additional compiler-related problems, outlined in https://github.com/SciML/ModelingToolkit.jl/issues/2701