Display a network state in respect with the congestion level of each node.
[g]=NARVAL_I_DisplayNetwork(g,gl,lfo,bu,bomax,bumax,iw)
network graph.
quantity of network links.
vector of links where current packets are propagated.
congestion level (buffer occupancy) of each network node.
maximal node border used for the display.
maximal buffer occupancy.
window index.
NARVAL_I_DisplayNetwork displays 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.
[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 p=1;//window index 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_DisplayNetwork(g,gl,lfo,bu,bo,bum,p);//application of NARVAL_I_DisplayNetwork g | ![]() | ![]() |