<< NL_I_PacketsAckNetwork NL_I: Internet NL_I_PathNextNode >>

NARVAL >> NL_I: Internet > NL_I_PacketsLocation

NL_I_PacketsLocation

Extract the index vector of nodes with non-empty buffers inside a network matrix.

Calling Sequence

[V] = NL_I_PacketsLocation(Net)

Arguments

Net :

Network matrix.

V :

Index of nodes.

Description

NL_I_PacketsLocation extracts the index vector V of nodes of the network matrix Net where the buffer presents a non-empty state.

Examples

[path]=NL_F_NLPath();//path to NARVAL module
path=path+'/demos/';//folder path
load(path+'RoutingTables_topo_100.dat','pt','rt1','rt2','rt3','rt4','rt5');//loading of the network routing tables
load(path+'topo_100.graph','g');//loading of the network graph
n=100;//network size
bs=15;//constant buffer size
[nd,nf]=NL_F_RandIntNiNj(n);//generation of connection extreme nodes
L=1000;//network square area side
t=1;//current time
[probroute]=NL_I_RouteManagerInit(rt1,rt2,rt3,rt4,rt5,pt,n,L);//initialization of the route manager
network=NL_I_NetworkMatrixInit(n,bs);//initialization of the reception network matrix 
networks=NL_I_NetworkMatrixInit(n,bs);//initialization of the emission network matrix
tpmax=n*bs;//maximal quantity of packets simultaneously supported by each network matrix 
rp=NL_I_PacketManagerInit(tpmax);//initialization of the packet manager
cpmax=5;//maximal quantity of packets per connection
ct=1;//connection type selection index: creation of TCP connections
p=0.90;//probability threshold
[networks,rp]=NL_I_ConnectionManager(nd,n,bs,cpmax,networks,rp,ct,p);//Generation of new connections
[vi]=NL_I_PacketsLocation(networks)//application of NL_I_PacketsLocation 
networks(vi,:)

Report an issue
<< NL_I_PacketsAckNetwork NL_I: Internet NL_I_PathNextNode >>