How to enter vector inputs in SystemModelSimulate?

A support case with the identification [CASE:4272760] was created.

I am having some difficulties to provide vector inputs for a Modelica model using Mathematica. To demonstrate this I am using a simple block that will pass a real vector of length 3 unchenaged to its output of the same dimension:

model = ImportString[
"block VectorPassThrough
input Real[3] u;
output Real[3] y;
equation
y = u;
end VectorPassThrough;"
,
"mo"
];



Now I would like to simulate this simple block and provide a vector input:

sim = SystemModelSimulate[ model, {"y"}, {0, 1}, Association[
"Inputs" -> {
"u" -> Function[ t, {1., 2., 3.}]
}
]
]


Will throw the error SystemModelSimulate::val :

The variables {u} were not recognized, or the types do not match the model.

Using a time Series also will not help:

sim = SystemModelSimulate[ model, {"y"}, {0, 1},
Association[
"Inputs" -> {
"u" -> TimeSeries[ { {1, 2, 3}, {1, 2, 3} }, { {0, 1} }]
}
]
]


In what format shall vector (and matrix) inputs be given for SystemModelSimulate?

• @MalteLenz Still hoping for a nice solution ... ;-) – gwr Dec 30 '20 at 16:13

Since arrays/vectors can also be indexed using enumerations (e.g. "myEnumeration.first", "myEnumeration.second", ... ), having to address individual arguments in this way will be very cumbersome. Expanding the functionality of SystemModelSimulate would be very welcome.
... but the most important reason for implementing vector input is, that in Modelica array dimensions can be left unspecified (e.g. mat[:,:], vec[:]). We cannot simply assign a value to vec[1] because the Modelica compiler needs to be able to determine the dimensions form the dimensions of the input given. It would be really cumbersome, having to work around this using additional components like the Multiplex.