Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FMI Kit in Matlab/Simulink: FMIKit.loadFMU and FMIKit.setStartValue create Matlab Java Heap Space Error #483

Open
ThomasK211 opened this issue Aug 22, 2024 · 0 comments

Comments

@ThomasK211
Copy link

ThomasK211 commented Aug 22, 2024

We are using FMIKit in Simulink for a design optimization, swapping FMU's and changing FMU parameters with the following functions:
Swap out FMU's: FMIKit.loadFMU()
Change FMU parameters: FMIKit.setStartValue()

In the course of the optimization, these functions are called a couple of thousand times. Unfortunately, after a few hundred calls MATLAB crashes due to a Java Heap Space Error. As it turns out, using these commands repeatedly leads to something that looks like a memory leak inside the Java heap assigned to MATLAB. I tried all tricks regarding garbage collection etc. which are available on the internet and nothing solved this issue. Only commenting out the above-mentioned functions could prevent the memory leak.

Is this a known issue? Or is there even a known fix to this? I would be happy to hear about it.

We are using FMI Kit 3.0

Best,
Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant