
Can One Infrastructure Failure Affect an Entire City? | Part 5
What happens when one infrastructure failure affects connected city systems? Explore graph-based impact analysis, scenario simulation, AI agents, and AWS to investigate potential cascading urban disruptions.
Series: THE CITY THAT CAN FEEL: Building an Artificial Nervous System for Smart Cities Using AWS (7 articles)
- …
- 5Can One Infrastructure Failure Affect an Entire City? | Part 5 This article
THE CITY THAT CAN FEEL | PART 05/07
Can One Infrastructure Failure Affect an Entire City? Building an AI-Powered Urban Impact Analysis System on AWS
1. Introduction: What happens when one problem creates many others?
Imagine a major drainage network in a city becomes overloaded after heavy rainfall.
Initially, the problem appears limited to one location. But the consequences could extend further:
- Water may accumulate near a road.
- Traffic movement may be disrupted.
- Nearby public facilities may experience accessibility problems.
- Emergency vehicles may need alternative routes.
- Maintenance teams may need to coordinate across departments.
One infrastructure problem can create several operational challenges.
But how can city authorities understand these possible consequences before they become more serious?
Traditional monitoring systems generally focus on individual assets. A sensor reports a measurement, a dashboard displays an alert, and an operator investigates.
What if we could go one step further?
Imagine an intelligent platform that combines sensor readings, infrastructure relationships, historical incidents, geographic information, and scenario simulations to investigate possible consequences.
This is the next stage of our artificial nervous system for smart cities.
In Part 1, we introduced the idea of an interconnected urban intelligence platform.
In Part 2, we explored how sensors communicate with AWS.
In Part 3, we examined machine learning-based anomaly detection.
In Part 4, we built the conceptual foundation of a smart city knowledge graph.
Now, in Part 5, we bring these capabilities together to explore urban impact analysis and scenario simulation.
The goal is not to predict every event with certainty. It is to help city operators understand possible consequences, examine alternative scenarios, and make better-informed decisions.
Architecture disclosure: This is a proposed reference architecture and educational implementation approach. It is not a deployed city-wide simulation system. All scenarios, entities, and example outputs are hypothetical.
2. Understanding cascading infrastructure disruptions
What is a cascading infrastructure disruption?
It occurs when an initial incident affects connected systems, potentially creating additional problems.
Consider a hypothetical example:
Initial event: A drainage network becomes overloaded.
Possible secondary effects:
- Water accumulates on a nearby road.
- Traffic movement slows.
- An alternative route receives additional traffic.
- Access to a nearby public facility may become more difficult.
- Maintenance and emergency teams may need to coordinate their response.
Notice that the initial problem is not necessarily the only problem that matters.
Understanding the possible connections is equally important.
Other examples include:
A. Power infrastructure disruption
An electrical distribution failure could affect connected traffic signals, streetlights, water pumps, or other dependent facilities.
The actual impact depends on the electrical topology, backup systems, and operational configuration.
B. Water network disruption
A pipeline failure could affect connected distribution zones, service availability, and nearby infrastructure.
C. Road network disruption
A major road closure could affect traffic routes, public transport, emergency vehicle access, and nearby commercial activity.
D. Communication network disruption
A network outage could affect connected monitoring devices and the availability of information needed by operational teams.
These examples show why understanding infrastructure dependencies is important.
However, a relationship between two assets does not automatically establish a causal effect. We need engineering models, verified network information, and scenario-specific assumptions.
3. From anomaly detection to impact analysis
In Part 3, we introduced anomaly detection.
Suppose a machine learning model identifies an unusual water-level measurement.
That tells us something may be happening.
In Part 4, we introduced a knowledge graph.
That helps us understand which assets and locations are connected.
Now we can combine both capabilities.
Consider this sequence:
Unusual Sensor Reading | v Anomaly Detection | vIdentify Affected Asset | vExplore Infrastructure Graph | vGenerate Possible Scenarios | vEstimate Potential Impact | v Human ReviewThis is the conceptual transition from detecting a problem to investigating its possible consequences.
We can call this graph-based urban impact analysis.
4. What is scenario simulation?
Scenario simulation is the process of exploring what could happen under a set of defined conditions.
Instead of asking only:
"What is happening now?"
We can ask:
"What could happen if this condition continues?"
For example:
Scenario A: A drainage network receives normal water inflow.
Scenario B: Water inflow increases by 20%.
Scenario C: Water inflow increases by 40%.
Scenario D: A drainage segment becomes unavailable.
A simulation model can estimate how these assumptions might affect the system.
Possible outputs include:
- Assets potentially affected
- Estimated water accumulation
- Potential road accessibility changes
- Alternative route availability
- Infrastructure service disruption
- Resources that may need inspection
The quality of these results depends on the model.
A graph alone cannot simulate fluid flow, traffic dynamics, or electrical load. Those require domain-specific simulation models or validated analytical methods.
The knowledge graph provides connectivity and context; engineering models estimate physical behavior.
5. Proposed AWS architecture
Let's design a proposed architecture that combines our previous episodes.
Layer 1: Urban data collection
The platform receives information from:
- Water-level sensors
- Traffic monitoring devices
- Environmental sensors
- Weather data sources
- Infrastructure asset records
- Historical incident databases
AWS services:
- AWS IoT Core
- Amazon Kinesis Data Streams
- Amazon S3
- AWS Lambda
These services support the data collection and processing pipeline introduced in Part 2.
Layer 2: Anomaly detection
Incoming measurements are analyzed to identify unusual patterns.
For example, an anomaly detection model may identify an unexpected increase in water level.
Proposed AWS service: Amazon SageMaker AI
The model generates a score or classification that can be passed to the next stage.
The model output is an investigation signal, not proof that an emergency has occurred.
Layer 3: Infrastructure relationship analysis
The system identifies the affected asset and explores its connected infrastructure.
For example:
Water-Level Sensor | MONITORS |Drainage Network | SERVES | Urban Zone | CONTAINS | Road NetworkProposed AWS service: Amazon Neptune Database
Neptune stores and queries the infrastructure knowledge graph.
The application can retrieve connected assets, relationships, and relevant graph paths.
Layer 4: Graph-based impact analysis
Once the relevant graph neighborhood is identified, graph algorithms can help analyze connectivity and network structure.
Proposed AWS service: Amazon Neptune Analytics
Potential analyses include:
- Finding paths between infrastructure assets.
- Identifying highly connected nodes.
- Discovering connected components.
- Identifying infrastructure clusters.
- Exploring alternative paths.
These results can help prioritize further investigation.
For example, a road network node with high centrality may be structurally important in the modeled road graph.
However, centrality is not the same as real-world criticality. Criticality also depends on traffic volume, redundancy, emergency access, population served, and engineering constraints.
Layer 5: Scenario simulation
This layer evaluates possible outcomes under specified assumptions.
Possible models include:
- Hydraulic simulation for water and drainage systems.
- Traffic simulation for road networks.
- Power-flow simulation for electrical networks.
- Network availability simulation for communication systems.
The appropriate simulator depends on the infrastructure being studied.
AWS services can provide the data, compute, storage, and orchestration around these models, but they do not automatically provide a complete hydraulic or traffic simulation model.
Proposed AWS components:
- AWS Lambda for lightweight orchestration.
- AWS Step Functions for coordinating multi-stage simulation workflows.
- Amazon S3 for simulation inputs and outputs.
- Amazon SageMaker AI for suitable predictive models.
For computationally intensive simulations, evaluate an appropriate container or batch-compute environment rather than forcing the entire workload into Lambda.
Layer 6: AI-assisted investigation
Now imagine an operator asks:
"What could be affected if the drainage network in Zone A becomes unavailable?"
An AI application could coordinate a structured investigation:
- Retrieve the relevant drainage asset.
- Explore its verified graph relationships.
- Retrieve relevant sensor readings.
- Request a scenario model to evaluate the assumed failure.
- Compare the model outputs.
- Summarize the findings and uncertainties.
- Present the results for human review.
Proposed AWS technologies:
- Amazon Bedrock for generative AI.
- Strands Agents SDK for building code-defined agent workflows.
- Amazon Bedrock AgentCore for supporting the deployment and operation of agentic applications.
- AWS Step Functions for deterministic workflow orchestration.
The AI should not invent simulation results or claim that an infrastructure failure will occur. It should report the outputs returned by the underlying models and clearly distinguish evidence from assumptions.
Flowchart of Proposed Architecture on AWS

