Table of Contents
Fetching ...

A simulation of urban incidents involving pedestrians and vehicles based on Weighted A*

Edgar Gonzalez Fernandez

TL;DR

This work introduces a multiagent urban simulation that models pedestrians and vehicles on a 2D grid using a risk-aware Weighted A* pathfinding approach to study safety and mobility under varying infrastructure and behavioral conditions. Agents operate with a four-phase loop and optimize routes via the cost function $f(n) = g(v) + w h(v) + α r(a,v)$, where $h(v)$ is the Manhattan distance and $α$ encodes risk weights. The framework supports configurable populations, obstacle placement, and scenario variation, with heatmaps and metrics (e.g., jaywalking, runovers, and average speed) to analyze outcomes. Findings show that vehicle density is a primary driver of collisions, sidewalk obstructions redirect pedestrians and influence congestion, and path-weight settings shape risk-taking, offering actionable guidance for urban planning and safety interventions. The implementation in Python with AgentPy provides a flexible, data-driven platform that can be extended to real-time data integration, adaptive behaviors, and comparative planner evaluations.

Abstract

This document presents a comprehensive simulation framework designed to model urban incidents involving pedestrians and vehicles. Using a multiagent systems approach, two types of agents (pedestrians and vehicles) are introduced within a 2D grid based urban environment. The environment encodes streets, sidewalks, buildings, zebra crossings, and obstacles such as potholes and infrastructure elements. Each agent employs a weighted A* algorithm for pathfinding, allowing for variation in decision making behavior such as reckless movement or strict rule-following. The model aims to simulate interactions, assess risk of collisions, and evaluate efficiency under varying environmental and behavioral conditions. Experimental results explore how factors like obstacle density, presence of traffic control mechanisms, and behavioral deviations affect safety and travel efficiency.

A simulation of urban incidents involving pedestrians and vehicles based on Weighted A*

TL;DR

This work introduces a multiagent urban simulation that models pedestrians and vehicles on a 2D grid using a risk-aware Weighted A* pathfinding approach to study safety and mobility under varying infrastructure and behavioral conditions. Agents operate with a four-phase loop and optimize routes via the cost function , where is the Manhattan distance and encodes risk weights. The framework supports configurable populations, obstacle placement, and scenario variation, with heatmaps and metrics (e.g., jaywalking, runovers, and average speed) to analyze outcomes. Findings show that vehicle density is a primary driver of collisions, sidewalk obstructions redirect pedestrians and influence congestion, and path-weight settings shape risk-taking, offering actionable guidance for urban planning and safety interventions. The implementation in Python with AgentPy provides a flexible, data-driven platform that can be extended to real-time data integration, adaptive behaviors, and comparative planner evaluations.

Abstract

This document presents a comprehensive simulation framework designed to model urban incidents involving pedestrians and vehicles. Using a multiagent systems approach, two types of agents (pedestrians and vehicles) are introduced within a 2D grid based urban environment. The environment encodes streets, sidewalks, buildings, zebra crossings, and obstacles such as potholes and infrastructure elements. Each agent employs a weighted A* algorithm for pathfinding, allowing for variation in decision making behavior such as reckless movement or strict rule-following. The model aims to simulate interactions, assess risk of collisions, and evaluate efficiency under varying environmental and behavioral conditions. Experimental results explore how factors like obstacle density, presence of traffic control mechanisms, and behavioral deviations affect safety and travel efficiency.
Paper Structure (16 sections, 4 equations, 10 figures, 5 tables, 1 algorithm)

This paper contains 16 sections, 4 equations, 10 figures, 5 tables, 1 algorithm.

Figures (10)

  • Figure 1: Examples of pedestrian obstacles: (a) a local market, (b) public infrastructure. These elements force pedestrians to walk on the street. Source: Google Maps (maps.google.com).
  • Figure 2: Image shows codification of a basic environment. Some arrows have been added to observe directions and cells that enforce turns for driver agents.
  • Figure 3: Routes obtained using Weighted A$^*$ with different weights for identical start and goal positions. Start and goal cells are highlighted in red and green, respectively. (a) Pedestrian routes showing instances of jaywalking for $w = 5$. (b) Driver routes illustrating reckless behavior, including opposite-direction travel, for $w = 10$.
  • Figure 4: General flowchart of agent implementation. Agents are deactivated immediately upon reaching their goal, or with a delay in the event of a collision. For vehicles, parking results in an inactive state at the same position until a new goal is assigned.
  • Figure 5: Sequence of frames showing the reactions of different agents. The green pedestrian walks through a zebra crossing and continues along the path without modifying its actions, while the blue vehicles react by reducing their speed (white number) to avoid a collision or a potential runover. Small dots indicate the next position of the agent according to current attributes (speed and direction).
  • ...and 5 more figures