RePast J介绍

工具条控制仿真:


GUI操纵参数:


数据收集和显示:


显示Agent和交互:


目的:

包含一个angent的集合(空间Agent)

定义agent之间的空间关系和之间的相互作用

Celluar:

边界:

grid(网格):


Torus:

没有边界:如果一直朝一个方向走,最终会回到起点

没有空间边界:总是处在同一个位置


形状
矩形


六边形


功能

通过坐标添加或者移除Agent

检查相邻的单元:

冯诺依曼相邻或者摩尔相邻(矩形)

环状

选出周围最大或者最小的项:

具体应用

网络:

点状的或者边缘状的(加权图)


批处理模式:

在后台运行仿真程序然后返回结果

GUI模式:

在控制面板中显示参数

更好的用户交互

运行时通过空间显示或者图表显示

探针:查看并且可以操纵单个的Agent

离散事件模拟器

时间单位:tick

可以在指定的tick触发事件:

RePast仿真:

angent的集合

model可以根据schedule建立并且控制angent的行为的执行

schedule:

执行angent的行为

model的行为:显示更新、数据加载。。。

Model类:

建立并且控制整个进程,angent的收集、显示界面、数据的采集、仿真参数。。。

实现SimModel接口

Agent类:

在空间中显示,必须实现Drawable接口

必须定义getters/setters,并且选择实现CustomProbeable接口

Space类:

放置Agents的空间

显示步骤:空间-->显示-->显示界面



欢迎大家来交流:QQ1448206639

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
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
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值