6. Multi-agent architecture: Different AI agents, different responsibilities
A complex infrastructure investigation can be divided into specialized tasks.
Instead of asking one AI agent to do everything, we can design a coordinated workflow.
Consider five proposed agents.
Agent 1: Incident Analysis Agent
Responsibilities:
- Understand the incoming alert.
- Identify the affected asset.
- Retrieve the latest sensor readings.
- Classify the investigation type.
Agent 2: Infrastructure Graph Agent
Responsibilities:
- Query Amazon Neptune.
- Explore connected assets.
- Identify relevant relationships.
- Retrieve infrastructure dependencies.
Agent 3: Scenario Analysis Agent
Responsibilities:
- Select an approved simulation model.
- Prepare scenario parameters.
- Run the simulation workflow.
- Retrieve model outputs.
This agent coordinates a simulation tool; it does not replace the hydraulic, traffic, or electrical engineering model.
Agent 4: Risk Assessment Agent
Responsibilities:
- Compare simulation outcomes.
- Examine potential service disruptions.
- Apply approved risk criteria.
- Identify uncertainties and missing information.
Agent 5: Reporting Agent
Responsibilities:
- Combine verified evidence.
- Prepare an investigation summary.
- Include affected assets and supporting data.
- Present recommendations for human review.
A coordinator can manage the workflow and ensure that each specialist receives a clearly defined task.
This approach helps separate responsibilities and makes it easier to test individual components.
Why use Strands Agents?
The Strands Agents SDK is an option for building code-defined agents that use tools and collaborate through application logic.
Amazon Bedrock AgentCore can be evaluated for the runtime and operational requirements of agentic applications.
An important AWS product distinction: Amazon Bedrock Agents Classic is no longer open to new customers. For a new implementation, evaluate the current Strands Agents and AgentCore approach rather than designing around a new Agents Classic deployment.
7. Practical implementation: Simulating infrastructure impact using Python
Let's build a small local experiment.
We will represent a hypothetical drainage and road network using NetworkX.
Then we will simulate how an incident at one asset could lead us to investigate connected infrastructure.
This is a graph connectivity experiment, not a physical flood simulation.
Step 1: Install NetworkX
pip install networkx matplotlibStep 2: Create the infrastructure graph
import networkx as nx
city = nx.DiGraph()
# Infrastructure assetsassets = [ "WATER_SENSOR_001", "DRAINAGE_001", "DRAINAGE_002", "ROAD_001", "ROAD_002", "HOSPITAL_001", "ZONE_A", "MAINTENANCE_TEAM"]
city.add_nodes_from(assets)
# Verified or assumed relationships for this examplerelationships = [ ("WATER_SENSOR_001", "DRAINAGE_001"), ("DRAINAGE_001", "DRAINAGE_002"), ("DRAINAGE_002", "ZONE_A"), ("ROAD_001", "ZONE_A"), ("ROAD_002", "ZONE_A"), ("HOSPITAL_001", "ZONE_A"), ("MAINTENANCE_TEAM", "DRAINAGE_001")]
city.add_edges_from(relationships)
print("Nodes:", city.number_of_nodes())print("Edges:", city.number_of_edges())These connections are illustrative. A real infrastructure graph must use verified topology and explicit relationship semantics.
Step 3: Identify the connected infrastructure
Suppose an alert identifies DRAINAGE_001 as the asset requiring investigation.
incident_asset = "DRAINAGE_001"
connected_assets = nx.descendants( city, incident_asset)
print("Potentially connected assets:")
for asset in sorted(connected_assets): print(asset)This returns nodes reachable by following the directed edges.
It does not establish that all returned assets will be physically affected.
Step 4: Explore alternative paths
Suppose we want to inspect the graph paths from the water sensor to the urban zone.
paths = list( nx.all_simple_paths( city, source="WATER_SENSOR_001", target="ZONE_A" ))
for path in paths: print(" -> ".join(path))This demonstrates how graph traversal can expose modeled relationships.
Step 5: Visualize the infrastructure graph
import matplotlib.pyplot as plt
pos = nx.spring_layout( city, seed=42)
nx.draw( city, pos, with_labels=True, node_size=2200, font_size=7, arrows=True)
plt.title( "Illustrative Urban Infrastructure Dependency Graph")
plt.show()The graph provides a visual way to understand how infrastructure entities are connected.
For a larger network, graph layout and filtering strategies become important.
8. A simple scenario comparison experiment
We can also illustrate how different hypothetical assumptions affect a model output.
For example, suppose we want to compare three assumed drainage inflow conditions.
scenarios = { "Normal": 100, "Elevated": 120, "Severe": 140}
drainage_capacity = 110
for name, inflow in scenarios.items():
excess = max( 0, inflow - drainage_capacity )
print( name, "| Inflow:", inflow, "| Capacity:", drainage_capacity, "| Excess:", excess )Illustrative output:
Normal | Inflow: 100 | Capacity: 110 | Excess: 0Elevated | Inflow: 120 | Capacity: 110 | Excess: 10Severe | Inflow: 140 | Capacity: 110 | Excess: 30This simple example demonstrates a capacity constraint.
It is not a hydraulic model. It does not estimate flood depth, water velocity, drainage behavior, or downstream flooding.
A real drainage simulation would require physical parameters such as pipe geometry, slope, roughness, network connectivity, rainfall distribution, boundary conditions, and validated hydraulic equations.
The purpose of this example is to show how a scenario engine can compare assumptions and produce structured outputs for further analysis.
9. How to integrate simulation with AWS
A proposed implementation workflow could look like this:
Step 1: Store infrastructure topology and asset metadata in Amazon Neptune.
Step 2: Receive an anomaly event from the Part 3 detection pipeline.
Step 3: Use a graph query to identify relevant connected assets.
Step 4: Retrieve the required sensor readings and scenario inputs from Amazon S3 or the relevant data services.
Step 5: Start an approved simulation workflow using AWS Step Functions.
Step 6: Run the appropriate simulation using a suitable compute environment.
Step 7: Store simulation outputs in Amazon S3.
Step 8: Use Amazon Bedrock and a code-defined agent workflow to summarize the verified results.
Step 9: Present the findings to authorized operators.
The workflow should preserve the input assumptions, model version, execution timestamp, output records, and evidence used in the investigation.
That makes it possible to reproduce and audit a scenario later.
10. Building a digital twin for urban scenario analysis
A digital twin can provide a visual representation of infrastructure and its changing state.
AWS IoT TwinMaker is one service to evaluate for building operational digital twins.
A digital twin application could combine:
- Infrastructure models
- Sensor readings
- Historical measurements
- Maintenance records
- Visual scenes
- Model predictions
Imagine an operator selecting a drainage asset on a digital city model.
The application could display its current measurements, associated infrastructure, and the results of an approved simulation.
The visual layer helps operators understand complex information without needing to interpret graph queries directly.
Remember the distinction:
- Neptune represents connected entities and relationships.
- Neptune Analytics performs graph analysis.
- IoT TwinMaker provides digital-twin modeling and visualization capabilities.
- Domain-specific simulation engines estimate physical system behavior.
Together, these components can support a richer urban intelligence application.
11. How do we evaluate an urban impact analysis system?
A system like this should not be evaluated only by whether it generates a convincing report.
It needs measurable engineering criteria.
Evaluation area | Example measurement |
|---|---|
Graph quality | Accuracy and completeness of verified relationships |
Anomaly detection | Precision, recall, and false-positive rate |
Scenario performance | Agreement with validated reference simulations |
Processing performance | End-to-end execution time |
Reliability | Failed or incomplete workflow rate |
Explainability | Percentage of conclusions with traceable evidence |
Operational usefulness | Whether outputs support operator decisions |
For simulation models, validation against real observations or trusted engineering models is especially important.
For agentic workflows, evaluate whether agents select the right tools, use correct inputs, respect permissions, and accurately report tool outputs.
A language model should never be treated as the source of truth for a physical simulation.
12. Challenges and limitations
Incomplete infrastructure information
A graph with missing relationships can produce incomplete impact analysis.
Uncertain physical conditions
An infrastructure model may not reflect current operating conditions.
Simulation accuracy
Incorrect assumptions can produce misleading results.
Model integration
Hydraulic, traffic, energy, and communication simulations may require different software and data formats.
Agent reliability
AI agents may choose incorrect tools or misinterpret outputs. Use strict schemas, constrained permissions, validation, and human review.
Computational cost
Large graph queries and physical simulations can require significant resources.
Public safety
High-impact decisions must remain under the control of authorized human operators and established emergency procedures.
13. What have we explored in Part 5?
We have moved from individual anomaly detection towards connected infrastructure impact analysis.
The proposed progression is:
Sensor Data → Anomaly Detection → Knowledge Graph → Graph Analysis → Scenario Simulation → AI-Assisted Investigation → Human Review
The key idea is that detecting a problem is only the beginning.
Understanding its possible consequences can be equally important.
14. What comes next? Part 6 of the series
We now have a proposed system that can collect sensor data, detect anomalies, connect infrastructure, and explore possible scenarios.
But an important question remains:
How can we trust the AI-generated recommendations?
What if the system reports an affected road that is not actually connected? What if a simulation result is misunderstood? What if an AI agent presents an assumption as a verified fact?
In Part 6, we will explore:
Building Trustworthy AI: Evidence, Verification, and Human Oversight for Smart Cities.
We will examine:
- Evidence-backed AI responses
- Data provenance
- Model and simulation validation
- Agent evaluation
- Guardrails and permissions
- Audit trails
- Human approval workflows
The city has learned to connect the dots and explore possible consequences.
Next, we will focus on making those insights trustworthy.
THE CITY THAT CAN FEEL — Seven days. Seven technical deep dives. One intelligent city vision.
References and further reading
Disclaimer: This article describes a proposed architecture and illustrative Python experiments. All infrastructure relationships, scenario values, and outcomes are hypothetical. No physical flood, traffic, power-flow, or other engineering simulation has been performed, and no real-world impact prediction or prevention result is claimed. Real deployment requires validated engineering models, verified infrastructure data, security reviews, and human oversight.
Series: THE CITY THAT CAN FEEL: Building an Artificial Nervous System for Smart Cities Using AWS (7 articles)
- …
- 5Can One Infrastructure Failure Affect an Entire City? | Part 5 This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article