|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbcds.phison.multfailures.SID<V,E>
bcds.phison.multfailures.SIDxPathFailures<V,E>
public class SIDxPathFailures<V,E>
This class reproduces the effects that the spreading of epidemics according to the SID model have on traffic in a path-oriented network. The methods are designed so that actions are not triggered automatically: the caller is responsible for activating the methods that disable links and remove affected connections.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class bcds.phison.multfailures.SID |
---|
SID.States |
Constructor Summary | |
---|---|
SIDxPathFailures(TED<V,E> ted,
float beta,
float delta_1,
float tau,
float delta_2)
Creates a new instance that will operate on the given graph and with given rates. |
Method Summary | |
---|---|
void |
actOnLinks(int clock)
Makes sure that all links whose nodes entered into the INFECTED or DISABLED states are also unavailable for traffic in the future. |
void |
actOnPaths()
Forcibly releases all connections that are affected by the the fact that a node went into the state DISABLED. |
java.util.Set<V> |
getNodesPerTransition(SID.States s1,
SID.States s2)
Returns the set of nodes that in this generation transitioned from the state s1 to the state s2 . |
java.util.Set<ConnectionInfo<V,E>> |
getRemovedConnections()
Returns the set of connections that were forcibly as a consequence of nodes entering the DISABLED state. |
void |
nextGeneration()
Produces a new generation of the epidemic by calling SID.nextGeneration() and
updates the information of which nodes transitioned from
one state to the other. |
Methods inherited from class bcds.phison.multfailures.SID |
---|
getCompartmentSizes, getPrevState, getRandomGen, getState, setRandomGen, setState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SIDxPathFailures(TED<V,E> ted, float beta, float delta_1, float tau, float delta_2)
SID.setRandomGen(java.util.Random)
.
Method Detail |
---|
public void nextGeneration()
SID.nextGeneration()
and
updates the information of which nodes transitioned from
one state to the other. Additionally, the set of connections
affected in the previous generation is cleared.
nextGeneration
in class SID<V,E>
public java.util.Set<V> getNodesPerTransition(SID.States s1, SID.States s2)
s1
to the state s2
.
The caller MUST NOT modify the returned set.
Returns null if the given transition is invalid according the
SID model (for example, DISABLED->INFECTED).
public void actOnLinks(int clock)
TED.retireBidiLinks(java.util.Collection)
.
Likewise, links that in the previous generation were
unavailable but are now back into operation, are reactivated
by calling TED.reinstallBidiLinks(java.util.Collection, int)
.
public void actOnPaths()
getRemovedConnections()
.
public java.util.Set<ConnectionInfo<V,E>> getRemovedConnections()
actOnPaths()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |