|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.graph.vrp.VRPBase
A base class containing features common to many VRP algorithms.
Field Summary | |
protected boolean |
_closed
|
protected java.lang.Object |
_depotKey
|
protected java.lang.Object |
_edgeKey
|
protected GraphI |
_graph
|
protected double |
_maxCost
|
protected double |
_maxLoad
|
protected boolean |
_out
|
protected PropertiesI |
_properties
|
protected double |
_vehicleCost
|
Constructor Summary | |
VRPBase()
|
Method Summary | |
protected static java.util.Vector[] |
copyTours(java.util.Vector[] tours)
|
double |
getCost(VertexI from,
VertexI to)
Returns the cost of traveling between two vertices using the properties as appropriate. |
GraphI |
getGraph()
Gets the graph used by the algorithm. |
double |
getLoad(VertexI vert)
Returns the load at a vertex using the properties as appropriate. |
protected double[] |
getLoads(java.util.Vector[] tours)
|
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 used by the algorithm. |
void |
setProperties(PropertiesI properties)
Sets the edge properties object. |
void |
setVehicleCost(double vehicleCost)
Sets the vehicle cost. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected GraphI _graph
protected boolean _closed
protected boolean _out
protected java.lang.Object _edgeKey
protected java.lang.Object _depotKey
protected double _vehicleCost
protected double _maxCost
protected double _maxLoad
protected PropertiesI _properties
Constructor Detail |
public VRPBase()
Method Detail |
public double getLoad(VertexI vert)
public double getCost(VertexI from, VertexI to)
public void setGraph(GraphI graph)
public GraphI getGraph()
public void setVehicleCost(double vehicleCost)
public void setCostConstraint(double maxCostPerVehicle)
public void setCapacityConstraint(double maxLoadPerVehicle)
public void setProperties(PropertiesI properties)
public void setEdgeKey(java.lang.Object edgeKey)
protected static java.util.Vector[] copyTours(java.util.Vector[] tours)
protected double[] getLoads(java.util.Vector[] tours) throws SolutionNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |