一步一步学Repast 第一章 概要

第一章 概要

REPAST —— 一个多Agent仿真平台  对于国内做AGENT研究的学子来说,是一个不错的开源框架。本人也是研究AGENT的,希望和大家多多探讨。废话少说,我们开始吧。

注明:这个教程是我从  A RePast Tutorial by John T. Murphy, University of Arizona & Arizona State University   翻译过来,再按照自己的理解所写,希望对大家有所帮助。


开发环境  

用RePast做AGENT模拟需要  repast包,大家可以从sourceforge上去得到,我用的是Repast J版本,后缀是.exe可执行程序。安装好之后,有 api lib src demos how-to等文件夹,当然还有 Repast.exe主程序,和repast.jar包。


开发工具用的是eclipse,jdk版本6.0 ,当然5.0就可以了,除了repast之外还要把lib文件夹里的包导入。classpath如下


     < classpathentry  kind ="lib"  path ="lib/repast.jar" />


     < classpathentry  kind ="lib"  path ="lib/asm.jar" />
    
< classpathentry  kind ="lib"  path ="lib/beanbowl.jar" />
    
< classpathentry  kind ="lib"  path ="lib/colt.jar" />
    
< classpathentry  kind ="lib"  path ="lib/commons-collections.jar" />
    
< classpathentry  kind ="lib"  path ="lib/commons-logging.jar" />
    
< classpathentry  kind ="lib"  path ="lib/geotools_repast.jar" />
    
< classpathentry  kind ="lib"  path ="lib/ibis.jar" />
    
< classpathentry  kind ="lib"  path ="lib/jakarta-poi.jar" />
    
< classpathentry  kind ="lib"  path ="lib/jep-2.24.jar" />
    
< classpathentry  kind ="lib"  path ="lib/jgap.jar" />
    
< classpathentry  kind ="lib"  path ="lib/jh.jar" />
  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 9
    评论
Background I've written a small Repast Simphony program which demonstrates how to create a virtual city and move some agents around a road network. I'm using this type of model for my PhD (an agent-based model of crime/burglar) and hopefully this program will be useful for anyone who needs to be able to move agents around a city. If you're new to Repast Simphony you should do some tutorials first otherwise the code won't mean anything to you. The ones on the Repast website are excellent (in particular do the Java one). Repast Simphony has quite a steep learning curve but is well worth learning if you need to build agent-based models, it's an excellent tool. There is some background information about how the program works on my research blog. Referencing and Editing The code is released under the GNU General Public Licence so you're welcome to use the code however you would like to but please put a reference to me (Nick Malleson) or to this page somewhere. When I finish my working paper you could use that instead. If you improve or extend the code please let me know and I'll update it on this site. This is my first attempt at building a virtual city and so there will be lots of places where it can be improved (particularly with regards to efficiency, I think the routing algorithm is very slow). The Program The program is available as a single compressed file which contains the entire Eclipse project: Repast City Project. Download the repastcity2.zip file and extract it to a temporary directory. To run the program you need to download Repast Simphony version 2.0 (it comes bundled with the Eclipse development environment) and then follow these instructions: 1.Start Repast (Eclipse) 2.Go to File -> Import 3.Then under 'General' select 'Existing Projects Into Workspace'. 4.Next to 'Select root directory' click on browse and select the extracted project. 5.Then click on 'Finish'. If you left the 'copy projects into workspace' box ticked you can now

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值