be.ac.ulg.montefiore.run.totem.repository.MultiCommodityFlow
Class MultiCommodityFlow

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.repository.MultiCommodityFlow.MultiCommodityFlow
All Implemented Interfaces:
TmLoadComputer

public class MultiCommodityFlow
extends java.lang.Object
implements TmLoadComputer

This implementation of the multi commodity flow algorithm compute the link load associated to a Domain and a TraffixMatrix. We use an AMPL model located in /resources/modelAMPL/mcf-min-maxUtil.mod. This model minimize the utilisation of the max utilised link. This class can only generate the data file or use the glpsol solver to compute the link load.

Two preferences are used :

Creation date: 4-Feb-2005

Author:
Fabian Skivee (skivee@run.montefiore.ulg.ac.be)

Constructor Summary
MultiCommodityFlow()
           
MultiCommodityFlow(java.lang.String dataFile, java.lang.String resultFile)
          Specify a data file and a result file
 
Method Summary
 double[] compute(Domain domain, TrafficMatrix tm)
          Compute the link load of the specified traffic matrix on the domain
 double[] computeCommodityFlow(Domain domain, TrafficMatrix tm)
          Compute the link utilisation produce by the MCF using glpsol
 void createMCFMinMaxUtilDataFile(Domain domain, TrafficMatrix tm)
          Create the data file
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiCommodityFlow

public MultiCommodityFlow()
                   throws java.io.IOException
Throws:
java.io.IOException

MultiCommodityFlow

public MultiCommodityFlow(java.lang.String dataFile,
                          java.lang.String resultFile)
                   throws java.io.IOException
Specify a data file and a result file

Parameters:
dataFile -
resultFile -
Throws:
java.io.IOException
Method Detail

computeCommodityFlow

public double[] computeCommodityFlow(Domain domain,
                                     TrafficMatrix tm)
                              throws java.io.IOException,
                                     LinkNotFoundException,
                                     NodeNotFoundException
Compute the link utilisation produce by the MCF using glpsol

Parameters:
domain -
tm -
Returns:
Throws:
java.io.IOException
LinkNotFoundException
NodeNotFoundException

createMCFMinMaxUtilDataFile

public void createMCFMinMaxUtilDataFile(Domain domain,
                                        TrafficMatrix tm)
                                 throws java.io.IOException,
                                        NodeNotFoundException,
                                        LinkNotFoundException
Create the data file

Parameters:
domain -
tm -
Throws:
java.io.IOException
NodeNotFoundException
LinkNotFoundException

compute

public double[] compute(Domain domain,
                        TrafficMatrix tm)
                 throws NoRouteToHostException,
                        RoutingException
Description copied from interface: TmLoadComputer
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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


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