bcds.phison.demo
Class DemoTwoTermReliability<V,E>

java.lang.Object
  extended by bcds.phison.demo.DemoTwoTermReliability<V,E>

public class DemoTwoTermReliability<V,E>
extends java.lang.Object

Prints the two-terminal reliability of a given topology for each number of nodes removed (from 0 to the vertex size). Optionally, a certain number of repetitions for each number of elements removed can be provided.

To determine connectivity, paths of unit capacity are found for each node-pair.

The average two-terminal reliability (A2TR) is the probability that a randomly chosen pair of nodes is connected. If the network is fully connected the value of A2TR is 1. Otherwise, it is the sum over the number of node pairs in every connected component divided by the total number of node pairs in the network. This ratio gives the fraction of node pairs that are connected to each other.

The output is as follows:

 # BEGIN topology
 topology_name
 # END topology
 # 
 # BEGIN values
 0 A2TR Stdev Count Min Max
 1 A2TR Stdev Count Min Max
 2 A2TR Stdev Count Min Max
 ...
 # END values
 

Author:
mmanzano

Constructor Summary
DemoTwoTermReliability()
           
 
Method Summary
 void createGraph()
          Reads the graph from the topology file.
static void main(java.lang.String[] args)
           
 void parseArgs(java.lang.String[] args)
          Checks the arguments passed to DemoTwoTermReliability.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemoTwoTermReliability

public DemoTwoTermReliability()
Method Detail

parseArgs

public void parseArgs(java.lang.String[] args)
Checks the arguments passed to DemoTwoTermReliability. The topology file name is needed. An optional number of repetitions (num_rep) for each number of elements removed can be also provided


createGraph

public void createGraph()
Reads the graph from the topology file.


run

public void run()
         throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)