be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl
Class SPFLinkLoadStrategy

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.LinkLoadStrategyAdapter
      extended by be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.SPFLinkLoadStrategy
All Implemented Interfaces:
LinkLoadStrategy, TmLoadComputer

public class SPFLinkLoadStrategy
extends LinkLoadStrategyAdapter
implements LinkLoadStrategy

This class implements a link load computation using the SPF algorithms.

Creation date: 29-Jun-2005 11:49:41

Author:
Fabian Skivee (skivee@run.montefiore.ulg.ac.be), Jean Lepropre (lepropre@run.montefiore.ulg.ac.be)

Field Summary
 
Fields inherited from class be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.LinkLoadStrategyAdapter
ECMP, reuseComputedPath, spf, stopOnError
 
Constructor Summary
SPFLinkLoadStrategy()
           
 
Method Summary
static void calculateLoads(Domain domain, TrafficMatrix tm, double[] loads, java.util.List<java.util.List<Link>> links, float fraction, int src, int dst)
           
 double[] compute(Domain domain, TrafficMatrix tm)
          Compute the link load of the specified traffic matrix on the domain
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 
Methods inherited from class be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.LinkLoadStrategyAdapter
getSPFAlgo, isECMP, isReuseComputedPath, isStopOnError, setECMP, setReuseComputedPath, setSPFAlgo, setStopOnError, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface be.ac.ulg.montefiore.run.totem.trafficMatrix.model.LinkLoadStrategy
getSPFAlgo, isECMP, isReuseComputedPath, isStopOnError, setECMP, setReuseComputedPath, setSPFAlgo, setStopOnError, toString
 

Constructor Detail

SPFLinkLoadStrategy

public SPFLinkLoadStrategy()
Method Detail

compute

public double[] compute(Domain domain,
                        TrafficMatrix tm)
                 throws NoRouteToHostException,
                        RoutingException
Compute the link load of the specified traffic matrix on the domain

Specified by:
compute in interface TmLoadComputer
Parameters:
domain - the domain
tm - the traffic matrix to route
Returns:
the load of each link as an array of double
Throws:
NoRouteToHostException - occurs if there is no route from a source to a destination
RoutingException - occurs if the routing algorithms encounter a error

calculateLoads

public static void calculateLoads(Domain domain,
                                  TrafficMatrix tm,
                                  double[] loads,
                                  java.util.List<java.util.List<Link>> links,
                                  float fraction,
                                  int src,
                                  int dst)
                           throws LinkNotFoundException,
                                  NodeNotFoundException
Throws:
LinkNotFoundException
NodeNotFoundException

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface LinkLoadStrategy
Overrides:
equals in class LinkLoadStrategyAdapter

hashCode

public int hashCode()
Specified by:
hashCode in interface LinkLoadStrategy
Overrides:
hashCode in class LinkLoadStrategyAdapter


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