1

I have quite a big AnyLogic model which i cannot continue because when I try to save the model it tells me that there is not enough Java Heap memory (and it does not save it). What AnyLogic currently uses is 1GB; my computer has 12GB. Is there a way to increase the Java heap size for AnyLogic?

Thank you.

Alex W.
  • 21
  • 4

1 Answers1

1

In order to give more memory to AnyLogic itself find the AnyLogic.ini file (this is similar to eclipse.ini for regular eclipse which is the base for AnyLogic) in the AnyLogic installation folder and replace -Xmx1024M with something like -Xmx8192M.

You may want to know more about the jvm memory settings for example here and how memory settings affect eclipse and the application (your model) running in it.

If the error happens during running the model then according to the 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.

  • My problem is prior to running the model: I am attempting to save it. I have tried this (before and now): set at 8192M both in Sim Experiment & Parameters variation (the Max Available Memory). I get the same response and it still does not move from 1024M Heap size [telling me that that is the max]. – Alex W. Jul 11 '19 at 16:21
  • I've added more details. – Roman-Stop RU aggression in UA Jul 11 '19 at 17:28
  • The Anylogic.ini file is the key and the answer. Thank you very much Roman Konoval. Greatly appreciated. – Alex W. Jul 12 '19 at 22:23