Create new connections inside an emission network matrix.
[Net,R] = NL_I_ConnectionManager(I,N,B,M,Net,R,T,P)
Emission node of the connection of interest.
Network size.
Buffer size.
Maximal size of new connections.
Emission network matrix.
Packet manager.
Connection type index.
Probability threshold.
NL_I_ConnectionManager creates new connections inside the emission network matrix Net. All network nodes except the emission node I of the connection of interest are candidates to the generation of new connections. N is the network size. B corresponds to the buffer size of each network node. M represents the maximal size of new connections. R is the packet manager where all information about packets is stored. T belongs to [0 1 2 3]. If T=0, then all connections are UDP . If T=1, then all connections are TCP. If T=2, then all connections are MPTCP. Finally if T=3, then 90% of connections are TCP and the rest is UDP. Else each connection type is randomly selected between UDP, TCP and MPTCP.
n=100;//network size bs=15;//constant buffer size [nd,nf]=NL_F_RandIntNiNj(n);//generation of connection extreme nodes network=NL_I_NetworkMatrixInit(n,bs);//initialization of the reception network matrix networks=NL_I_NetworkMatrixInit(n,bs);//initialization of the emission network matrix tpmax=n*bs;//maximal quantity of packets simultaneously supported by each network matrix rp=NL_I_PacketManagerInit(tpmax);//initialization of the packet manager cpmax=5;//maximal quantity of packets per connection ct=3;//connection type selection index: 90% TCP 10% UDP p=0.95;//probability threshold [networks,rp]=NL_I_ConnectionManager(nd,n,bs,cpmax,networks,rp,ct,p);//application of NL_I_ConnectionManager networks(find(networks(:,$) <> 0),:)//new state of the emission network matrix for each starting node where connections have been created rp(1:sum(networks(:,$)),:)//route manager state | ![]() | ![]() |