bcds.phison.multfailures
Class PmSID<V,E>

java.lang.Object
  extended by bcds.phison.sim.PmBase<V,E>
      extended by bcds.phison.multfailures.PmSID<V,E>
All Implemented Interfaces:
ProcessingModule<V,E>, WithEnvParams

public class PmSID<V,E>
extends PmBase<V,E>

This module implements the spreading of epidemics. It receives five parameters:

The module starts the spreading of the epidemic at time step init_time. It initially infects i_size nodes, that are selected according to the sequencer given by the user.

Note that in this implementation the sequencer methods that need a (random) rnd parameter always receive the random generator instanciated in the simulator.

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
   PmSID.connections=false
   PmSID.itemize=false
   PmSID.init_time=0
   PmSID.i_size=3%
   PmSID.sequencer=SequencerDegree
   SID.beta=0.3
   SID.delta_1=0.1
   SID.tau=0.1
   SID.delta_2=0.04
   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=PmSID \
            mytopology.sgf
 

Author:
mmanzano

Field Summary
 java.lang.String CONNECTIONS
          See getEnvParams().
 java.lang.String I_SIZE
          See getEnvParams().
 java.lang.String INIT_TIME
          See getEnvParams().
 java.lang.String ITEMIZE
          See getEnvParams().
 java.lang.String SEQUENCER
          See getEnvParams().
 
Constructor Summary
PmSID()
           
 
Method Summary
 java.lang.Object[] getEnvParams()
          Returns the list of environment parameters and default values of this class.
 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

CONNECTIONS

public final java.lang.String CONNECTIONS
See getEnvParams().


ITEMIZE

public final java.lang.String ITEMIZE
See getEnvParams().


INIT_TIME

public final java.lang.String INIT_TIME
See getEnvParams().


I_SIZE

public final java.lang.String I_SIZE
See getEnvParams().


SEQUENCER

public final java.lang.String SEQUENCER
See getEnvParams().

Constructor Detail

PmSID

public PmSID()
Method Detail

setup

public void setup(SimCore<V,E> sim)
Description copied from class: PmBase
Saves the parameter sim, 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).

Specified by:
setup in interface ProcessingModule<V,E>
Overrides:
setup in class PmBase<V,E>

getEnvParams

public java.lang.Object[] getEnvParams()
Returns the list of environment parameters and default values of this class. They are prefixed by "PmSID and are:

Specified by:
getEnvParams in interface WithEnvParams
Overrides:
getEnvParams in class PmBase<V,E>