2D arrays with ModelingToolkit

Don’t do this, the order can (and often do) change with any patch release of MTK.

The initial condition is supposed to be supplied as a dict

Dict(var => value, ...)

since symbolic arrays are a bit buggy, you probably have to do

Dict([
  collect(array_var1) .=> values1;
  collect(array_var2) .=> values2;
])
1 Like