Generate a random hierarchic network based on successive layers generated by the Waxman algorithm.
[g,d,nl]=Ntg(a,b,nl,l,n,s,db,dd,cv)
first parameter of the Waxman model for each network layer.
second parameter of the Waxman model for each network layer.
quantity of nodes per network layer.
squared area side per network layer.
maximal quantity of nodes per subnetwork for each layer.
quantity of network layers.
original diameter of nodes.
diameter difference between successive network layers.
color of each network layer.
network graph.
diameter of each network node.
Ntg generates a random hierarchic network composed by s layers.
We want to attribute nl(1) nodes into the first layer, nl(2) nodes into the second layer and so on. Each subnetwork is generated in respect with the Waxman algorithm. Users must enter three vectors a, b and l having the same size than nl. a (respectively b) clusters the alpha (respectively beta) parameters used by the Waxman algorithm in order to generate subnetworks for each layer. l gathers the square area side values needed for the calculation of probabilities. Then a(i) and b(i) are the Waxman parameters of the network layer i. l(i) is the subnetwork square side at the layer i. In respect with our modeling, the first layer corresponds to the network backbone. For this layer, we use the Connex Waxman Algorithm. cv, db and dd are only used to emphasize the hierarchical structure of the generated network. c is a s-length vector that contains the colors used to display each network layer. The nodes of the first layer have a diameter equal to db. The nodes diameter is constant for a layer, but we reduce dd to its current value when we move to the next layer. For instance, if the starting diameter is 20 for the network backbone, nodes of the layer 2 will have a diameter of 15 if dd rates 5. For the layer level i from 2 to s-1, the placement of nodes is done as what follows. We suppose that the composition of the previous layer i-1 is known. Let li be the quantity of nodes belonging to the layer i. We initialize the vector previous containing all nodes of the layer i-1. We want to place n(i) nodes on this layer. In order to fairly attribute nodes around each subnetwork of the previous layer, we suggest to place nodes per small groups in respect with the vector n. Then for the layer 2 with n(2), we randomly place subnetworks of k nodes selected from the uniform distribution [ 1 2 3 4 ... nm] around the node Nc of the layer i-1 randomly selected into the vector previous (in this case nm=n(2)). After each iterative process, Nc is removed from previous in order to fairly attribute subnetworks to the nodes of the layer i-1. When previous becomes empty, we reinitialize it with its original value. Finally if the quantity of desired nodes for a layer has not been reached, we translate the difference to the latest layer.