简体   繁体   English

带有高级可视化功能的python下的ABM

[英]ABM under python with advanced visualization

sorry if this all seem nooby and unclear, but I'm currently learning Netlogo to model agent-based collective behavior and would love to hear some advice on alternative software choices. 很抱歉,如果这一切看起来还不清楚,但我目前正在学习Netlogo,以对基于代理的集体行为进行建模,并且希望听到一些有关替代软件选择的建议。 My main thing is that I'd very much like to take advantage of PyCuda since, from what I understand, it enables parallel computation. 我的主要事情是我非常想利用PyCuda,因为据我所知,它支持并行计算。 However, does that mean I still have to write the numerical script in some other environment and implement the visuals in yet another one??? 但是,这是否意味着我仍然必须在其他环境中编写数字脚本并在另一个环境中实现视觉效果???

If so, my questions are: 如果是这样,我的问题是:

  1. What numerical package should I use? 我应该使用什么数字包? PyEvolve, DEAP, or something else? PyEvolve,DEAP或其他? It appears that PyEvolve is no longer being developed and DEAP is just a wrapper on the outdated(?) EAP. 似乎不再开发PyEvolve,DEAP只是过时(?)EAP的包装。

  2. Graphic-wise, I find mayavi2 and vtk promising. 在图形方面,我发现mayavi2和vtk很有前途。 The problem is, none of the numerical package seems to bind to these readily. 问题是,没有一个数字软件包似乎很容易绑定到这些软件包。 Is there no better alternative than to save the numerical output to datafile and feed them into, say, mayavi2? 除了将数值输出保存到数据文件并将其输入例如mayavi2之外,没有其他更好的选择了吗?

  3. Another option is to generate the data via Netlogo and feed them into a graphing package from (2). 另一种选择是通过Netlogo生成数据,并将其输入到(2)中的图形包中。 Is there any disadvantage to doing this? 这样做有什么不利之处吗?

Thank you so much for shedding light on this confusion. 非常感谢您消除这种困惑。

You almost certainly do not want to use CUDA unless you are running into a significant performance problem. 除非您遇到严重的性能问题,否则几乎可以肯定您不希望使用CUDA。 In general CUDA is best used for solving floating point linear algebra problems. 通常,CUDA最适合用于解决浮点线性代数问题。 If you are looking for a framework built around parallel computations, I'd look towards OpenCL which can take advantage of GPUs if needed.. 如果您正在寻找基于并行计算构建的框架,那么我希望使用OpenCL,它可以在需要时利用GPU。

In terms of visualization, I'd strongly suggest targeting aa specific data interchange format and then letting some other program do that rendering for you. 在可视化方面,我强烈建议您针对一种特定的数据交换格式,然后让其他程序为您进行渲染。 The only reason I'd use something like VTK is if for some reason you need more control over the visualization process or you are looking for a real time solution. 我使用VTK之类的唯一原因是,如果出于某种原因您需要对可视化过程进行更多控制,或者您正在寻找实时解决方案。

Probably the best choice for visualization would be to use an intermediate format and do it in another program. 可视化的最佳选择可能是使用中间格式并在另一个程序中执行。 But for performance, i'd rather configure a JVM for a cluster and run NetLogo on it. 但是为了提高性能,我宁愿为集群配置JVM并在其上运行NetLogo。 I've not tried it yet but i'm thinking seriously to try NetLogo on a Beowulf style cluster. 我还没有尝试过,但是我正在认真考虑在Beowulf风格的群集上尝试NetLogo。

BTW, there is an ABM platform called Repast that is said to have Python interface if you're planning to implement your code in Python. 顺便说一句,如果您打算用Python实现代码,则有一个称为Repast的ABM平台, 据说该平台具有Python接口

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM