|
||||||||||
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.PmSID<V,E>
public class PmSID<V,E>
This module implements the spreading of epidemics. It receives five parameters:
connections
: If true the epidemic spreading
is done taking into account connections
(SIDxPathFailures
), and
providing the consequent results. Otherwise, the spreading
is just focused on the node states
(SID
)
Default: false.
itemize
: the type of output. If true the
number of nodes in each state
SID.States
is printed at
each time step. Otherwise, number of nodes at the final
time step is provided. Note that if this option (when true)
is complemented with the parameter st_exporters
of
bcds.phison.sim.Sim a script to plot the itemized statistics
is generated.
Default: false.
init_time
: the time step in which the epidemic
begins. It should be equal or greater than 1.
Default: 1.
i_size
: initial size of infected nodes. 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.
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
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 |
---|
public final java.lang.String CONNECTIONS
getEnvParams()
.
public final java.lang.String ITEMIZE
getEnvParams()
.
public final java.lang.String INIT_TIME
getEnvParams()
.
public final java.lang.String I_SIZE
getEnvParams()
.
public final java.lang.String SEQUENCER
getEnvParams()
.
Constructor Detail |
---|
public PmSID()
Method Detail |
---|
public void setup(SimCore<V,E> sim)
PmBase
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).
setup
in interface ProcessingModule<V,E>
setup
in class PmBase<V,E>
public java.lang.Object[] getEnvParams()
connections
: If true the epidemic spreading
is done taking into account connections
(SIDxPathFailures
), and
providing the consequent results. Otherwise, the spreading
is just focused on the node states
(SID
)
Default: false.
itemize
: the type of output. If true the
number of nodes in each state
SID.States
is printed at
each time step. Otherwise, number of nodes at the final
time step is provided.
Default: false.
init_time
: the time step in which the epidemic
begins. It should be equal or greater than 1.
Default: 1.
i_size
: initial size of infected nodes. 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.
getEnvParams
in interface WithEnvParams
getEnvParams
in class PmBase<V,E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |