<< NL_R_AggregationTree NL_R: Routing NL_R_BFS >>

NARVAL >> NL_R: Routing > NL_R_AggregationWCDS

NL_R_AggregationWCDS

Perform the data aggregation on each node of a graph (WCDS+tree).

Calling Sequence

[D] = NL_R_AggregationWCDS(G,Gn,N,S)

Arguments

G :

Graph.

:

Nucleus graph.

N :

List of nucleus.

S :

Sink.

D :

Output data.

Description

NL_R_AggregationWCDS performs the data aggregation D (all information from its children) on each node of the network graph G. The nucleus graph (edges between master nodes) is assumed to be known. N gathers the list of nucleus indexes inside the graph G. The sink is the node S. D is a matrix n*(n+1). It gives the information about the aggregation performed during the WCDS algorithm by all nucleus nodes. In this aggregation approach, the master nodes form a tree towards the sink. Each nucleus aggregates the information forwarded by its children. As a consequence, less packets are used during the collection of all sensed data transmitted by all nodes.

Examples

n=200;//network size
l=1000;//network squared area side
d=100;//Locality radius
[g]=NL_T_LocalityConnex(n,l,d);//generation of a topology
[go,nucleus,electron]=NL_G_WCDS(g);//calculation of the WCDS of g
w=1;//window index
f=NL_G_ShowGraphN(go,w);//graph visualization
[gnu]=NL_G_WCDSNucleus(g,nucleus);//nucleus graph 
w2=2;//window index
[f2]=NL_G_ShowGraphN(gnu,w2);//graph visualization
sink=nucleus(NL_F_RandInt1n(gnu.node_number));//selection of the sink
[d]=NL_R_AggregationWCDS(g,gnu,nucleus,sink);//application of NL_R_AggregationWCDS 
w3=3;//window index
scf(w3);//display parameters
clf(w3);
xgrid(1);
st=[17];//style
lstyle=[1];//style
xset("line style",lstyle(1));
plot2d(1:g.node_number,d(:,$)',style=st(1));//graph visualization
xtitle('Aggregation Spanning Tree','Sensor ID','Aggregation Level','');

Dependency

NL_R_DFSWeight, NL_R_AggregationTree, NL_G_GraphDegreeDist, NL_G_NodeNeighbors, NL_F_RemoveFirstOcc, NL_R_DijkstraNiNj

Report an issue
<< NL_R_AggregationTree NL_R: Routing NL_R_BFS >>