Initiate the routing table of each node inside a network (AODV).
NL_R_AodvRTInit(G,R)
Graph.
Vector of each node's routing table size.
NL_R_AODVRTInit initiates the routing table of each node i inside the network represented by its connectivity graph G. These local routing table will be used by the AODV algorithm (WEB). The routing table
of the node i can store R(i) routes. Each route information is stored in a single line inside the matrix R at the ith line and it is composed by 4 elements ([Node|Next Hop|Seq number|Hop Count]). Routing tables are global variables.
name='network';//graph name node_number=5;//quantity of nodes tail=[2 3 3 4 5 5];//head vector (links) head=[1 1 2 2 2 4];//tail vector (links) node_x=[100 500 300 700 900];//x-coordinates of nodes node_y=[500 500 900 100 500];//y-coordinates of nodes [g]=NL_G_MakeGraph(name,node_number,tail,head,node_x,node_y);//generation of a topology with 3 nodes w=1;//window index f1=NL_G_ShowGraphN(g,w);//graph visualization for i=1:g.node_number global ('rt'+string(i));//creation of empty routing tables end bss=10;//maximum buffer size bs=bss*ones(1,g.node_number);//buffer matrix NL_R_AODVRTInit(g,bs);//application of NL_R_AODVRTInitialization rt1 | ![]() | ![]() |