R-scripts: This directory contains the cluster simulation programs, in the form of python scripts. The directories lambda.00XX contain the topology files for different node densities.The file "clusterSimWithGateway.py" contains the simualtion code for generating the cluster heads and gateways. It takes as parameters the topology file (in lambda.00XX), the maximum X and Y coordinates (500,500), the transmission range (90m) and the algorithm parameters p0 and k (please the see the paper). The file "clusterSimWithGatewayAndEnergy.py" does the same but runs re-clustering on the network till the network gets disconnected, and then reports the lifetime in hours.
clusterAnalysis: This directory contains the scripts which generate the analytical results.