<< NL_I_NetworkMatrixInit NL_I: Internet NL_I_NodeBufferExchange >>

NARVAL >> NL_I: Internet > NL_I_NetworkState

NL_I_NetworkState

Generate a network state in respect with the congestion level of each node.

Calling Sequence

[Go] = NL_I_NetworkState(G,L,F,B,W,Bm)

Arguments

G :

Network graph.

L :

Quantity of network links.

F :

Vector of links where current packets are propagated.

B :

Congestion level (buffer occupancy) of each network node.

W :

Maximal node border used for the display.

:

Maximal buffer occupancy.

:

Output network graph.

Description

NL_I_NetworkState generates the state of the network graph G in respect with the congestion level (buffer occupancy) of each node stored inside the vector B. It is used to represent the network load state that consists of the current level of each router buffer at the time T. Thus if this metric is bounded by Bm, then nodes having this extremal value will be displayed with a border equal to W. L represents the quantity of network links. F corresponds to the vector of links where current packets are propagated. This function has been designed in order to show the congestion state of a network. When the buffer of a router is inferior to one half of , it is displayed in black. Moreover the node border is proportional to its buffer occupancy. When it is included into the range , it is displayed in blue. Else it is displayed in red when it is greater than .

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
bo=20;//maximal node border
bum=bo;//maximal metric level
nf=length(g.node_x);//network size
gl=length(g.head);//quantity of network links
bu=int((bo+1)*rand(1,nf));//generation of a random buffer state
pl=int((gl+1)*rand());
lfo=int((gl)*rand(pl,1))+1;//generation of packets along lfo links
[go]=NL_I_NetworkState(g,gl,lfo,bu,bo,bum);//application of NL_I_ShowNetworkState
ind=1;//window index
f=NL_G_ShowGraph(go,ind);//graph visualization

Report an issue
<< NL_I_NetworkMatrixInit NL_I: Internet NL_I_NodeBufferExchange >>