SSF.App.Worm
Class MacroscopicModel

java.lang.Object
  |
  +--com.renesys.raceway.SSF.Entity
        |
        +--SSF.App.Worm.MacroscopicModel

public class MacroscopicModel
extends com.renesys.raceway.SSF.Entity

Macroscopic model of the Internet, for modeling worm epidemics etc. Models the global infection spreading through "the whole Internet" at a macroscopic level, as opposed to selective parts where hosts and routers are modeled explicitly.

Assumes that the worm is spreading through random scanning, and models worm propagation through a deterministic discrete time epidemiological model. The MacroscopicModel class (singleton class) creates an internal macroscopic representation of the Internet at the interdomain level (AS level). The simplest representation is the "homogeneous model", where AS boundaries are ignored and the Internet as treated as one big network with homogeneous interactions. For someone interested in studying interactions between ASes it's necessary to "partition" the model up in ASes with a representation of the AS-level topology, in epidemic modeling terms this is know as a "stratified model". The ASGraph class handles loading an AS adjacency file and building the internal topology representation.

Each AS contains an object of class WormEpidemicState which handles the epidemic state of the AS. It also contains an object of class WormTrafficState that handles the state of worm scans generated by the worm.

TO DO:s


Field Summary
 boolean DEBUG
           
 RandomStream infRNG
          Infection RNG.
 java.lang.String infSeed
          Seed for infection RNG.
 float layoutRectSize
           
 ASGraph net
          Internet
static MacroscopicModel ref
          Global ref to this singleton object.
 boolean ssfHostsRegistered
           
 boolean ssfRoutersRegistered
           
 WormEpidemic wormModel
          Worm epidemic model (global).
 WormTraffic wormTraffic
          Worm-induced traffic model (global).
 
Constructor Summary
MacroscopicModel(java.lang.String topologyFile, java.lang.String rngSeed, boolean debugOn, java.lang.String epidemicClass, java.lang.String initializerClass, java.lang.String gammaClass, java.lang.String trafficClass, int s_0, int i_0, float _beta, float meanScanRate)
           
 
Method Summary
 float getTotalInfections()
          Get the total number of infectioned hosts in the whole system.
 void registerBorderRouter(GatewayProtocolSession _router, int asn)
          Register a border router, actually its RouterProtocolSession, with the global epidemic model.
 void registerHost(WormProtocolSession _host, int asn)
          Register a host, actually its WormProtocolSession, with the global epidemic model.
 float update(float newTime)
          Update the timestepped model.
 
Methods inherited from class com.renesys.raceway.SSF.Entity
alignment, alignTo, coalignedEntities, inChannels, init, joinAll, makeIndependent, now, outChannels, pauseAll, playRole, processes, resetSimulation, resumeAll, startAll, startAll, startClient, startClient, startServer, Vx, Yx
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

public static MacroscopicModel ref
Global ref to this singleton object.


net

public ASGraph net
Internet


wormModel

public WormEpidemic wormModel
Worm epidemic model (global).


wormTraffic

public WormTraffic wormTraffic
Worm-induced traffic model (global).


infRNG

public RandomStream infRNG
Infection RNG.


infSeed

public java.lang.String infSeed
Seed for infection RNG.


layoutRectSize

public float layoutRectSize

DEBUG

public boolean DEBUG

ssfHostsRegistered

public boolean ssfHostsRegistered

ssfRoutersRegistered

public boolean ssfRoutersRegistered
Constructor Detail

MacroscopicModel

public MacroscopicModel(java.lang.String topologyFile,
                        java.lang.String rngSeed,
                        boolean debugOn,
                        java.lang.String epidemicClass,
                        java.lang.String initializerClass,
                        java.lang.String gammaClass,
                        java.lang.String trafficClass,
                        int s_0,
                        int i_0,
                        float _beta,
                        float meanScanRate)
Parameters:
topologyFile - Adjacency list formatted file of interdomain topology. May be null for homogeneous model.
rngSeed - Seed string for infection RNG.
debugOn - Set to true for debug output.
epidemicClass - Name of class to implement the epidemic model.
initializerClass - Name of class to provide initialization code for epidemic model.
trafficClass - Name of class to implement the model of how much scan traffic is generated by the worm. May be null, meaning that traffic is not modeled.
s_0 - Initial number of susceptible (vulnerable) hosts.
i_0 - Initial number of infected hosts.
_beta - Overall infection parameter.
meanScanRate - Mean rate of scans [scans/s] generated by a single worm. (Used only if traffic model is used.)
Method Detail

registerHost

public void registerHost(WormProtocolSession _host,
                         int asn)
Register a host, actually its WormProtocolSession, with the global epidemic model.

Parameters:
_host - The calling host.
asn - AS number of the AS the host belongs to.

registerBorderRouter

public void registerBorderRouter(GatewayProtocolSession _router,
                                 int asn)
Register a border router, actually its RouterProtocolSession, with the global epidemic model.

Parameters:
_router - The calling router.
asn - AS number of the AS the router belongs to.

update

public float update(float newTime)
Update the timestepped model.

Parameters:
newTime - Step forward one step to this time (in hours).
Returns:
New simulation time.

getTotalInfections

public float getTotalInfections()
Get the total number of infectioned hosts in the whole system.