<< NARVAL_I_NTS NARVAL NARVAL_I_NextNode >>

NARVAL >> NARVAL > NARVAL_I_NetworkState

NARVAL_I_NetworkState

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

Calling Sequence

[g]=NARVAL_I_NetworkState(g,gl,lfo,bu,bomax,bumax)

Parameters

g :

network graph.

gl :

quantity of network links.

lfo :

vector of links where current packets are propagated.

bu :

congestion level (buffer occupancy) of each network node.

bomax :

maximal node border used for the display.

bumax :

maximal buffer occupancy.

Description

NARVAL_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 bu. 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 bumax, then nodes having this extremal value will be displayed with a border equal to bomax. gl represents the quantity of network links. lfo 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 bumax, it is displayed in black. Moreover the node border is proportional to its buffer occupancy. When it is included into the range [1/2,3/4]*bumax, it is represented in blue. Else it is displayed in red when it is greater than 3/4*bum.

Examples

[path]=NARVAL_F_NARVALPath();//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
[g]=NARVAL_I_NetworkState(g,gl,lfo,bu,bo,bum);//application of NARVAL_I_NetworkState
ind=1;
f=NARVAL_G_ShowGraph(g,ind);
g

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_I_NTS NARVAL NARVAL_I_NextNode >>