I would like to know how to deal with large matrix in Dymola. I have an Modelica code that needs to read the values from a large txt file, and store it into matrix. The following is an example code that shows a 1000x1000 matrix. I want Modelica to read the value from a txt file that stores the values for w2 (TXT file (~13 MB): THE LINK). The txt file already has the matrix format in Modelica language. However, there are too many elements, and I cannot just manually copy the values to Dymola. If I do that, Dymola will stop responding.
model Unnamed
Real[1000, 1000] w2;
end Unnamed;
Thank you very much!
Look at the ReadRealMatrixFromFile example for some inspiration. You will need to have the file in a supported format, which your own text format is not. In that case, you could write your own parser or convert the file to the MAT files that MSL knows how to read.