I want to initialize a 1080*1080 image matrix in openmodelica for visualization, but when I try to do this, it will freeze and report that the memory usage is too high, is there any way to solve it?
Or is OpenModelica unable to do this?
model test
parameter Integer rows = 1080;
parameter Integer cols = 1080;
Real matrix[rows, cols] = zeros(rows, cols);
end test
Here's a screenshot of my task manager's occupancy
I've tried to change the matrix size to 10*10 and it went well. I'd like to find a way to initialize and populate such a large matrix using the Modelica language
I want to initialize a 1080*1080 image matrix in openmodelica for visualization, but when I try to do this, it will freeze and report that the memory usage is too high, is there any way to solve it?
Or is OpenModelica unable to do this?
model test
parameter Integer rows = 1080;
parameter Integer cols = 1080;
Real matrix[rows, cols] = zeros(rows, cols);
end test
Here's a screenshot of my task manager's occupancy
I've tried to change the matrix size to 10*10 and it went well. I'd like to find a way to initialize and populate such a large matrix using the Modelica language
It is not a restriction of the Modelica language. However, if you want to use a 1080x1080 image you might consider using an external object for the image.
There is ongoing work to improve Modelica tools to handle large models of various kinds - and there might already be various work-arounds.
The out of memory above is for OpenModelica, whereas Dymola translates this model.