NetLogo BehaviorSpace内存大小限制 [英] NetLogo BehaviorSpace memory size constraint

查看:246
本文介绍了NetLogo BehaviorSpace内存大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的模型中,我使用行为空间来执行许多运行,每次运行都会更改变量,并将输出存储在* .csv中以供以后分析.该模型在最初的几次迭代中运行良好,但是随着数据的增长而迅速变慢.我的问题是,在行为空间中使用文件刷新会有所帮助吗?还是有办法解决?

In my model I'm using behaviour space to carry out a number of runs, with variables changing for each run and the output being stored in a *.csv for later analysis. The model runs fine for the first few iterations, but quickly slows as the data grows. My questions is will file-flush when used in behaviour space help this? Or is there a way around it?

欢呼

西蒙(Simon)

推荐答案

请确保您使用的是表格格式输出,并且已禁用电子表格格式.在 http://ccl.northwestern.edu/netlogo/docs/behaviorspace.html我们读到:

Make sure you are using table format output and spreadsheet format is disabled. At http://ccl.northwestern.edu/netlogo/docs/behaviorspace.html we read:

但是请注意,在实验完成之前,电子表格数据不会写入结果文件.由于电子表格数据会在实验完成之前存储在内存中,因此大型实验可能会用尽内存.因此,除非确实需要,否则应禁用电子表格输出.

Note however that spreadsheet data is not written to the results file until the experiment finishes. Since spreadsheet data is stored in memory until the experiment is done, very large experiments could run out of memory. So you should disable spreadsheet output unless you really want it.

另请注意:

并行运行会相应地增加实验的内存要求.您可能需要提高NetLogo的内存上限(请参阅此FAQ条目).

doing runs in parallel will multiply the experiment's memory requirements accordingly. You may need to increase NetLogo's memory ceiling (see this FAQ entry).

其中链接的常见问题解答条目为 http://ccl.northwestern.edu/netlogo/docs/faq.html#howbig

where the linked FAQ entry is http://ccl.northwestern.edu/netlogo/docs/faq.html#howbig

使用file-flush将无济于事.它会将所有缓冲的数据刷新到磁盘,但是仅对于您用file-open打开的文件,无论如何,与文件关联的缓冲区是固定大小的,不会随时间增长. file-flush仅在运行期间从另一个进程中读取同一文件时才真正有用.

Using file-flush will not help. It flushes any buffered data to disk, but only for a file you opened yourself with file-open, and anyway, the buffer associated with a file is fixed-size, not something that grows over time. file-flush is really only useful if you're reading from the same file from another process during a run.

这篇关于NetLogo BehaviorSpace内存大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