ZRP Zone Radius Selection

ZRP Zone Radius Selection

Choose zone radius based on measurable network characteristics and application requirements.

Selection factors:

  • Small zone (rho = 1-2): a starting point for 20-50 nodes, sparse local traffic below 50%, network diameter above 10 hops, latency tolerance above 1 second, and tight battery budgets. In this planner example, it covers 5-10% of the network.
  • Medium zone (rho = 2-4): a starting point for 50-200 nodes, moderate traffic locality of 50-80%, network diameter of 6-10 hops, latency targets of 200-1000 ms, and moderate overhead budgets. In this medium-zone planner example, it covers 20-40% of the network.
  • Large zone (rho = 4-6): best for 200-1000 nodes only when local traffic is above 80%, network diameter is 4-6 hops, latency must stay below 200 ms, and nodes have enough power budget. In this large-zone planner example, it can cover 60-80% of the network, so watch for proactive degeneration.

Zone Radius Selection Algorithm:

def select_optimal_zone_radius(
    network_size: int,
    avg_neighbors: int,
    traffic_locality: float,  # 0.0-1.0, fraction of traffic within 3 hops
    latency_requirement_ms: int,
    overhead_budget_mb_per_hour: float
) -> int:
    """
    Calculate optimal ZRP zone radius.

    Returns: Recommended zone radius (hops)
    """

    # Estimate zone size for each radius
    zone_sizes = {
        1: avg_neighbors,
        2: avg_neighbors * (avg_neighbors - 1),
        3: avg_neighbors * (avg_neighbors - 1) ** 2,
        4: avg_neighbors * (avg_neighbors - 1) ** 3,
    }

    # Calculate overhead for each radius
    UPDATE_SIZE_BYTES = 50
    UPDATES_PER_HOUR = 240  # every 15s

    overheads = {}
    for radius, zone_size in zone_sizes.items():
        # Proactive overhead
        proactive = network_size * zone_size * UPDATE_SIZE_BYTES * UPDATES_PER_HOUR / 1e6  # MB

        # Reactive overhead (simplified)
        reactive_fraction = max(0, 1 - (zone_size / network_size))
        reactive = reactive_fraction * network_size * 30 * 1800 / 1e6  # MB (30 pkt/hr/node)

        total = proactive + reactive
        overheads[radius] = total

        # Check if within budget
        if total > overhead_budget_mb_per_hour:
            continue

        # Check latency coverage
        coverage = zone_size / network_size
        if coverage >= traffic_locality:  # Most local traffic covered proactively
            # Check latency requirement
            discovery_latency = 150  # ms (typical bordercast)
            if discovery_latency * (1 - coverage) < latency_requirement_ms * 0.2:  # 20% budget
                return radius

    # Fallback: Choose smallest radius within overhead budget
    for radius in sorted(overheads.keys()):
        if overheads[radius] <= overhead_budget_mb_per_hour:
            return radius

    return 1  # Minimum zone

Example Application:

optimal_radius = select_optimal_zone_radius(
    network_size=150,
    avg_neighbors=5,
    traffic_locality=0.75,  # 75% local
    latency_requirement_ms=500,
    overhead_budget_mb_per_hour=60
)
# Returns: 2 (for smart campus scenario above)

Tuning Rules:

  1. Start conservative: Begin with ρ = 2, measure actual traffic locality
  2. Monitor overhead: If overhead <50% of budget, consider ρ+1
  3. Track discovery rate: If >20% of packets require discovery, consider ρ+1
  4. Watch for degeneration: If zone_size > 60% of network, reduce ρ (becoming pure proactive)

Key Insight: Zone radius is not a fixed protocol parameter - it should be dynamically tuned based on observed traffic patterns and network density.

Back to the chapter