| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbcds.phison.sim.PmBase<V,E>
bcds.phison.multfailures.PmStatic<V,E>
public class PmStatic<V,E>
This module implements static failures, which are defined as one-off failures that affect one or more elements (nodes or links) at any given point. It receives six parameters:
init_time: the time step in which the failure is provoked. It
        should be greater than 1. This parameter is mandatory because if no 
        value is provided it throws an IllegalArgumentException
        Default: 0.
  i_size: initial size of affected elements. It must be
        entered following the format: "number" or 
        "percentage%".
        Default: "1".
  sequencer: Name of the class to be used as sequencer,
      which must implement
      ElemsSequencer and which must
        support the specified target.
      Default: bcds.phison.multfailures.SequencerRandom.
  target: The type of elements to work with: one of
      node or link. If it is link, it is 
        always considered the graph as undirected.
      Default: node. 
  mttr_mu: The mean of the Log-normal distribution that represents
        the Mean Time to Repair (MTTR) of the network elements. It can be any 
        double value. With the default value elements are considered 
        to not have MTTR (once failed they never repair again).
        Default: Double.POSITIVE_INFINITY.
  mttr_sigma The standard deviation of the Log-normal distribution
        that represents the MTTR of the network elements.
        Default: 0.
 i_size elements at time step
 init_time. Elements are selected according to the 
 sequencer given by the user. Elements can be nodes or links,
 depending on target.
 
 
 The MTTR represents the average time required to repair a 
 failed element. According to [1] and other online materials, 
 the MTTR is usually treated as a log-normal random variable.
 In order to assign a MTTR to each element of the network, this 
 module uses RndLogNormal, which needs a mean
 (mttr_mu) and a standard deviation (mttr_sigma). In the 
 example shown below, the 9 given to mttr_mu could 
 be related with any time unit, for example, hours.
 
 
The output of the module are, as a consequence of the failure:
Although this is a "processing module", it is intended to be used primarily alone. Thus, a typical way to invoke it through Sim from command-line is:
   (cat <<END
   PmStatic.target=node
   PmStatic.init_time=1
   PmStatic.i_size=3%
   PmStatic.sequencer=SequencerDegree
   PmStatic.mttr_mu=9
   PmStatic.mttr_sigma=0.5
   END
   ) | java -jar phison.jar Sim -env_file=- -stdm=false -q \
            -num_rep=10 rep_out=some_file_{%d}.out -maxtime=100 \
            -mp=bcds.phison.multfailures \
            -modules=PmStatic \
            mytopology.sgf
  
 
 References:
 [1] http://www.nasa.gov/offices/oce/llis/0840.html
| Nested Class Summary | |
|---|---|
| static class | PmStatic.StatesThe possible states of each element. | 
| Field Summary | |
|---|---|
|  java.lang.String | I_SIZESee getEnvParams(). | 
|  java.lang.String | INIT_TIMESee getEnvParams(). | 
|  java.lang.String | MTTR_MUSee getEnvParams(). | 
|  java.lang.String | MTTR_SIGMASee getEnvParams(). | 
|  java.lang.String | SEQUENCERSee getEnvParams(). | 
|  java.lang.String | TARGETSee getEnvParams(). | 
| Constructor Summary | |
|---|---|
| PmStatic() | |
| Method Summary | |
|---|---|
|  void | actOnPaths(java.util.HashSet<E> links)Forcibly releases all connections that are affected by the the fact that a element went into the state NOK. | 
|  void | collectConnectionsStats()Collects the lost connections statistics for this module. | 
|  java.lang.Object[] | getEnvParams()Returns the list of environment parameters and default values of this class. | 
|  void | reinstallLinks(java.util.HashSet<E> links,
               int clock)Links that in the previous time steps were unavailable but are now back into operation, are reactivated by calling TED.reinstallBidiLinks(java.util.Collection. | 
|  void | retireLinks(java.util.HashSet<E> links)Makes sure that all links are unavailable for traffic in the future. | 
|  void | setup(SimCore<V,E> sim)Saves the parameter sim, which can later be obtained by
 calling the sim() method. | 
| Methods inherited from class bcds.phison.sim.PmBase | 
|---|
| ctx, env, getEnviron, getId, getName, opt, run, shutdown, sim, stats | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public final java.lang.String INIT_TIME
getEnvParams().
public final java.lang.String I_SIZE
getEnvParams().
public final java.lang.String SEQUENCER
getEnvParams().
public final java.lang.String TARGET
getEnvParams().
public final java.lang.String MTTR_MU
getEnvParams().
public final java.lang.String MTTR_SIGMA
getEnvParams().
| Constructor Detail | 
|---|
public PmStatic()
| Method Detail | 
|---|
public void setup(SimCore<V,E> sim)
PmBasesim, which can later be obtained by
 calling the sim() method. It also calls
 adaptTypes if the environment object is non-null (which should
 normally be).
setup in interface ProcessingModule<V,E>setup in class PmBase<V,E>public void collectConnectionsStats()
public void retireLinks(java.util.HashSet<E> links)
TED.retireBidiLinks(java.util.Collection) .
public void reinstallLinks(java.util.HashSet<E> links,
                           int clock)
TED.reinstallBidiLinks(java.util.Collection, int) .
public void actOnPaths(java.util.HashSet<E> links)
public java.lang.Object[] getEnvParams()
init_time: the time step in which the failure is provoked. 
        It should be greater than 1. This parameter is mandatory because 
        if no value is provided it throws an IllegalArgumentException
        Default: 0.
  i_size: initial size of affected elements. It must be
        entered following the format: "number" or 
        "percentage%".
        Default: "1".
  sequencer: Name of the class to be used as sequencer,
      which must implement
      ElemsSequencer.
      Default: bcds.phison.multfailures.SequencerRandom.
  target: The type of elements to work with: one of
      node or link. 
      Default: node. 
   mttr_mu: The mean of the Log-normal distribution that represents
        the Mean Time to Repair (MTTR) of the network elements. It can be any 
        double value. With the default value elements are considered 
        to not have MTTR (once failed they never repair again).
        Default: Double.POSITIVE_INFINITY.
  mttr_sigma The standard deviation of the Log-normal distribution
        that represents the MTTR of the network elements.
        Default: 0.
 
getEnvParams in interface WithEnvParamsgetEnvParams in class PmBase<V,E>| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||