ZRP Zone Radius Explorer
ZRP Zone Radius Explorer
Use the explorer to test how zone radius moves routing work between proactive maintenance and reactive discovery. Begin with a small radius and note zone coverage and proactive overhead, then increase the radius while holding node count and average degree steady. Compare the savings against pure DSDV and watch for the point where the zone covers so much of the network that ZRP is no longer behaving as a useful hybrid.
Try Start with zone radius 1 hop in a 100-node network, then raise it one hop at a time while the average node degree stays at 5.
Observe Watch the 5 result cards (zone size, border share, proactive overhead, savings and assessment) change as the radius grows from 1 to 6.
Explain Explain at which radius from 1 to 6 extra proactive maintenance stops paying for the route discoveries it saves.
Play
Reset
Technical boundaries. The explorer uses a simple zone-size model with a uniform node degree; real networks have uneven density and mobility, so the overhead figures show the trend, not a measured cost.
viewof zone_radius = Inputs. range ([1 , 6 ], {value : 2 , step : 1 , label : "Zone radius ρ (hops)" })
viewof avg_degree = Inputs. range ([2 , 10 ], {value : 5 , step : 1 , label : "Average node degree" })
viewof total_nodes = Inputs. range ([20 , 300 ], {value : 100 , step : 10 , label : "Total network nodes" })
{
// Zone size estimate: sum of geometric series
let zone_size = 1 ;
let layer = 1 ;
for (let i = 1 ; i <= zone_radius; i++ ) {
layer = (i === 1 ) ? avg_degree : layer * (avg_degree - 1 );
zone_size += Math . min (layer, total_nodes - zone_size);
}
zone_size = Math . min (zone_size, total_nodes);
const border_pct = (zone_size / total_nodes) * 100 ;
const proactive_mb = (total_nodes * 240 * zone_size * 50 ) / 1e6 ; // 50B/entry, 240 updates/hr
const reactive_pct = Math . max (0 , 100 - border_pct);
const reactive_mb = (total_nodes * 30 * (reactive_pct/ 100 ) * total_nodes * 60 ) / 1e6 ;
const total_mb = proactive_mb + reactive_mb;
const pure_dsdv = (total_nodes * 240 * total_nodes * 50 ) / 1e6 ;
const savings_pct = ((pure_dsdv - total_mb) / pure_dsdv * 100 );
const status = zone_size >= total_nodes * 0.6 ? 'Too large (→ DSDV)' :
zone_size <= total_nodes * 0.1 ? 'Too small (→ DSR)' : 'Optimal range' ;
return html `
<div id="zrp-zr-result" role="status" tabindex="-1" style="display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:0.7rem;margin:1rem 0">
<div style="background:#eaf4fb;border-left:4px solid #3498DB;padding:0.8rem;border-radius:4px;min-width:0">
<div style="font-size:0.8rem;color:#555">Zone size</div>
<div style="font-size:1.5rem;font-weight:bold;color:#2C3E50"> ${ zone_size} nodes</div>
<div style="font-size:0.75rem;color:#777"> ${ border_pct. toFixed (0 )} % of network</div>
</div>
<div style="background:#fef9e7;border-left:4px solid #E67E22;padding:0.8rem;border-radius:4px;min-width:0">
<div style="font-size:0.8rem;color:#555">Proactive overhead</div>
<div style="font-size:1.5rem;font-weight:bold;color:#2C3E50"> ${ proactive_mb. toFixed (0 )} MB/hr</div>
</div>
<div style="background:#eafaf1;border-left:4px solid #16A085;padding:0.8rem;border-radius:4px;min-width:0">
<div style="font-size:0.8rem;color:#555">vs pure DSDV</div>
<div style="font-size:1.5rem;font-weight:bold;color:#2C3E50"> ${ savings_pct. toFixed (0 )} % saved</div>
</div>
<div style="background: ${ status. includes ('Optimal' ) ? '#eafaf1' : '#fdf2f8' } ;border-left:4px solid ${ status. includes ('Optimal' ) ? '#16A085' : '#E74C3C' } ;padding:0.8rem;border-radius:4px;min-width:0">
<div style="font-size:0.8rem;color:#555">Assessment</div>
<div style="font-size:0.95rem;font-weight:bold;color:#2C3E50"> ${ status} </div>
</div>
</div>
<p style="font-size:0.9rem;color:#555">ρ= ${ zone_radius} covers ${ zone_size} / ${ total_nodes} nodes ( ${ border_pct. toFixed (0 )} %). Proactive: ${ proactive_mb. toFixed (0 )} MB/hr for zone routes. Pure DSDV would be ${ pure_dsdv. toFixed (0 )} MB/hr. Target zone coverage: 20-50% of network for true hybrid behavior.</p>
` ;
}
{
const set = (v, n) => { v. value = n; v. dispatchEvent (new Event ("input" , {bubbles : true })); };
const root = document . getElementById ("zrp-zr-actions" );
if (root ) {
let timer = null ;
const stop = () => { if (timer) { clearInterval (timer); timer = null ; } };
root . querySelector ('[data-act="reset"]' ). onclick = () => { stop (); set (viewof zone_radius, 2 ); set (viewof avg_degree, 5 ); set (viewof total_nodes, 100 ); };
root . querySelector ('[data-act="primary"]' ). onclick = () => {
stop (); let radius = 1 ; set (viewof zone_radius, radius);
timer = setInterval (() => { radius += 1 ; if (radius > 6 ) { stop (); return ; } set (viewof zone_radius, radius); }, 800 );
};
}
}
Back to the chapter