Skip to main content

diffusive-routing

Entropy-minimizing network routing — packets are routed along paths of minimum entropic resistance, with the resistance field evolving under a Turing-style reaction-diffusion process driven by network load.

CI Python 3.11+ License: MIT

A self-contained synthetic routing testbed: a NetworkX topology (datacenter fat-tree or random), an entropic resistance field ρ_ij = baseline / (1 + Γ_ij · C_ij), a modified-Dijkstra router that follows that field, and a reaction-diffusion update dρ/dt = D∇²ρ - kΓρ + f(load) that lets the field adapt over time. All values reported by the system are computed live from the simulation — there is no fabricated benchmark data.


Installation

pip install diffusive-routing
# with visualisation support (matplotlib)
pip install "diffusive-routing[viz]"

Usage

# Run a simulation cycle on the default datacenter fat-tree topology
diffusive-routing run --topology datacenter-fat-tree --packets 1000

# Compare diffusive routing against a static shortest-path (OSPF-like) baseline
diffusive-routing compare-ospf --topology random --packets 200

# Visualise the entropic resistance field
diffusive-routing visualise --save-path field.png

Or use it as a library:

from diffusive_routing import DiffusiveRouting

system = DiffusiveRouting()
result = system.run_cycle(n_packets=1000)
print(result)
print(system.get_crep_state())   # {"C": ..., "R": ..., "E": ..., "P": ..., "Gamma": ...}
print(system.get_utac_state())   # {"H": ..., "dH_dt": ..., "H_star": ..., ...}

How it works

  • Entropic resistance field (entropy_field.py) — per-link resistance derived from the link's CREP state; lower resistance means a more attractive path.
  • Reaction-diffusion (reaction_diffusion.py) — the resistance field diffuses across neighbouring links and decays/reinforces based on utilization, so congestion on one link gradually reroutes traffic onto neighbours.
  • Router (router.py) — routes each Packet via shortest path under the current resistance weights (a diffusive analogue of Dijkstra).
  • S_A / S_V duality (sa_sv_duality.py) — tracks the action entropy of routed paths (S_A, routing cost) against the volume entropy of traffic incident on a destination (S_V), exposing a Lagrangian-style score L_net = -S_A + S_V.
  • CREP tensor (crep_network.py) — per-link and network-wide Coherence / Resonance / Emergence / Poetics-diversity state, aggregated into a single Γ via a geometric mean.
  • Benchmark (benchmark.py) — compare-ospf runs the same (src, dst) pairs through both diffusive routing and a static shortest-path baseline and reports throughput/hop/resistance deltas.

Role in the GenesisAeon Ecosystem

diffusive-routing is package P30 in the GenesisAeon ecosystem, covering the network science domain. It implements the GenesisAeon Diamond Interface (run_cycle, get_crep_state, get_utac_state, get_phase_events, to_zenodo_record) on top of the UTAC/CREP tensor framework shared across the ecosystem, targeting a routing Γ setpoint of approximately 0.443 (efficiency η = tanh(σ·Γ), σ = 2.2).

Citation

DOI

DOI will be assigned automatically on first GitHub Release once Zenodo–GitHub integration is enabled for this repo.


Built with Typer · Rich · NetworkX

Metadata

Release files for diffusive-routing 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diffusive-routing 1.0.0
File Size Uploaded Provenance
diffusive_routing-1.0.0.tar.gz 84.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for diffusive-routing 1.0.0
File Interpreter ABI Platform
diffusive_routing-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 100.2 kB

Release files / diffusive_routing-1.0.0.tar.gz

Download URL diffusive_routing-1.0.0.tar.gz
Size 84.4 kB
Tags Source
SHA-256 checksum
How to use checksums
465c273f4a48c1df09c626566d18d4a6d445beaae82ed2174ec575d4adca3bda
BLAKE2b-256 checksum
How to use checksums
785853a2c7ec5d84c8cb076dbb2b4243044baddd8e7d0340ac2e2a936cb82547
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / diffusive_routing-1.0.0-py3-none-any.whl

Download URL diffusive_routing-1.0.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9cd049f9b9062dae15c6af86a39a33d5e3f33cc7543feb8bf887009a350a80c
BLAKE2b-256 checksum
How to use checksums
1b097445f9de89663269613852f8d8f6373902c8ddfc6082f20eec0adfe1882f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for diffusive-routing 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page