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

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.AbstractLinkLoadComputer
      extended by be.ac.ulg.montefiore.run.totem.repository.MultiCommodityFlow.MultiCommodityFlow
All Implemented Interfaces:
LinkLoadComputer

public class MultiCommodityFlow
extends AbstractLinkLoadComputer

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)

Field Summary
 
Fields inherited from class be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.AbstractLinkLoadComputer
changeListener, domain
 
Constructor Summary
MultiCommodityFlow(Domain domain, TrafficMatrix tm)
           
MultiCommodityFlow(Domain domain, TrafficMatrix tm, java.lang.String dataFile, java.lang.String resultFile)
          Specify a data file and a result file
 
Method Summary
 java.lang.String createMCFMinMaxUtilDataFile(Domain domain, TrafficMatrix tm)
          Create the data file
 LoadData detachData()
          Returns the data used by the link load computer and do not use it internally any more.
 boolean equals(java.lang.Object o)
          returns true if the LinkLoadComputer uses the same parameters as the object o.
 LoadData getData()
          Returns a view of the data.
 java.lang.String getShortName()
          Return a string representing the parameters in short.
 java.util.List<TrafficMatrix> getTrafficMatrices()
          TODO: maybe change this to a set Returns the traffic matrix.
 int hashCode()
           
 void recompute()
          Recomputes the load data.
 java.lang.String toString()
           
 
Methods inherited from class be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.AbstractLinkLoadComputer
addListener, dataChanged, destroy, getDomain, invalidate, isUpToDate, removeListener, setUptoDate, startListening, stopListening, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiCommodityFlow

public MultiCommodityFlow(Domain domain,
                          TrafficMatrix tm)
                   throws java.io.IOException
Throws:
java.io.IOException

MultiCommodityFlow

public MultiCommodityFlow(Domain domain,
                          TrafficMatrix tm,
                          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

createMCFMinMaxUtilDataFile

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

Parameters:
domain -
tm -
Returns:
The absolute file path of the created file
Throws:
java.io.IOException
NodeNotFoundException
LinkNotFoundException

recompute

public void recompute()
Description copied from interface: LinkLoadComputer
Recomputes the load data.


toString

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

getTrafficMatrices

public java.util.List<TrafficMatrix> getTrafficMatrices()
Description copied from interface: LinkLoadComputer
TODO: maybe change this to a set Returns the traffic matrix.

Returns:

getShortName

public java.lang.String getShortName()
Description copied from interface: LinkLoadComputer
Return a string representing the parameters in short.

Returns:

equals

public boolean equals(java.lang.Object o)
Description copied from interface: LinkLoadComputer
returns true if the LinkLoadComputer uses the same parameters as the object o. (the computed data at a given moment are equivalent)

Specified by:
equals in interface LinkLoadComputer
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface LinkLoadComputer
Overrides:
hashCode in class java.lang.Object

getData

public LoadData getData()
Description copied from interface: LinkLoadComputer
Returns a view of the data. The returned data are still used internally.

Returns:

detachData

public LoadData detachData()
Description copied from interface: LinkLoadComputer
Returns the data used by the link load computer and do not use it internally any more. After the data has been detached, the load has to be computed again by a call to LinkLoadComputer.recompute().

Returns:


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