java - 如何增加 AnyLogic 的 Java 堆大小?

标签 java

我有一个相当大的 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/

相关文章:

java - 竞争条件虽然使用事务

java - Java 脚本引擎中的字符串表达式插值支持

java - 为什么我不能在 %CATALINA_TMPDIR% 中创建文件夹?

java - JSON 解析错误 : Can not deserialize value

java - 循环在一次运行中运行两次

java - 将字符串值从一个函数传递到另一个函数而不将该字符串作为参数传递

java - 尝试读取和创建文件时出现无限循环

java - 无法从 Java 执行 MySQL 存储过程

java - 性能一台机器上的两台服务器

java - 通过 JavaFX 连接到服务器的用户同步 YouTube 视频播放