Skip to main content

Multi-company scenario engine for supply chain cascade simulation

Project description

mimic-world

Multi-company scenario engine for supply chain cascade simulation.

What happens to an entire system when a shock hits?

mimic-world simulates many companies responding to one event, watching them react to each other, and tracking the cascade. This is where supply chains come alive. This is where second-order effects emerge. This is where a port closure becomes an inflation event.

from mimic_world import World, Scenario, Twin

world = World()
world.add_twin(Twin.from_ticker("AAPL"))
world.add_twin(Twin.from_ticker("WMT"))
world.add_twin(Twin.from_ticker("FDX"))
world.add_twin(Twin.from_ticker("TSMC"))

world.connect("TSMC", "AAPL", relationship="supplier", weight=0.95, commodity="chips")
world.connect("XOM",  "FDX",  relationship="supplier", weight=0.40, commodity="jet_fuel")

scenario = Scenario.from_library("taiwan_strait_closure_30d")
result   = world.run(scenario)

result.print_summary()
print(result.cascade_timeline)
print(result.second_order_effects)
print(result.system_stability)   # "stabilizing" | "escalating" | "bifurcating"

How It Works

  1. A Scenario defines initial shocks (semiconductor_supply: -0.65) and cascade rules
  2. A World holds company Twins connected by a RelationshipGraph
  3. The CascadeEngine runs time steps: each twin's LLM-powered decisions update a shared world_state
  4. Connected twins see those updates and react — creating emergent second-order behavior

The 50-Scenario Library

Pre-built scenarios across 6 categories:

Category Count Examples
Geopolitical 10 Taiwan Strait closure, Russia energy cutoff
Supply Chain 10 Suez Canal closure, Shanghai lockdown
Macro/Financial 10 Fed hikes 200bps, Credit crunch 2008-style
Climate/Natural 10 Gulf Coast Cat 5 hurricane, Japan earthquake 9.0
Pandemic/Health 5 COVID-severity pandemic, Antibiotic resistance
Technology/Cyber 5 Global cloud outage, Critical infrastructure attack
# List all 50 scenarios
for s in Scenario.list_library():
    print(f"{s['id']:<45} severity={s['severity']:.0%}")

Install

pip install mimic-world

Ecosystem

mimic          → single company twin
mimic-bench    → grades predictions
mimic-forecast → real quantitative forecasts
mimic-world    → multi-company system + scenarios  ← HERE
mimic-sim      → 10,000-run Monte Carlo over worlds
mimic-signal   → real-time event detection

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mimic_world-0.2.0a0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mimic_world-0.2.0a0-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file mimic_world-0.2.0a0.tar.gz.

File metadata

  • Download URL: mimic_world-0.2.0a0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for mimic_world-0.2.0a0.tar.gz
Algorithm Hash digest
SHA256 330a2fe0757c3c606da69d4480afba061474a39f2367466ad6119a034fe015d7
MD5 408db85d25a2f25c442da7b89c704e6a
BLAKE2b-256 3c485e4fefa91967a58c2ff8aa1153ac0f519a2c57df052ba4555a33aa9d7934

See more details on using hashes here.

File details

Details for the file mimic_world-0.2.0a0-py3-none-any.whl.

File metadata

  • Download URL: mimic_world-0.2.0a0-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for mimic_world-0.2.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 af6b33067ff6752320a4c004b3b7cbb3c3a8ffc465b6d03180920ba83caa489d
MD5 5bdaab042719685818a85d86fe1d9eb0
BLAKE2b-256 96b72b83c613ea4f4b0d979e00b4eb34d48bb335c69e44e781b5eeb6fa3375fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page