waxman_2_topology(n, alpha=0.4, beta=0.1, domain=(0, 0, 1, 1), distance_unit='Km', seed=None)[source]

Return a Waxman-2 random topology.

The Waxman-2 random topology models place n nodes uniformly at random in a rectangular domain. Two nodes u, v are connected with a link with probability

p = \alpha*exp(-d/(\beta*L)).

where the distance d is the Euclidean distance between the nodes u and v. and L is the maximum distance between all nodes in the graph.

n : int

Number of nodes

alpha : float

Model parameter chosen in (0,1] (higher alpha increases link density)

beta : float

Model parameter chosen in (0,1] (higher beta increases difference between density of short and long links)

domain : tuple of numbers, optional

Domain size (xmin, ymin, xmax, ymax)

seed : int, optional

Seed for random number generator (default=None).

G : Topology


Each edge of G has the attribute length


[1]B. M. Waxman, Routing of multipoint connections. IEEE J. Select. Areas Commun. 6(9),(1988) 1617-1622.