road network simulation using flame gpu
play

Road Network Simulation using FLAME GPU . Peter Heywood, Dr Paul - PowerPoint PPT Presentation

. Road Network Simulation using FLAME GPU . Peter Heywood, Dr Paul Richmond & Dr Steve Maddock Department of Computer Science, The University of Sheffield . Overview . Introduction Gipps Car Following Model Implementation


  1. . Road Network Simulation using FLAME GPU . Peter Heywood, Dr Paul Richmond & Dr Steve Maddock Department of Computer Science, The University of Sheffield

  2. . Overview . Introduction Gipps’ Car Following Model Implementation Experiments & Results Conclusions & Future 4ork

  3. . Introduction .

  4. . Road Network Simulation . Need for improved road simulation systems [�, �] • Increasing number of vehicles globally • Poor utilisation of existing infrastructure • Relatively cheap • Decision making An example of traffic microsimulation (SUMO)

  5. . Why Agent Based Simulation on the GPU . Why ABS / Microsimulation? • More natural method of description • Allow emergence of more complex behaviour • Good for modelling congested networks Why GPGPU? • Not embarrassingly parallel but it is well suited for GPGPU computing • Aspects are SIMD ( Same Instruction Many Data ) in nature • Has been demonstrated as GPGPU suitable [�, �] • Speed-up allows for increased complexity / scale

  6. . Aims . • Demonstrate performance of road network simulation using FLAME GPU • Evaluate performance scalability using an artificial road network. • Scale population size • Scale population and environment • Demonstrate interactive visualisation using instancing

  7. . Gipps’ Car Following Model .

  8. . Car Following . • Key vehicle behaviour • Drive at desired speed without colliding into other vehicles • Considering factors such as reaction time , vehicle limitations , neighbouring vehicles ... • Many car following models exist • Safety-distance models • Psycho-physical models

  9. . Gipps’ Car Following Model . Gipps’ Car Following Model defined in ���� by Peter Gipps • Safety Distance Model • Considers driver & vehicle characteristics • Only considers the preceding vehicle • One of the most commonly used models

  10. . Aims - Gipps’ Car Following Model . “The model should mimic the behaviour of real traffic” [�] “parameters which correspond to obvious characteristics of drivers and vehicles” [�] “should be well behaved when the interval between successive recalculations of speed and position is the same as the reaction time” [�]

  11. . Notation - Gipps’ Car Following Model . a n the maximum acceleration of vehicle n b n the most severe braking that the vehicle n will undertake s n the effective size of vehicle n , including a margin V n the target speed of vehicle n x n ( t ) the location of the front of vehicle n at time t v n ( t ) the speed of vehicle n at time t constant reaction time for all vehicles τ ˆ b estimate of leading vehicles most severe braking Notation for variables used by Gipps’ car following model

  12. . Equations - Gipps’ Car Following Model . Free-flow Conditions � v n ( t + τ ) < = v n ( t ) + � . � a n τ ( � − v n ( t ) / V n )( � . ��� + v n ( t ) / V n ) � Free-flow component of Gipps’ Car Following Model 25 Free-flow Component ( V n = 15 , v n (0) = 0 ) 20 15 v n ( t + τ ) 10 5 0 0 5 10 15 20 25 t

  13. . Equations - Gipps’ Car Following Model . Congested Conditions (Braking) √ � τ � − b n ( � [ x n − � ( t ) − s n − � − x n ( t )] − v n ( t ) τ − v n − � ( t ) � / ˆ v n ( t + τ ) < = b n τ + b n b ) Free-flow and Braking components of Gipps’ Car Following Model 25 Free-flow Component ( V n = 15 , v n (0) = 0 ) Braking Component ( V n − 1 = 10 , x n − 1 ( t ) = 50 ) 20 15 v n ( t + τ ) 10 5 0 0 5 10 15 20 25 t

  14. . Limitations - Gipps’ Car Following Model . • Time-step should be set to reaction time τ • Assumes drivers: • Drive in a safe manner • Can make accurate observations

  15. . Implementation .

  16. . Artificial Road Network . • Scales consistently unlike real world networks • Single lane uniform grid • Grid made of N rows and columns • � sections of road between each adjacent junction • N � junctions and � N ( N − � ) one-way roads N = 2 N = 3 N = 4 N = 5 N = 6

  17. . FLAME GPU . FLAME GPU is a “template based simulation environment” for agent based simulation on Graphics Processing Unit (GPU) architecture [�] • Agents are represented as 9-Machines • Agents can communicate via globally accessible message lists • Messages are crucial for interaction • Message lists can be partitioned to “ensure the most optimal cycling of messages” [�]

  18. . FLAME GPU Messaging . There are currently � defined message partitioning schemes • Non-partitioned messaging • All to All • Discrete partitioned messages • �D non-mobile agents only (i.e. Cellular Automata) • Spatially partitioned messages • Continuous space • Requires radius and environment bounds Aims to reduce the size of message lists

  19. . Implementing Gipps’ Car Following Model using FLAME GPU . script • Each vehicle represented by an agent • Initial values generated with python script and stored FLAME GPU in a FLAME GPU XML file XML File • Road network stored in CUDA constant memory • Does not change • Agents interact with same network FLAME GPU • CUDA Read-Only Data Cache could allow larger road networks (> ��kB of memory) CUDA memory

  20. . Implementing Gipps’ Car Following Model using FLAME GPU . For each step in the simulation • Agents output their observable properties ( outputdata ) • Agents iterate through their message lists for the lead vehicle ( inputdata ) • Gipps’ car following model is applied using the lead vehicle information • Forward Euler used to calculate location and velocity • New roads randomly assigned at junctions

  21. . Experiments & Results .

  22. . Experiments, Model Parameters, Hardware . Experiments Grid Size Agent Count Road Length Fixed Grid N = �� ��� to ������ ����� m Scaled Grid N = � to N = �� ��� to ������ ���� m (�� vehicles per ���� m ) Model Parameters proposed by Gipps Hardware/Software sampled from the normal distribution N ( � . � , � . � � ) m / sec � a n • FLAME GPU �.� for CUDA �.� b n − � . � a n • Intel Core i� ����K sampled from the normal distribution N ( � . � , � . � � ) m s n • N3IDIA Tesla K��c sampled from the normal distribution N ( �� . � , � . � � ) m / sec V n � / � seconds τ b ˆ the minimum of − � . � and ( b n − � . � ) / � m / sec �

  23. . Fixed Grid Network . 10 4 Non Partitioned Messaging Spatially Partitioned (radius = 5000m) Spatially Partitioned (radius = 2500m) Simulation time (ms) per iteration 10 3 Spatially Partitioned (radius = 250m) 10 2 • Spatially partitioned messaging outperforms non-partitioned 10 1 messaging • Smaller radii outperforms larger radii beyond overhead 10 0 • Distinct gradient change at � �� agents 10 − 1 2 8 2 9 2 10 2 11 2 12 2 13 2 14 2 15 2 16 2 17 2 18 Number of Agents

  24. . Fixed Grid Network - Per Agent . 10 − 1 Non Partitioned Simulation time (ms) per agent per iteration Spatially Partitioned (radius = 5000m) • Distinct gradient change at � �� agents - Spatially Partitioned (radius = 2500m) Spatially Partitioned (radius = 250m) hardware utilisation vs larger 10 − 2 message lists • Non-partitioned outperformed by partitioned messaging 10 − 3 • r = ��� scales much better per agent • Maximum message count Non-partitioned ������ 10 − 4 Partitioned r = ���� ����� Partitioned r = ���� ���� Partitioned r = ��� ��� 10 − 5 2 8 2 9 2 10 2 11 2 12 2 13 2 14 2 15 2 16 2 17 2 18 Number of Agents

  25. . Fixed Grid Network - Kernel Profiling . Average Kernel Execution Times 800 inputdata outputdata 700 reorder location messages • Kernel times averaged over �� hist location messages 600 iterations Average Kernel Time (ms) • Some Kernels omitted 500 • ����� Agents 400 • Spatial Partitioned messaging 300 with r = ��� • inputdata kernel is dominant 200 100 0 Partitioned Messaging r = 250

  26. . Fixed Grid Network - Kernel Profiling . Average inputdata Kernel Execution Time Average outputdata Kernel Execution Time Average reorder location messages Kernel Execution Time 120000 50 50 inputdata outputdata reorder location messages 100000 40 40 Average Kernel Time (ms) Average Kernel Time (ms) Average Kernel Time (ms) 80000 30 30 60000 20 20 40000 10 10 20000 0 0 0 Non-partitioned Partitioned r = 5000 Partitioned r = 2500 Partitioned r = 250 Non-partitioned Partitioned r = 5000 Partitioned r = 2500 Partitioned r = 250 Non-partitioned Partitioned r = 5000 Partitioned r = 2500 Partitioned r = 250 Message Partitioning Scheme Message Partitioning Scheme Message Partitioning Scheme

Recommend


More recommend