Journal of Computer Applications ›› 2012, Vol. 32 ›› Issue (09): 2466-2469.DOI: 10.3724/SP.J.1087.2012.02466

• Network and distributed techno • Previous Articles     Next Articles

Parallel simulation and optimization of CUDA-based real-time huge crowd behavior

HE Yi-hui*,YE Chen,LIU Zhi-zhong,PENG Wei   

  1. Institute of Command Automation,PLA University of Science and Technology,Nanjing Jiangsu 210007,China
  • Received:2012-02-24 Revised:2012-04-18 Online:2012-09-01 Published:2012-09-01
  • Contact: Yi-Hui HE

基于CUDA的大规模群体行为实时仿真并行实现及优化

贺毅辉*,叶晨,刘志忠,彭伟   

  1. 解放军理工大学 指挥自动化学院,南京 210007
  • 通讯作者: 贺毅辉
  • 作者简介:贺毅辉(1973-),男,河北辛集人,教授,主要研究方向:作战仿真、决策支持; 叶晨(1984-),男,江苏无锡人,工程师,硕士研究生,主要研究方向:系统集成与优化; 刘志忠(1980-),男,江西吉安人,讲师,博士,主要研究方向:面向服务计算、人工智能; 彭伟(1982-),男,湖南常德人,讲师,硕士,主要研究方向:作战仿真、系统集成。
  • 基金资助:

    江苏省自然科学基金资助项目(BK2010130,BK2011120)

Abstract: That the individuals search relevant objects from the environment may cause high time complexity during the crowd simulation. If the crowd should be simulated in real-time, the time complexity of the model needs reducing and the computing capability of the simulation platform needs enhancing. In this paper, the Biods model was studied as a typical case and a solution of how to parallelize and optimize the real-time huge crowd simulation based on Compute Unified Device Architecture (CUDA) was presented. Each individual was correspondent to a logical Graphic Processing Unit (GPU) thread. By discretizing simulation environment, the efficiency of searching the relevant individuals was improved. The individual information was organized into an array with the spatial locality by parallel radix sort in order to improve the utilization of the GPU memory bandwidth. The experiment verifies the solution presented here has improved number of simulation individuals up to about 7.3 times as CPU solution.

Key words: huge crowd behavior, Compute Unified Device Architecture (CUDA), parallel computing, real-time simulation

摘要: 群体仿真中个体从环境中查找相关对象时会导致较高的时间复杂度。要使大规模群体能够实时仿真,必须降低模型运算的时间复杂度或者提高计算平台的能力。通过对Biods模型为典型案例进行研究,提出一种基于统一计算架构(CUDA)的大规模群体行为实时仿真并行实现及优化的方法。实现中将个体与GPU逻辑线程一一对应,通过将仿真环境离散化来提高相关个体查找的效率,通过并行化基数排序法将个体信息组织成具有空间局部性的数组,提高图形处理器(GPU)内存带宽的利用率。通过实验验证了该方法将仿真个体的数量提升到CPU方法的约7.3倍。

关键词: 大规模群体行为, 统一计算架构, 并行计算, 实时仿真

CLC Number: