ModelingToolkit.jl icon indicating copy to clipboard operation
ModelingToolkit.jl copied to clipboard

introduce cache array to make discrete-time state update atomic

Open baggepinnen opened this issue 1 year ago • 3 comments

One step towards solving #2701

system in issue above now produces the correct answer

image

baggepinnen avatar May 06 '24 08:05 baggepinnen

@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?

baggepinnen avatar May 06 '24 09:05 baggepinnen

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.

AayushSabharwal avatar May 06 '24 10:05 AayushSabharwal

There are likely additional compiler-related problems, outlined in https://github.com/SciML/ModelingToolkit.jl/issues/2701

baggepinnen avatar May 09 '24 12:05 baggepinnen