Update a route manager after a connection end.
[probroute]=NARVAL_I_UpdateProbRoute(probroute,probrouteinit,k)
route manager.
initial route manager state.
line index.
NARVAL_I_UpdateProbRoute updates the route manager probroute after a connection close. For a connection between the nodes nd and nf, the line k that needs to be updated is located in (nd-1)*n+nf if n represents the network size.
[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 closs=0.9; cack=0.1; [probroute]=NARVAL_I_StartRouteProb(rt1,rt2,rt3,rt4,rt5,pt,n,L);//initialization of the route manager probrouteinit=probroute;//backup of the original state of the route manager e=1;//packet acknowledgement ri=1;//on the route 1 m=0;//multiplicatif mode k=(nd-1)*n+nf; probroute(k,:)//initial state of the path selection between nd and nf [probroute]=NARVAL_I_RouteProbChange(probroute,closs,cack,e,ri,nd,nf,n,m);//modification of the route manager probroute(k,:)//new state after an acknowledgement on the path ri [probroute]=NARVAL_I_UpdateProbRoute(probroute,probrouteinit,k);//application of NARVAL_I_UpdateProbRoute probroute(k,:) | ![]() | ![]() |