SYS // SUMOXYAFS

CoFog-SUMO

benchmarked•PROTOTYPE•2025•2025 to 2026

Closed-loop co-simulation platform coupling microscopic traffic mobility with discrete-event fog computing via TraCI.

Stack

SUMOYAFS / SimPyPythonTraCI

01 // THE CHALLENGE

The Open-Loop Evaluation Blindspot in Vehicular Fog

Who hurts:Autonomous Vehicle Systems Engineers & Edge Infrastructure Researchers

Most vehicular fog simulators operate in an open loop: they replay static GPS logs without letting compute congestion influence vehicle movement. When roadside units experience queue bottlenecks or handover delays, vehicles cannot adapt their speed or reroute to keep connectivity.

Core Bottlenecks

Static trace replay prevents computing congestion from influencing vehicle trajectory or speed
Legacy fog simulators enforce strict tree hierarchies, preventing lateral RSU-to-RSU backhauls and mesh topologies
Naive closed-loop braking commands propagate backward through traffic, inducing artificial stop-and-go shockwaves

02 // CAPABILITIES & WORKFLOW

Synchronized Closed-Loop Co-Simulation

CoFog-SUMO links SUMO's microscopic traffic simulation with YAFS's discrete-event SimPy engine over a step-locked TraCI bridge, translating computational load into physical speed moderation and route diversions.

Synchronized Closed-Loop Co-Simulation
Live Showcase

Synchronized Closed-Loop Co-Simulation

Real-time multi-panel dashboard displaying live vehicle positions, RSU queue depths, and TraCI actuation signals

0118.4ms / step

Step-Lock TraCI Bridge

Advances microscopic Krauss car-following time-steps in sync with discrete-event packet scheduling without clock drift.

02NetworkX

Lateral Mesh Fog Topology

Executes arbitrary NetworkX graph topologies with lateral RSU-to-RSU links rather than rigid tree hierarchies.

03EWMA Link

Adaptive Deadline & Actuation Governor

Weighs task workload and queue depths to trigger offloading, with a 5.0s actuation cooldown window preventing phantom traffic waves.

03 // THE HARD PROBLEM

Coupling Continuous Kinematics to Discrete Events Without Traffic Shockwaves

Synchronizing SimPy event queues with TraCI time-steps while eliminating phantom traffic jams

SUMO advances on fixed delta-time intervals (0.5s or 1.0s), whereas YAFS advances on irregular discrete event occurrences. Naive per-packet socket queries created tens of thousands of round-trips per step, ballooning runtimes from minutes to hours. Simultaneously, when the edge layer commanded vehicles to slow down to maintain V2I dwell time, abrupt deceleration propagated through following vehicles in the Krauss model, producing severe phantom traffic shockwaves along the corridor.

What Was Tried & Failed
  • ✕Individual per-packet TraCI polling caused severe socket serialization bottlenecks and blocked the SimPy event loop
  • ✕Unconstrained deceleration feedback triggered chain-reaction braking waves that gridlocked dense multi-lane intersections
What Worked & Shipped

Centralized state ingestion in MinimalFogSim.process_step, batching vehicle coordinates into an in-memory registry per TraCI tick before stepping the SimPy timeline. Added an individual vehicle cooldown window (T_cooldown = 5.0s) and hierarchical speed governor to absorb actuation transients and protect traffic flow stability.

04 // SYSTEM BLUEPRINT

Bidirectional Bridge & Closed-Loop Actuation Pipeline

Step-locked execution loop separating physical mobility ingestion from graph-based fog processing and feedback actuation.

System Architecture Blueprint

Execution Flow Sequence

1.SUMO TraCI Step (Δt=0.5s)
2.Ingest Batch Telemetry
3.Map to NetworkX Fog Graph
4.Adaptive Deadline Scheduling
5.SimPy Event Execution
6.TraCI Kinematic Actuation (Speed & Reroute)

SUMO Mobility Core

Mobility Engine

Microscopic car-following dynamics, signalized junctions, and vehicle kinematics along the Delhi corridor

Step-Locked TraCI Bridge

TCP Socket

Socket interface synchronizing SUMO steps with YAFS discrete-event compute execution

Adaptive Scheduler & Fog Engine

Decision Core

SimPy/NetworkX mesh graph evaluating EWMA backhaul latency and queue backpressure

05 // ARCHITECTURAL TRADEOFFS

Decisions & Cyber-Physical Compromises

Key design choices balancing co-simulation throughput, mathematical fidelity, and physical traffic stability.

Chose: Step-lock batching at 0.5s/1.0s simulation intervalsoverContinuous sub-millisecond event-driven TraCI polling

Rationale: Vehicular kinematic positions change negligibly within 500ms, while sub-millisecond TraCI socket polling created massive IPC overhead that caused simulator stalls.

Resulting Impact: Achieved 18.4ms per-step wall-clock latency, allowing co-simulation execution 27x to 54x faster than real time.

Chose: Deadline-aware sticky execution at the origin RSUoverImmediate state migration on every RSU boundary crossing

Rationale: Migrating active task state across backhaul links introduces state transfer latency. If the origin RSU can complete computation within the remaining deadline slack, keeping the task avoids network congestion.

Resulting Impact: Eliminated unnecessary state transfers and prevented ping-pong migration loops along cell edges.

Chose: Individual vehicle actuation cooldown window (T_cooldown = 5.0s)overUnconstrained per-step deceleration commands

Rationale: Immediate consecutive speed reductions cause trailing vehicles in the Krauss car-following model to brake abruptly, inducing artificial traffic jams.

Resulting Impact: Maintained corridor traffic flow stability while achieving a 34% reduction in deadline misses.

06 // BENCHMARKS

Empirical Delhi Corridor Outcomes

Profiled across a 9-RSU arterial corridor over 500 simulation steps under varying vehicular traffic densities.

Sync Overhead

18.4ms

±3.2ms per step execution

Fairness Index

J = 0.84

Jain's index vs greedy baseline

Deadline Miss Cut

34%

via kinematic dwell time extension

Step execution latency (ms)

Continuous Benchmarking

* All metrics benchmarked on the Delhi arterial OSM corridor using 9 RSUs with capacity C_r = 20 tasks/unit.

07 // PROOF & ARTIFACTS

Verified Code, Scenarios & Conference Research

Open-source co-simulation harness, OpenStreetMap network scenarios, and IEEE conference paper repository.

GitHub Repository (Confidential / Private)