我有一个相当大的 AnyLogic 模型,我无法继续,因为当我尝试保存模型时,它告诉我没有足够的 Java 堆内存(并且它不会保存它)。 AnyLogic目前使用的是1GB;我的电脑有12GB。 有没有办法增加 AnyLogic 的 Java 堆大小?
谢谢。
最佳答案
为了给 AnyLogic 本身提供更多内存,请找到 AnyLogic.ini
eclipse.ini
中的文件(这类似于常规 Eclipse 的 AnyLogic
,它是 AnyLogic
的基础)安装文件夹并替换-Xmx1024M
类似于 -Xmx8192M
。
您可能想了解有关 jvm 内存设置的更多信息,例如 here以及如何设置内存affect eclipse 以及在其中运行的应用程序(您的模型)。
如果在运行模型期间发生错误,则根据 documentation :
The straightforward way of dealing with this problem is to increase Java heap space. By default the memory allocated to your model is limited to 64 Megabytes, which is well under the capacity of modern computer physical memory. Therefore you can simply allow the model to consume more. To do it go to the Advanced properties page of your experiment and enter the appropriate amount in “Maximum available memory” field.
关于java - 如何增加 AnyLogic 的 Java 堆大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56941311/