peersim.reports
Class RandRemoval

java.lang.Object
  extended by peersim.reports.GraphObserver
      extended by peersim.reports.RandRemoval
All Implemented Interfaces:
Control

public class RandRemoval
extends GraphObserver

It tests the network for robustness to random node removal. It does not actually remove nodes, it is only an observer, so can be applied several times during the simulation. A warning though: as a side effect it may shuffle the network (see "n") so if this is an issue, it should not be used, or only after the simulation has finished.


Parameter Summary
n
          This parameter defines the number of runs of the iterative removal procedure to get statistics.
 
Parameters inherited from class peersim.reports.GraphObserver
undir
 
Field Summary
 
Fields inherited from class peersim.reports.GraphObserver
g, ga, name, pid, undir
 
Constructor Summary
RandRemoval(java.lang.String name)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 boolean execute()
          Prints results of node removal tests.
 
Methods inherited from class peersim.reports.GraphObserver
updateGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

n

This parameter defines the number of runs of the iterative removal procedure to get statistics. Look out: if set to a value larger than 1 then as a side effect the overlay will be shuffled. Defaults to 1.

Constructor Detail

RandRemoval

public RandRemoval(java.lang.String name)
Standard constructor that reads the configuration parameters. Invoked by the simulation engine.

Parameters:
name - the configuration prefix for this class
Method Detail

execute

public boolean execute()
Prints results of node removal tests. The following experiment is repeated "n" times. From the graph 50%, 51%, ..., 99% of the nodes are removed at random. For all percentages it is calculated what is the maximal clustersize (weakly connected clusters) and the number of clusters in the remaining graph. These values are averaged over the experiments, and for all 50 different percentage values a line is printed that contains the respective averages, first the average maximal cluster size, followed by the average number of clusters.

Returns:
always false