1
• Large-scale real-life emergency evacuation drills are often impractical or impossible due to many factors. • We envision a tool that helps planners and situation commanders interactively create and verify large-scale emergency response plans. • It must be scalable, accurate and simulates faster than real-time to enable interactivity. It must also be able to simultaneously test for multiple criteria and plans with the ability to compare their effectiveness and highlight potential pitfalls. • The tool uses a network of GPU-enabled computers for simulation, and a central host that manages the information flow between these processes. An external client can connect to the host in order to dispatch scenario data and obtain simulated data for analysis. High-Performance Pedestrian Multi-Simulation Using GPU Cluster Twin Karmakharm, Paul Richmond Department of Automatic Control and Systems Engineering, University of Sheffield t.karmakharm@sheffield.ac.uk, p.richmond@sheffield.ac.uk Pedestrian Simulation as a Real-Time Decision Support Tool Built on the Agent-Based FLAME GPU Framework The Model Faster Than Real-Time Simulation Batching Distributed GPU Processing of Multiple Simulations Results & Conclusion • Agent Based Modelling (ABM) is a powerful simulation technique which is used to assess group behaviour from a number of simple interacting rules between communicating autonomous agents. • Simulation code is generated based on the Flexible Large-scale Agent Modelling Environment on the GPU (FLAME GPU). [5] • XML is used for model specification with extendible Schemas used to ensure correct model syntax and add GPU specific information. The model specification, along with the C-based function scripts are transformed using XSLT templates in to compilable code. [6,7] • Complexities of GPU programming are entirely abstracted from the modelling and simulation process. • Uses the social forces with contact force model for simulating interactions between pedestrians and their environment. [1,2] • Pedestrians have access to environment collision detection and global navigation through a grid of navigation agents that holds a set of vector force fields. [3] • A collision vector force field holds information about static environments (e.g. walls) • Navigation vector force fields represent the goals of the agent. It gives the shortest path to a single exit (used for normal walking models), multiple destinations (evacuations), or a gathering point. • Industry-standard metrics are used to collect data for analysis such as the Fruin Level of Service. [4] • The simulation can run faster than real-time when visualisation is not required. • Larger time-steps can be used in order to increase the simulation rate, with some accuracy trade-offs. • Smaller models are grouped together in to a single simulation. Efficiency is increased for larger simulation sizes due to reduced kernel calls and ensuring maximum thread utilization. • The grid of navigation agents are spatially translated to its global coordinate according to their simulation ID. • Agents are assigned IDs in order to prevent interference in boundary cases. • A master computer handles the scheduling and distribution of simulations. • An instance of a slave scheduler is present on each simulation computer and is responsible for initialising instances of simulator programs. • An instance of a simulator is created for each GPU core on the system. This avoids complications in program design as there is no cross-communication between the simulators. • Simulators store their simulation results locally and transmit them when requested. • Results are collected as per user-specified simulation time period. Performance can be further increased by increasing data collection period. • Simulation of 160,000 pedestrians at ~20 frames per second without visualisation when running 8 simultaneous simulation of 256 2 grid size across 2 Nvidia GTX 590 GPUs. • Uses low-cost hardware and networking components. • Future work: Further optimization of the simulation framework, incorporating more complex navigation system and bringing the software to commercialisation. Simulation Code XSLT Simulation Templates ■■ XSLT Processor ■■ Simulatio n Program XML Schemas XML Model File Scripted Behaviour Simulator PC 1 Client PC 1 Simulator Manager Node Client Node Host PC Master Scheduler GPU Simulator Node GPU Simulator Node Navigation Agents Collision FVF Navigation FVF 1 Navigation FVF 2 Navigation Agents Grid x y Destination/Exit Static Obstacle Collision Force Vector Navigation Force Vector Navigation Agents Pedestrian List Global Navigation Map Global Pedestrian List Simulation 1 Simulator Navigation Agents Pedestrian List Simulation 2 1 2 3 4 5 9 8 7 6 1 2 3 4 5 9 8 7 6 1 2 3 7 8 15 14 13 9 4 5 6 10 11 18 17 16 12 22 23 24 28 29 36 35 34 30 19 20 21 25 26 33 32 31 27 0.46 m 2 0.93 m 2 1.39 m 2 2.32 m 2 3.25 m 2 3.72 m 2 LOS F LOS E LOS D LOS C LOS B LOS A [1] D. Helbing. A mathematical model for the behavior of pedestrians. Behavioral Science, 36(4):298{310, Oct. 1991. [2] D. Helbing, I. Farkas, and T. Vicsek. Simulating dynamical features of escape panic. Nature, 407(6803):487{490, Sept. 2000. [3] T. Karmakharm, P. Richmond, and D. Romano. Agent-based Large Scale Simulation of Pedestrians With Adaptive Re- alistic Navigation Vector Fields. In Theory and Practice of Computer Graphics (TPCG) 2010, pages 67{74, 2010. [4] J. J. Fruin. Pedestrian planning and design. Metropolitan Association of Urban Designers and Environmental Plan- ners, 1971. [5] FLAME GPU Website, http://www.flamegpu.com [6] P. Richmond and D. Romano. Agent Based GPU, a Real-time 3D Simulation and Interactive Visualisation Framework for Massive Agent Based Modelling on the GPU. The rst International Workshop on Super Visualization (IWSV08), 2008.1 [7] P. Richmond and D. Romano. Template-Driven Agent-Based Modeling and Simulation with CUDA. In W.-m. W. Hwu, editor, GPU Computing Gems Emerald Edition, Applications of GPU Computing Series, chapter 21, pages 313-324. Mor- gan Kaufmann, 1st edition, Feb. 2011. References Work funded by BAE Systems GPU Computing Gems Emeald Edition: Chapter 21 p.313-324

High-Performance Pedestrian Multi-Simulation Using GPU Clusterdeveloper.download.nvidia.com/GTC/PDF/GTC2012... · High-Performance Pedestrian Multi-Simulation Using GPU Cluster Twin

  • Upload
    others

  • View
    25

  • Download
    0

Embed Size (px)

Citation preview

Page 1: High-Performance Pedestrian Multi-Simulation Using GPU Clusterdeveloper.download.nvidia.com/GTC/PDF/GTC2012... · High-Performance Pedestrian Multi-Simulation Using GPU Cluster Twin

•Large-scalereal-lifeemergencyevacuationdrillsareoftenimpracticalorimpossibleduetomanyfactors.

•Weenvisionatoolthathelpsplannersandsituationcommandersinteractivelycreateandverifylarge-scaleemergencyresponseplans.

•Itmustbescalable,accurateandsimulatesfasterthanreal-timetoenableinteractivity.Itmustalsobeabletosimultaneouslytestformultiplecriteriaandplanswiththeabilitytocomparetheireffectivenessandhighlightpotentialpitfalls.

•ThetoolusesanetworkofGPU-enabledcomputersforsimulation,andacentralhostthatmanagestheinformationflowbetweentheseprocesses.Anexternalclientcanconnecttothehostinordertodispatchscenariodataandobtainsimulateddataforanalysis.

High-Performance Pedestrian Multi-Simulation Using GPU ClusterTwin Karmakharm, Paul Richmond

Department of Automatic Control and Systems Engineering, University of Sheffield

[email protected], [email protected]

Pedestrian Simulation as aReal-Time Decision Support Tool

Built on the Agent-Based FLAME GPU Framework

The Model

Faster Than Real-Time

Simulation Batching

Distributed GPU Processing of Multiple Simulations

Results & Conclusion

•AgentBasedModelling(ABM)isapowerfulsimulationtechniquewhichisusedtoassessgroupbehaviourfromanumberofsimpleinteractingrulesbetweencommunicatingautonomousagents.

•SimulationcodeisgeneratedbasedontheFlexibleLarge-scaleAgentModellingEnvironmentontheGPU(FLAMEGPU).[5]

•XMLisusedformodelspecificationwithextendibleSchemasusedtoensurecorrectmodelsyntaxandaddGPUspecificinformation.Themodelspecification,alongwiththeC-basedfunctionscriptsaretransformedusingXSLTtemplatesintocompilablecode.[6,7]

•ComplexitiesofGPUprogrammingareentirelyabstractedfromthemodellingandsimulationprocess.

•Usesthesocialforceswithcontactforcemodelforsimulatinginteractionsbetweenpedestriansandtheirenvironment.[1,2]

•Pedestrianshaveaccesstoenvironmentcollisiondetectionandglobalnavigationthroughagridofnavigationagentsthatholdsasetofvectorforcefields.[3]

•Acollisionvectorforcefieldholdsinformationaboutstaticenvironments(e.g.walls)

•Navigationvectorforcefieldsrepresentthegoalsoftheagent.Itgivestheshortestpathtoasingleexit(usedfornormalwalkingmodels),multipledestinations(evacuations),oragatheringpoint.

•Industry-standardmetricsareusedtocollectdataforanalysissuchastheFruinLevelofService.[4]

•Thesimulationcanrunfasterthanreal-timewhenvisualisationisnotrequired.

•Largertime-stepscanbeusedinordertoincreasethesimulationrate,withsomeaccuracytrade-offs.

•Smallermodelsaregroupedtogetherintoasinglesimulation.Efficiencyisincreasedforlargersimulationsizesduetoreducedkernelcallsandensuringmaximumthreadutilization.

•ThegridofnavigationagentsarespatiallytranslatedtoitsglobalcoordinateaccordingtotheirsimulationID.

•AgentsareassignedIDsinordertopreventinterferenceinboundarycases.

•Amastercomputerhandlestheschedulinganddistributionofsimulations.

•Aninstanceofaslaveschedulerispresentoneachsimulationcomputerandisresponsibleforinitialisinginstancesofsimulatorprograms.

•AninstanceofasimulatoriscreatedforeachGPUcoreonthesystem.Thisavoidscomplicationsinprogramdesignasthereisnocross-communicationbetweenthesimulators.

•Simulatorsstoretheirsimulationresultslocallyandtransmitthemwhenrequested.

•Resultsarecollectedasperuser-specifiedsimulationtimeperiod.Performancecanbefurtherincreasedbyincreasingdatacollectionperiod.

•Simulationof160,000pedestriansat~20framespersecondwithoutvisualisationwhenrunning8simultaneoussimulationof2562gridsizeacross2NvidiaGTX590GPUs.

•Useslow-costhardwareandnetworkingcomponents.

•Futurework:Furtheroptimizationofthesimulationframework,incorporatingmorecomplexnavigationsystemandbringingthesoftwaretocommercialisation.

Simulation

Code

XSLT

Simulation

Templates

■■■

XSLT

Processor

■■■

Simulation Program

XML Schemas

XML Model File

Scripted

Behaviour

Simulator PC 1

Client PC 1

Simulator Manager

Node

ClientNode

Host PC

MasterScheduler

GPUSimulatorNode

GPUSimulatorNode

Navigation Agents

Col

lisio

n FV

FN

avig

atio

n FV

F 1

Nav

igat

ion

FVF

2

Navigation Agents Grid

x

y

Destination/ExitStatic Obstacle

Collision Force VectorNavigation Force Vector

Navigation Agents Pedestrian List

Global Navigation MapGlobal Pedestrian List

Simulation 1

Simulator

Navigation Agents Pedestrian List

Simulation 2

1 2 3

4 5

987

6

1 2 3

4 5

987

6

1 2 3

7 8

151413

9

4 5 6

10 11

181716

12

22 23 24

28 29

363534

30

19 20 21

25 26

333231

27

0.46 m2

0.93 m2

1.39 m2

2.32 m2

3.25 m2

3.72 m2

LOS F

LOS E

LOS D

LOS C

LOS B

LOS A

[1] D. Helbing. A mathematical model for the behavior of pedestrians. Behavioral Science, 36(4):298{310, Oct. 1991.[2] D. Helbing, I. Farkas, and T. Vicsek. Simulating dynamical features of escape panic. Nature, 407(6803):487{490, Sept. 2000.[3] T. Karmakharm, P. Richmond, and D. Romano. Agent-based Large Scale Simulation of Pedestrians With Adaptive Re-alistic Navigation Vector Fields. In Theory and Practice of Computer Graphics (TPCG) 2010, pages 67{74, 2010.[4] J. J. Fruin. Pedestrian planning and design. Metropolitan Association of Urban Designers and Environmental Plan-ners, 1971.

[5] FLAME GPU Website, http://www.flamegpu.com[6] P. Richmond and D. Romano. Agent Based GPU, a Real-time 3D Simulation and Interactive Visualisation Framework for Massive Agent Based Modelling on the GPU. The rst International Workshop on Super Visualization (IWSV08), 2008.1[7] P. Richmond and D. Romano. Template-Driven Agent-Based Modeling and Simulation with CUDA. In W.-m. W. Hwu, editor, GPU Computing Gems Emerald Edition, Applications of GPU Computing Series, chapter 21, pages 313-324. Mor-gan Kaufmann, 1st edition, Feb. 2011.

References

Work funded by BAE Systems

GPU Computing Gems Emeald Edition: Chapter 21 p.313-324