drasys.or.graph.vrp
Class ConstructBase

java.lang.Object
  |
  +--drasys.or.graph.vrp.VRPBase
        |
        +--drasys.or.graph.vrp.ConstructBase
Direct Known Subclasses:
BestOf, RandomizableBase

public abstract class ConstructBase
extends VRPBase

A base class containing features common to many construction VRP algorithms.


Field Summary
protected  boolean[] _selected
           
 
Fields inherited from class drasys.or.graph.vrp.VRPBase
_closed, _depotKey, _edgeKey, _graph, _maxCost, _maxLoad, _out, _properties, _vehicleCost
 
Constructor Summary
ConstructBase()
           
ConstructBase(ImproveI improveSubalgorithm)
           
 
Method Summary
 boolean isSelected(VertexI vertex)
          Returns true if the vertex is selected
 void selectVertex(boolean select)
          Selects all of the vertices in the graph to be in the tour if 'select' is true.
 void selectVertex(boolean[] select)
          Selects all of the vertices whose corresponding element in 'select' is true.
 void selectVertex(java.lang.Object key, boolean select)
          Selects the vertex to be in the tour if 'select' is true.
 void setEdgeKey(java.lang.Object edgeKey)
          Sets the key used to select from parallel edges between vertices.
 void setGraph(GraphI graph)
          Sets the graph used by the algorithm.
 void setProperties(PropertiesI properties)
          Sets the vrp properties object.
 int sizeOfSelected()
          Returns the number of selected vertices.
 
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
 

Field Detail

_selected

protected boolean[] _selected
Constructor Detail

ConstructBase

public ConstructBase()

ConstructBase

public ConstructBase(ImproveI improveSubalgorithm)
Method Detail

setGraph

public void setGraph(GraphI graph)
Sets the graph used by the algorithm.
Overrides:
setGraph in class VRPBase

setProperties

public void setProperties(PropertiesI properties)
Sets the vrp properties object.
Overrides:
setProperties in class VRPBase

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.
Overrides:
setEdgeKey in class VRPBase

sizeOfSelected

public int sizeOfSelected()
Returns the number of selected vertices.

isSelected

public boolean isSelected(VertexI vertex)
Returns true if the vertex is selected

selectVertex

public void selectVertex(boolean[] select)
Selects all of the vertices whose corresponding element in 'select' is true. Unselects all of the vertices whose corresponding element in 'select' is false. All of the vertices are selected by default when the algorithm is constructed.

selectVertex

public void selectVertex(boolean select)
Selects all of the vertices in the graph to be in the tour if 'select' is true. Unselects all of the vertices if 'select' is false. All of the vertices are selected by default when the algorithm is constructed.

selectVertex

public void selectVertex(java.lang.Object key,
                         boolean select)
                  throws VertexNotFoundException
Selects the vertex to be in the tour if 'select' is true. Unselects the vertex if 'select' is false. All of the vertices are selected by default when the algorithm is constructed.


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