"""Illustrative contact-budget simulation; not the ScopeLink protocol or a radio test.""" import random, json, statistics from pathlib import Path SEED=352026 N=10000 PAYLOAD=30000 OVERHEAD=128 CONTACTS=5 def transfer(budgets, chunk): remaining=PAYLOAD attempted=0 for count,budget in enumerate(budgets,1): while remaining and budget: size=min(chunk,remaining) cost=size+OVERHEAD sent=min(cost,budget) attempted+=sent budget-=sent if sent