Skip to main content

Entropy-minimizing network routing — packets flow along paths of minimum entropic resistance (GenesisAeon Package 30)

Project description

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

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

diffusive_routing-1.0.0.tar.gz (84.4 kB view details)

Uploaded Source

Built Distribution

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

diffusive_routing-1.0.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file diffusive_routing-1.0.0.tar.gz.

File metadata

  • Download URL: diffusive_routing-1.0.0.tar.gz
  • Upload date:
  • Size: 84.4 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for diffusive_routing-1.0.0.tar.gz
Algorithm Hash digest
SHA256 465c273f4a48c1df09c626566d18d4a6d445beaae82ed2174ec575d4adca3bda
MD5 a362452840e05b584c3db3179abfc758
BLAKE2b-256 785853a2c7ec5d84c8cb076dbb2b4243044baddd8e7d0340ac2e2a936cb82547

See more details on using hashes here.

File details

Details for the file diffusive_routing-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: diffusive_routing-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for diffusive_routing-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9cd049f9b9062dae15c6af86a39a33d5e3f33cc7543feb8bf887009a350a80c
MD5 911055c35b2f96e7dd7f52cc3eb977d1
BLAKE2b-256 1b097445f9de89663269613852f8d8f6373902c8ddfc6082f20eec0adfe1882f

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