drasys.or.graph.vrp
Class ImproveWithTSP

java.lang.Object
  |
  +--drasys.or.graph.vrp.VRPBase
        |
        +--drasys.or.graph.vrp.ImproveBase
              |
              +--drasys.or.graph.vrp.ImproveWithTSP

public class ImproveWithTSP
extends ImproveBase
implements ImproveI

An implementations of a VRP improvement algorithm that uses a TSP subalgorithm to improve the vertex ordering of each tour in the solution.


Fields inherited from class drasys.or.graph.vrp.VRPBase
_closed, _depotKey, _edgeKey, _graph, _maxCost, _maxLoad, _out, _properties, _vehicleCost
 
Constructor Summary
ImproveWithTSP(ConstructI construct)
           
ImproveWithTSP(ImproveI improve)
           
 
Method Summary
 double getCost()
          Returns the total cost of the solution tours.
 double[] getCosts()
          Returns the cost of each tour in the solution.
 double[] getLoads()
          Returns the load for each tour in the solution.
 java.util.Vector[] getTours()
          Returns the solution tours generated by the algorithm.
 double improveClosedTours(java.util.Vector[] tours)
          Improve a solution with closed tours that begin and end at the depot vertex.
 double improveInboundTours(java.util.Vector[] tours)
          Improve a solution with open tours that begin at arbitrary vertices and end at the depot vertex.
 double improveOutboundTours(java.util.Vector[] tours)
          Improve a solution with open tours that begin at the depot vertex and end at arbitrary vertices.
 void setEdgeKey(java.lang.Object edgeKey)
          Sets the edge key for the improvement TSP algorithm.
 void setGraph(GraphI graph)
          Sets the graph for the improvement TSP algorithm.
 void setProperties(PropertiesI properties)
          Sets the edge properties object for the improvement TSP algorithm.
 
Methods inherited from class drasys.or.graph.vrp.VRPBase
copyTours, getCost, getGraph, getLoad, getLoads, setCapacityConstraint, setCostConstraint, setVehicleCost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImproveWithTSP

public ImproveWithTSP(ConstructI construct)

ImproveWithTSP

public ImproveWithTSP(ImproveI improve)
Method Detail

improveOutboundTours

public double improveOutboundTours(java.util.Vector[] tours)
                            throws SolutionNotFoundException
Improve a solution with open tours that begin at the depot vertex and end at arbitrary vertices.
Specified by:
improveOutboundTours in interface ImproveI

improveInboundTours

public double improveInboundTours(java.util.Vector[] tours)
                           throws SolutionNotFoundException
Improve a solution with open tours that begin at arbitrary vertices and end at the depot vertex.
Specified by:
improveInboundTours in interface ImproveI

improveClosedTours

public double improveClosedTours(java.util.Vector[] tours)
                          throws SolutionNotFoundException
Improve a solution with closed tours that begin and end at the depot vertex.
Specified by:
improveClosedTours in interface ImproveI

setGraph

public void setGraph(GraphI graph)
Sets the graph for the improvement TSP algorithm.
Overrides:
setGraph in class VRPBase

setEdgeKey

public void setEdgeKey(java.lang.Object edgeKey)
Sets the edge key for the improvement TSP algorithm. The default value for 'edgeKey' is null.
Overrides:
setEdgeKey in class VRPBase

setProperties

public void setProperties(PropertiesI properties)
Sets the edge properties object for the improvement TSP algorithm.
Overrides:
setProperties in class VRPBase

getTours

public java.util.Vector[] getTours()
                            throws SolutionNotFoundException
Description copied from interface: VRPI
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.
Tags copied from interface: VRPI
Throws:
VRPError - if no solution was created.

getCost

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

getCosts

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

getLoads

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


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