Search code examples
netlogoagent-based-modeling

When generate a network of 500 nodes, the behavior space went wrong and how can I solve it?


I use the NW extension to generate small-world networks and make an experiment in behaviour space to control the . In the experiment, I set ["nb-nodes" 50 100 500] (nb-nodes: the number of nodes).

Everything goes well until n = 500. CPU usage is too high, causing the program to become unresponsive.But when I set a single simulation with n = 500 in the interface, it keeps working. Only when I try to do it in the behaviour space, it goes wrong. How can I solve it?


solution:

Thank for advice of Jasper and Steve Railsback, it helps a lot :)

In the FAQ (http://ccl.northwestern.edu/netlogo/docs/faq.html#how-big-can-my-model-be-how-many-turtles-patches-procedures-buttons-and-so-on-can-my-model-contain) it says: "If you are using BehaviorSpace, note that doing runs in parallel will multiply your RAM usage accordingly"

So I just reduce the parallel from 16 to 8, I know it will slow down the program, but at the same time it will also reduce RAM usage and it works. Of course, change RAM is another way and it can fit higher calculating demand.


Solution

  • I agree that you should start with increasing NetLogo's memory allocation as directed in the FAQ that Jasper referred you to. (At least in Windows, you must edit the NetLogo.cfg file using administrator privileges.) You can start by doubling or quadrupling the allocation, but the only real limitation is how much RAM you have on your machine.

    We keep notes and a publication on NetLogo performance issues here: http://www.railsback-grimm-abm-book.com/jasss-models/