be.ac.ulg.montefiore.run.totem.topgen.traffic
Class TrafficGenerator

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.topgen.traffic.TrafficGenerator

Deprecated. Use TrafficGeneratorInterface and subclasses instead.

public class TrafficGenerator
extends java.lang.Object

This class implements a traffic generator using the traffic models.

Creation date: 2004

Author:
Jean Lepropre (lepropre@run.montefiore.ulg.ac.be)

Field Summary
static int MAX_TRIALS
          Deprecated.  
 
Constructor Summary
TrafficGenerator(int ASID, TrafficModel model, double fraction)
          Deprecated.  
TrafficGenerator(TrafficModel model, RoutingMatrix matrix)
          Deprecated. Initialises a newly created TrafficGenerator object.
TrafficGenerator(TrafficModel model, RoutingMatrix matrix, double fraction)
          Deprecated. Initialises a newly created TrafficGenerator object.
 
Method Summary
 void generate()
          Deprecated. generateTM()
 TrafficMatrix generateTM()
          Deprecated.  
 double getFraction()
          Deprecated. Returns the fraction of the pairs of nodes that will generate traffic.
 IntPair getIds(int column)
          Deprecated.  
 int getKey(int src, int dst)
          Deprecated.  
 double[] getLinkCounts()
          Deprecated. Returns the link counts vector.
 RoutingMatrix getMatrix()
          Deprecated. Returns the routing matrix of this traffic generator.
 double[] getTraffic()
          Deprecated. Returns the generated traffic.
 boolean isGenerateOnlyEdgeTraffic()
          Deprecated. Get the generateOnlyEdgeTraffic property value If generateOnlyEdgeTraffic is true, the generator generates traffic for nodes of type EDGE only otherwise it generates traffic for all pairs of nodes
 void setFraction(double fraction)
          Deprecated. Sets the fraction of the pairs of nodes that will generate traffic.
 void setGenerateOnlyEdgeTraffic(boolean generateOnlyEdgeTraffic)
          Deprecated. Set the generateOnlyEdgeTraffic property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_TRIALS

public static final int MAX_TRIALS
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

TrafficGenerator

public TrafficGenerator(int ASID,
                        TrafficModel model,
                        double fraction)
Deprecated. 

TrafficGenerator

public TrafficGenerator(TrafficModel model,
                        RoutingMatrix matrix)
Deprecated. 
Initialises a newly created TrafficGenerator object. All the pairs of nodes will generate traffic.

Parameters:
model - The traffic model to be used.
matrix - The routing matrix to be used.

TrafficGenerator

public TrafficGenerator(TrafficModel model,
                        RoutingMatrix matrix,
                        double fraction)
Deprecated. 
Initialises a newly created TrafficGenerator object.

Parameters:
model - The traffic model to be used.
matrix - The routing matrix to be used.
fraction - The fraction of the pairs of nodes that must generate traffic.
Throws:
java.lang.IllegalArgumentException - If fraction is equal to or lower than 0 or greater than 1.
Method Detail

getKey

public final int getKey(int src,
                        int dst)
Deprecated. 

getIds

public final IntPair getIds(int column)
Deprecated. 

isGenerateOnlyEdgeTraffic

public boolean isGenerateOnlyEdgeTraffic()
Deprecated. 
Get the generateOnlyEdgeTraffic property value If generateOnlyEdgeTraffic is true, the generator generates traffic for nodes of type EDGE only otherwise it generates traffic for all pairs of nodes

Returns:
the generateOnlyEdge property value

setGenerateOnlyEdgeTraffic

public void setGenerateOnlyEdgeTraffic(boolean generateOnlyEdgeTraffic)
Deprecated. 
Set the generateOnlyEdgeTraffic property value. If generateOnlyEdgeTraffic is true, the generator generates traffic for nodes of type EDGE only otherwise it generates traffic for all pairs of nodes

Parameters:
generateOnlyEdgeTraffic -

generate

public void generate()
              throws TrafficGenerationException
Deprecated. generateTM()

Generates traffic for TopologyManager.getInstance().getDomain() using model. This method ensures that the capacity of the links is sufficient. If this is not the case, it regenerates traffic. If after MAX_TRIALS, the method didn't arrive to generate traffic, it throws a TrafficGenerationException. Note that if fraction < 1, the pairs that generate traffic are selected randomly (using an uniform distribution).

Throws:
TrafficGenerationException

generateTM

public TrafficMatrix generateTM()
                         throws InvalidDomainException,
                                NodeNotFoundException,
                                NoRouteToHostException,
                                RoutingException,
                                DataConsistencyException
Deprecated. 
Throws:
InvalidDomainException
NodeNotFoundException
NoRouteToHostException
RoutingException
DataConsistencyException

getFraction

public double getFraction()
Deprecated. 
Returns the fraction of the pairs of nodes that will generate traffic.


getMatrix

public RoutingMatrix getMatrix()
Deprecated. 
Returns the routing matrix of this traffic generator.


getTraffic

public double[] getTraffic()
Deprecated. 
Returns the generated traffic. Let's name the returned array traffic. traffic[i] designates the traffic between the pair of nodes i. The ids of the pair of nodes i can be found using getMatrix().getIds(i).

Throws:
java.lang.IllegalStateException - If generate was not called, or if fraction is too small.

getLinkCounts

public double[] getLinkCounts()
Deprecated. 
Returns the link counts vector.

Throws:
java.lang.IllegalStateException - If generate was not called, or if fraction is too small.

setFraction

public void setFraction(double fraction)
Deprecated. 
Sets the fraction of the pairs of nodes that will generate traffic.

Throws:
java.lang.IllegalArgumentException - If fraction is equal to or lower than 0 or greater than 1.


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.