be.ac.ulg.montefiore.run.totem.topgen.traffic.model
Class GravityTrafficModel

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.topgen.traffic.model.GravityTrafficModel
All Implemented Interfaces:
TrafficModel

public class GravityTrafficModel
extends java.lang.Object
implements TrafficModel

This class generates traffic using the gravity model.

Creation date: 2004

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

Constructor Summary
GravityTrafficModel(AttractionFactor attraction, RepulsionFactor repulsion, FrictionFactor friction, double scalingConstant)
          Initialises a newly created GravityTrafficModel object.
 
Method Summary
 double generate(Node origin, Node destination)
          Generates traffic using the gravity model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GravityTrafficModel

public GravityTrafficModel(AttractionFactor attraction,
                           RepulsionFactor repulsion,
                           FrictionFactor friction,
                           double scalingConstant)
Initialises a newly created GravityTrafficModel object.

Parameters:
attraction - The attraction factor.
repulsion - The repulsion factor.
friction - The friction factor.
scalingConstant - The scaling constant.
Method Detail

generate

public double generate(Node origin,
                       Node destination)
Generates traffic using the gravity model. All the parameters must be different from null.

Specified by:
generate in interface TrafficModel
Returns:
The amount of traffic between the two nodes.


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