drasys.or.graph.vrp
Interface VRPI

All Known Subinterfaces:
ConstructI, ImproveI

public interface VRPI

The interface used by all algorithms to access VRP algorithms.


Method Summary
 double getCost()
          Returns the total cost of the solution tours.
 double[] getCosts()
          Returns the cost of each of the solution tours.
 double[] getLoads()
          Returns the load for each of the solution tours.
 java.util.Vector[] getTours()
          Returns the solution tours generated by the algorithm.
 void setCapacityConstraint(double maxLoadPerVehicle)
          Sets the vehicle capacity constraint.
 void setCostConstraint(double maxCostPerVehicle)
          Sets the vehicle cost constraint.
 void setEdgeKey(java.lang.Object edgeKey)
          Sets the key used to select from parallel edges between vertices.
 void setGraph(GraphI graph)
          Sets the graph for the VRP algorithm.
 void setProperties(PropertiesI properties)
          Sets the properties object.
 void setVehicleCost(double vehicleCost)
          Sets the vehicle cost.
 

Method Detail

setGraph

public void setGraph(GraphI graph)
Sets the graph for the VRP algorithm.

setVehicleCost

public void setVehicleCost(double vehicleCost)
Sets the vehicle cost. Must be the same units as the edge traversal costs.

setCostConstraint

public void setCostConstraint(double maxCostPerVehicle)
Sets the vehicle cost constraint.

setCapacityConstraint

public void setCapacityConstraint(double maxLoadPerVehicle)
Sets the vehicle capacity constraint.

setProperties

public void setProperties(PropertiesI properties)
Sets the properties object.

setEdgeKey

public void setEdgeKey(java.lang.Object edgeKey)
Sets the key used to select from parallel edges between vertices. The default value for 'edgeKey' is null.

getCost

public double getCost()
               throws SolutionNotFoundException
Returns the total cost of the solution tours.
Throws:
VRPError - if no solution was created.

getCosts

public double[] getCosts()
                  throws SolutionNotFoundException
Returns the cost of each of the solution tours.
Throws:
VRPError - if no solution was created.

getLoads

public double[] getLoads()
                  throws SolutionNotFoundException
Returns the load for each of the solution tours.
Throws:
VRPError - if no solution was created.

getTours

public java.util.Vector[] getTours()
                            throws SolutionNotFoundException
Returns the solution tours generated by the algorithm. Each tour vector contains all the edges and the vertices in alternating order starting and ending with a vertex. The elements will always be arranged in the order of forward tour traversal.
Throws:
VRPError - if no solution was created.


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com