Back to Showcases
ManufacturingAdvanced

Supply Chain Risk Propagation

5-tier dependency analysis over explicit typed edges

Typed Dependency EdgesGraph TraversalRisk PropagationMulti-tier Analysis
5
Tiers
Yes
Risk Propagation
Yes
Cascade Detection
All
Tests Passed

The Scenario

Each supply chain node (supplier, component, assembly) is a vector, and each dependency is an explicit, typed SUPPLIES edge authored from your bill of materials, with provenance back to the contract or BOM line. When a disruption occurs at any tier, a traversal over the typed dependency edges identifies all downstream dependencies and propagates risk scores, revealing which products are affected and which alternative suppliers exist. The dependency graph is the one you authored, not one inferred from similarity.

Key Results

  • Explicit, authored dependency edges across all 5 supply chain tiers
  • Risk propagation over the typed edges when disruptions occur
  • Alternative supplier discovery through graph traversal
  • Cascading failure prediction before impact, with edge provenance
5
Tiers
Yes
Risk Propagation
Yes
Cascade Detection
All
Tests Passed

The Code

Everything above, in a few lines of Python.

python
# Author the dependency edges from your bill of materials.
client.graph.put_edge("supply_chain", source=supplier_id, target=component_id,
                      edge_type="SUPPLIES",
                      provenance={"source": "bom", "contract": "C-114"})
client.graph.bulk_import_edges("supply_chain", bom_rows, format="csv")

# Trace risk propagation: walk the typed dependency edges downstream.
affected = (
    client.graph.query("supply_chain")
    .vector_similar(disrupted_supplier_embedding, k=20)
    .traverse("SUPPLIES", direction="outgoing")  # across the 5 tiers
    .vector_rank(disrupted_supplier_embedding, k=100)
    .return_nodes()
)

Try it yourself

Clone the repo, spin up SwarnDB, and run this showcase in minutes.

View on GitHub