Support for arrays as input and output for FMU #203
Unanswered
AishwaryaRaghavendra
asked this question in
Q&A
Replies: 1 comment
-
Arrays are a FMI3 feature, which PythonFMU does not implement. However, that feature is for efficiency only as you only need 1 variablereference for an array of size x. With FMI2 you need x variableidentifiers, but you are still able to use "arrays". You would do this by creating a loop and registering a Real for each element in the list using lambda setter and getter. I don't have any code examples to share, sorry. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently it is possible to define input and output variables of FMU as scalars such as Real or Integer.
I am trying to use pretrained ML model to output predictions within do_step() method. Since PythonFMU has support for only scalar Real variables, this enforces do_step() method to process only single values of a input variable at a time with a prediction being made at every step size in a loop.
Unfortunately this makes FMU execution slower compared to standalone ML model processing input arrays without FMU.
My interest lies whether it is also possible to declare input and output variables for FMU as arrays of type Real(Float) ?
Beta Was this translation helpful? Give feedback.
All reactions