<< NL_I_Connection NL_I: Internet NL_I_Emission2Reception >>

NARVAL >> NL_I: Internet > NL_I_ConnectionManager

NL_I_ConnectionManager

Create new connections inside an emission network matrix.

Calling Sequence

[Net,R] = NL_I_ConnectionManager(I,N,B,M,Net,R,T,P)

Arguments

I :

Emission node of the connection of interest.

N :

Network size.

B :

Buffer size.

M :

Maximal size of new connections.

Net :

Emission network matrix.

R :

Packet manager.

T :

Connection type index.

P :

Probability threshold.

Description

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.

Examples

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

Dependency

NL_F_RandVectorJifI, NL_F_RandVector0nminus1, NL_I_PMAddConnections,

Report an issue
<< NL_I_Connection NL_I: Internet NL_I_Emission2Reception >>