Transfer the first packet of each reception network node towards its neighbor node in order to reach its destination.
[lfo,swi,rti,probroute,net,nets,rp,it,at,tt,routep,probch]=NARVAL_I_R2R(g,swi,swmax,rti,rtmax,rt1,rt2,rt3,rt4,rt5,probroute,closs,cack,net,nets,n,rp,t,nd,nf,it,at,tt,routep,probch,probrouteinit)
network graph.
sliding window of each network node.
maximum sliding window value.
retransmission time of each network node.
maximal retransmission time.
first routing table.
second routing table.
third routing table.
fourth routing table.
fifth routing table.
route manager.
modification factor of the route manager after a packet loss.
modification factor of the route manager after a packet acknowledgement.
reception network matrix.
emission network matrix.
network size.
packet manager.
current time.
source node of the connection under studies.
source node of the connection under studies.
index vector of connection packets.
arrival time process of connection packets.
travel time process of connection packets.
route followed by each connection packet.
route manager state for the connection under studies.
initial state of the probability to take a route in respect with the network starting empty load.
vector of links where packets are transmitted.
NARVAL_I_E2R transfers the first packet of each reception network node towards its neighbor node in order to reach its destination. swi (respectivelly rti) gathers the sliding window (respectivelly the retransmission time) of each network node. rtmax corresponds to the maximal retransmission time value. rt1, rt2, rt3, rt4 and rt5 are alternative routing tables of the network graph. probroute is the route manager. closs (respectivelly cack) is the modification factor of the route manager after a packet loss (respectivelly acknowledgement). net (respectivelly nets) is the reception (respectivelly emission) network matrix. The network topology is composed by n nodes. bs is the buffer size. rp corresponds to the packet manager. t is the current time. nd and nf are the extremal nodes of the connection under studies. it, at, tt, routep and probch capture the information about the connection Quality of Service (QoS). lfo corresponds to the vector of links where packets are transmitted. It will be used to display the network load dynamic.
[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 n=100;//network size bs=15;//constant buffer size [nd,nf]=NARVAL_F_Random_i_j(n);//generation of connection extreme nodes L=1000;//network square area side t=1;//current time [probroute]=NARVAL_I_StartRouteProb(rt1,rt2,rt3,rt4,rt5,pt,n,L);//initialization of the route manager probrouteinit=probroute;//backup of the initial state of the route manager network=NARVAL_I_EmptyBufferNet(n,bs);//initialization of the reception network matrix networks=NARVAL_I_EmptyBufferNet(n,bs);//initialization of the emission network matrix tpmax=n*bs;//maximal quantity of packets simultaneously supported by each network matrix rp=NARVAL_I_EmptyPacketMan(tpmax);//initialization of the packet manager cpmax=5;//maximal quantity of packets per connection ct=3;//connection type selection index swmin=1; rtmin=1; swmax=bs; rtmax=50; p=0.90;//probability threshold [swi,rti]=NARVAL_I_TcpStartPar(n,swmin,rtmin);//initialization of the TCP parameters for each node [networks,rp]=NARVAL_I_ConManagerNodes(nd,n,bs,cpmax,networks,rp,ct,p);//generation of new connections [swi,rti,network,networks,rp]=NARVAL_I_E2R(swi,rti,rtmax,network,networks,n,bs,rp,t,probroute);//traffic creation closs=0.9; cack=0.1; it=[]; at=[]; tt=[]; routep=[]; probch=[]; networks(find(networks(:,$) lt gt 0),:) network(find(networks(:,$)lt gt 0),:) [lfo,swi,rti,probroute,network,networks,rp,it,at,tt,routep,probch]=NARVAL_I_R2R(g,swi,swmax,rti,rtmax,rt1,rt2,rt3,rt4,rt5,probroute,closs,cack,network,networks,n,rp,t,nd,nf,it,at,tt,routep,probch,probrouteinit);//application of NARVAL_I_R2R network(find(networks(:,$) lt gt 0),:) lfo//display the network links where packets have been transmitted eb=ones(1,length(g.head)); ec=ones(1,length(g.head)); ec(lfo)=2; eb(lfo)=3; g.edge_color=ec; g.edge_width=eb; wind=1;//window index fg=NARVAL_G_ShowGraph(g,wind); | ![]() | ![]() |