<< NL_T_LocalityConnex NL_T: Topology NL_T_MultiLevel >>

NARVAL >> NL_T: Topology > NL_T_LocalityNodeRange

NL_T_LocalityNodeRange

Generate a network topology in respect with the Locality method (communication range defined for each node).

Calling Sequence

[G] = NL_T_LocalityNodeRange(X,Y,L,D)

Arguments

X :

X-coordinates of network nodes.

Y :

Y-coordinates of network nodes.

L :

Network squared area side.

D :

Locality radius vector.

G :

Graph.

Description

NL_T_LocalityNodeRange creates the network topology G in respect with the Locality method. The communication range of the node i is stored in D(i). The node i is located in [X(i) Y(i)].

n nodes are located inside a square of side L. The probability to create a link between the two nodes Ni and Nj depends on their distance dij and the minimum of their Locality radius R=min[di dj]. If dij is inferior to R, a link is created.

Examples

L=1000;//network squared area side
Lx=L;
Ly=L;
tl=3;//number of lines
tc=3;//number of columns
T=tl*tc;//grid size
d=300*ones(1,T);//locality radius
[g]=NL_T_Grid(tl,tc,Lx,Ly);//backbone grid
nodx=g.node_x;//x-coordinates
nody=g.node_y;//y-coordinates
NT=5;//subnetwork size
dd=L/10;//locality radius
for i=1:T
nodxx=nodx(i)+NL_F_RandVectorCoord(NT,dd)-dd/2;//subnetwork
nodyy=nody(i)+NL_F_RandVectorCoord(NT,dd)-dd/2;
nodx=[nodx nodxx];//x-cordinates
nody=[nody nodyy];//y-coordinates
end
d=[d dd*ones(1,NT*T)];locality radius vector
[g]=NL_T_LocalityNodeRange(nodx,nody,L,d);//application of NL_T_LocalityNodeRange
g.node_diam=[30*ones(1,T) 10*ones(1,NT*T)];
ind=1;//window index
f=NL_G_ShowGraph(g,ind);//graph visualization

Dependency

NL_F_DistanceNiNj, NL_G_MakeGraph, NL_G_GraphEdgesLength

Report an issue
<< NL_T_LocalityConnex NL_T: Topology NL_T_MultiLevel >>