windows - OpenModelica memory usage - Stack Overflow

admin2025-05-01  0

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

Share Improve this question edited Jan 3 at 11:52 Hans Olsson 12.7k19 silver badges43 bronze badges asked Jan 2 at 14:41 RaoulllRaoulll 114 bronze badges 1
  • related / similar question: stackoverflow.com/questions/57428822/… – matth Commented Jan 3 at 12:45
Add a comment  | 

1 Answer 1

Reset to default 0

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.

转载请注明原文地址:http://anycun.com/QandA/1746114108a91865.html