ants.gnutant
Class GnutantResourceDistribution

java.lang.Object
  |
  +--ants.gnutant.GnutantResourceDistribution
All Implemented Interfaces:
Clearable, ResourceDistribution

public class GnutantResourceDistribution
extends Object
implements ResourceDistribution

Classes implementing this interface are used to generate pre-defined resources at the beginning of a simulation.

Version:
$Revision: 1.5 $
Author:
Alberto Montresor

Field Summary
static String EXPONENTIAL
          If the Selection parameter assumes this value, resources are selected randomly (with exponential distribution) from the resource set.
static String PAR_INITIALDOCS
          String name of the parameter used to determine the inital number of documents to be installed at each nest.
static String PAR_MEAN
          String name of the parameter used to determine vary the mean of the keyword selection distribution.
static String PAR_SELECTION
          String name of the parameter used to determine the type of selection you can use.
static String UNIFORM
          If the Selection parameter assumes this value, resources are selected randomly (with uniform distribution) from the resource set.
 
Fields inherited from interface antsim.ResourceDistribution
NAME
 
Constructor Summary
GnutantResourceDistribution(Factory factory, String name)
           
 
Method Summary
 void clear()
          Restores the object to its initial state.
 void distributeResources(ResourceSet resourceSet, Peernet peernet)
          Distributes resources in a P2P network.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIFORM

public static final String UNIFORM
If the Selection parameter assumes this value, resources are selected randomly (with uniform distribution) from the resource set.

See Also:
Constant Field Values

EXPONENTIAL

public static final String EXPONENTIAL
If the Selection parameter assumes this value, resources are selected randomly (with exponential distribution) from the resource set.

See Also:
Constant Field Values

PAR_INITIALDOCS

public static final String PAR_INITIALDOCS
String name of the parameter used to determine the inital number of documents to be installed at each nest.

See Also:
Constant Field Values

PAR_SELECTION

public static final String PAR_SELECTION
String name of the parameter used to determine the type of selection you can use. The possible values are: "Sequntial", "Uniform", "Exponential"

See Also:
Constant Field Values

PAR_MEAN

public static final String PAR_MEAN
String name of the parameter used to determine vary the mean of the keyword selection distribution.

See Also:
Constant Field Values
Constructor Detail

GnutantResourceDistribution

public GnutantResourceDistribution(Factory factory,
                                   String name)
Method Detail

clear

public void clear()
Restores the object to its initial state.

Specified by:
clear in interface Clearable

distributeResources

public void distributeResources(ResourceSet resourceSet,
                                Peernet peernet)
Distributes resources in a P2P network.

Specified by:
distributeResources in interface ResourceDistribution