Catching the Grid Federate That Only Fails at Peak Charging

A traffic and grid co-simulation that survives a federate crash at night tells you nothing about the morning peak. When the charging infrastructure has spare capacity, a lagging grid model is invisible. The fault only shows up when the electric robotaxi fleet pushes the chargers close to saturation. The qualification plan has to create that condition on purpose and inject the fault at that moment, because no other test conditions will reveal it.

Why light load hides the fault

In a typical coupling, the fleet dispatcher inside the mobility engine reads charger availability from the distribution grid federate at a fixed exchange interval of 1 s of simulated time. MATSim's demand responsive transport module and SUMO's time-stepped vehicles both make dispatch decisions on that snapshot. If the grid federate falls behind and the master algorithm lets the traffic side keep moving on the last known values, nothing visibly breaks at low occupancy, because spare chargers absorb the error. Near saturation the picture changes: the feeder model is derating chargers for transformer thermal limits or voltage sag, the stale snapshot still says they are available, and the dispatcher keeps sending vehicles into queues that the real grid state would never have allowed. Those queued vehicles drop out of the rebalancing pool, unserved trip requests rise, and the shortage feeds on itself as more vehicles reach low charge while they wait. In our experience the divergence becomes measurable once charger occupancy passes roughly 80 percent, an estimate that depends heavily on feeder topology.

The test that exposes it

Run the scenario twice with the same random seed, once clean and once with the fault, so that the difference between the runs reflects the fault and not stochastic noise in demand generation or route choice. Build the demand profile so the fleet ramps up into charger saturation, and trigger the fault when occupancy peaks, never at a convenient time early in the run. The first fault is a stall: the grid process stays alive and keeps its connection open, but it stops advancing simulated time. The second is a hard kill in the middle of a step. On the dispatcher side, measure the age of the grid state behind every charging assignment, the charger queue length per feeder, and the unserved requests, then compare each against the paired baseline. The age of the grid state is the measurement that matters most, because final fleet KPIs can land close to baseline for the wrong reasons and hide the fact that the dispatcher spent ten simulated minutes acting on fiction.

Decision rule

Treat any run where the dispatcher made charging assignments on grid state older than two exchange intervals, without switching to its conservative charger capacity model, as a failed qualification, however close the final fleet metrics come to baseline.

What the master algorithm has to prove

Co-simulation interface standards such as FMI and DCP define how participants exchange data and advance steps. They do not define what happens when one of them goes silent, so that behaviour belongs to your orchestration layer and needs its own test. In the kill scenario, the master has to detect the loss within its configured timeout, replace the grid federate with a surrogate (a reduced-order feeder model or a decaying last-known capacity), and tag every output produced after that point as degraded, so that planners using the results never mistake partly modelled peak behaviour for a nominal run. The trade-off remains open: a blocking master keeps results correct but turns one stuck process into a stalled multi-hour batch, while a surrogate keeps the run going at the cost of fidelity in exactly the window you most care about. Which way you go depends on whether the campaign feeds grid reinforcement decisions, where a degraded peak is worthless, or fleet sizing studies, where a flagged approximation is still usable.

Why inject a stall instead of just killing the grid process?

A killed process closes its socket and trips any watchdog, so most orchestrators handle it already. A stalled process keeps its connection and heartbeat alive while its simulated clock stops advancing, which naive liveness checks miss. That makes the stall the fault that actually lets a dispatcher act on stale grid state.

Back to MobilitySimulator · Domains

← Back to MobilitySimulator
Engineering & Architecture Brief

Catching the Grid Federate That Only Fails at Peak Charging

A traffic and grid co-simulation that survives a federate crash at night tells you nothing about the morning peak. When the charging infrastructure has spare capacity, a lagging grid model is invisible. The fault only shows up when the electric robotaxi fleet pushes the chargers close to saturation. The qualification plan has to create that condition on purpose and inject the fault at that moment, because no other test conditions will reveal it.

Why light load hides the fault

In a typical coupling, the fleet dispatcher inside the mobility engine reads charger availability from the distribution grid federate at a fixed exchange interval of 1 s of simulated time. MATSim's demand responsive transport module and SUMO's time-stepped vehicles both make dispatch decisions on that snapshot. If the grid federate falls behind and the master algorithm lets the traffic side keep moving on the last known values, nothing visibly breaks at low occupancy, because spare chargers absorb the error. Near saturation the picture changes: the feeder model is derating chargers for transformer thermal limits or voltage sag, the stale snapshot still says they are available, and the dispatcher keeps sending vehicles into queues that the real grid state would never have allowed. Those queued vehicles drop out of the rebalancing pool, unserved trip requests rise, and the shortage feeds on itself as more vehicles reach low charge while they wait. In our experience the divergence becomes measurable once charger occupancy passes roughly 80 percent, an estimate that depends heavily on feeder topology.

The test that exposes it

Run the scenario twice with the same random seed, once clean and once with the fault, so that the difference between the runs reflects the fault and not stochastic noise in demand generation or route choice. Build the demand profile so the fleet ramps up into charger saturation, and trigger the fault when occupancy peaks, never at a convenient time early in the run. The first fault is a stall: the grid process stays alive and keeps its connection open, but it stops advancing simulated time. The second is a hard kill in the middle of a step. On the dispatcher side, measure the age of the grid state behind every charging assignment, the charger queue length per feeder, and the unserved requests, then compare each against the paired baseline. The age of the grid state is the measurement that matters most, because final fleet KPIs can land close to baseline for the wrong reasons and hide the fact that the dispatcher spent ten simulated minutes acting on fiction.

Decision rule

Treat any run where the dispatcher made charging assignments on grid state older than two exchange intervals, without switching to its conservative charger capacity model, as a failed qualification, however close the final fleet metrics come to baseline.

What the master algorithm has to prove

Co-simulation interface standards such as FMI and DCP define how participants exchange data and advance steps. They do not define what happens when one of them goes silent, so that behaviour belongs to your orchestration layer and needs its own test. In the kill scenario, the master has to detect the loss within its configured timeout, replace the grid federate with a surrogate (a reduced-order feeder model or a decaying last-known capacity), and tag every output produced after that point as degraded, so that planners using the results never mistake partly modelled peak behaviour for a nominal run. The trade-off remains open: a blocking master keeps results correct but turns one stuck process into a stalled multi-hour batch, while a surrogate keeps the run going at the cost of fidelity in exactly the window you most care about. Which way you go depends on whether the campaign feeds grid reinforcement decisions, where a degraded peak is worthless, or fleet sizing studies, where a flagged approximation is still usable.

Technical FAQ: Why inject a stall instead of just killing the grid process?

A killed process closes its socket and trips any watchdog, so most orchestrators handle it already. A stalled process keeps its connection and heartbeat alive while its simulated clock stops advancing, which naive liveness checks miss. That makes the stall the fault that actually lets a dispatcher act on stale grid state.

Related Architecture Specifications (AUTOMOTIVESDV): vehicleedge.com · vehiclestrust.com · automotiveota.com

More Technical Articles on mobilitysimulator.com

Coupling Multi-Agent Traffic (MATSim) with Electrical Grid (OpenDSS) Simulators →Bipartite Graph Matching and Fleet Rebalancing for Autonomous Robotaxis →Catching Synchronization Stalls Under Peak Load in Mobility and EV Grid Co-Simulation →