Skip to content

toxic2040/TIN

TIN — Tolerant Interlunar Network

License: AGPL v3 Python 3.10+ CI DOI

The problem

Every relay architecture is a timetable. A lunar surface crew waiting for a data uplink doesn't care about orbital mechanics — they care whether the next contact window opens before the bundle expires. Whether bundles arrive depends on when contacts open, how many hops exist, and what the routing policy does with uncertainty.

There is no standard way to answer: given this constellation, this ground station schedule, and this link quality — what fraction of messages will arrive?

What TIN does

TIN answers that question. It takes an architecture specification (orbits, ground stations, link budgets) and returns a delivery ratio.

The engine decomposes delivery ratio into measurable factors:

DR = S_T · η

Factor What it measures How
S_T Can a path exist at all? (temporal reachability) Oracle sweep on the contact DAG
η What fraction of feasible bundles actually arrive? Simulation with stochastic routing

Quick start

git clone https://github.com/toxic2040/TIN.git
cd TIN
pip install -e ".[dev]"
pytest tests/ -x -q

584 tests. The only core dependency is NumPy.

Architecture

tin — DTN Simulation Engine

Bundle forwarding with custody transfer, routing, and oracle analysis.

  • tin/core/dtn.py — Custody FSM with fragment-group aggregation
  • tin/core/routing.py — Stochastic RW-CGR: composite utility
  • tin/core/oracle.py — Earliest-arrival Dijkstra oracle with path extraction
  • tin/core/optimal_router.py — Backward-induction DP on contact DAG (achievability bound)

perc_engine — Percolation Analysis Engine

Sweep infrastructure, contact generation, diagnostics, and multi-fidelity propagation.

  • contact_gen.py — Contact plan generation with DSN scheduling
  • sweep.py — Feasibility sweep (S_T computation)
  • efficiency.py — Efficiency estimation (η) with dead-end filtering
  • propagators.py — Multi-fidelity propagators (Kepler → J2 → Brouwer → RK4)
  • hull.py — Parametric screening via convex hull
  • susceptibility.py — Node vulnerability, hub-fragility, Braess detection
  • bodies.py — 11 body configs + 10 heliocentric orbits + canonical surface sites
  • pipeline.py — Three-phase architecture screening pipeline

Project structure

TIN/
├── tin/                    # DTN simulator
│   ├── core/               #   dtn, routing, oracle, base
│   ├── config/             #   lunar default config
│   └── scenarios/          #   scenario definitions
├── perc_engine/            # Percolation engine
├── tests/                  # 584 tests (pytest)
├── data/fleet/             # Fleet YAML definitions and link budgets
├── .github/workflows/      # CI
├── pyproject.toml          # Single editable install
├── LICENSE                 # AGPL-3.0-or-later
└── LICENSING.md            # Dual-license terms

Scope boundaries

  • Orbital propagation: Baseline is Keplerian with secular J2. Multi-fidelity propagators up to RK4 confirm robustness. Coverage figures are unvalidated against GMAT/STK/Orekit.
  • Surface occlusion: Hard-sphere geometric LOS. No terrain or atmospheric models.
  • Protocol fidelity: Custody FSM (BPv7-inspired). Does not implement BPSec, LTP, or wire-level encoding.
  • v1.0 scope: Cislunar.

Publications

A Classification Framework for Temporal Contact Graphs: Morphology, Confinement, and the Routing Efficiency Frontier J. Councilman — IEEE Open Journal of the Communications Society, 2026

@article{councilman2026classification,
  author  = {Councilman, J.},
  title   = {A Classification Framework for Temporal Contact Graphs:
             Morphology, Confinement, and the Routing Efficiency Frontier},
  year    = {2026},
  doi     = {10.5281/zenodo.18851385}
}

Contributing

Contributions, reproductions, and independent validations are welcome. Run pytest tests/ -x -q and open an issue if results differ.

Areas where external input would be most valuable:

  • Independent coverage analysis using Orekit, GMAT, or STK
  • BPv7/ION/HDTN interoperability review of the custody model
  • Link budget validation for the EM-L2 halo relay path

License

This project is dual-licensed:

  • Open sourceGNU Affero General Public License v3.0 (AGPL-3.0-or-later). Free for academic research, education, and open-source use.
  • Commercial — proprietary license available for organizations that cannot comply with AGPL terms. See LICENSING.md for details.

Experimental data is licensed separately under CC-BY-NC-SA 4.0.

About

Tolerant Interplanetary Network — exact DR factorization & gamma classification across 290,000+ configurations. AGPL-3.0.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages