|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.graph.tsp.TSPBase | +--drasys.or.graph.tsp.Geni
An implementation of the 'GENI' construction portion of the composite TSP heuristic 'GENIUS'. The 'GENIUS' algorithm is described in a paper by Michel Gendreau, Alain Hertz, Gilbert Laporte which was published in 'Operations Research' Vol.40, No.6, November-December 1992.
Genius
Constructor Summary | |
Geni(int sizeOfNeighborhood)
Sets the neighborhood to the argument. |
|
Geni(int sizeOfNeighborhood,
GraphI graph)
Sets the neighborhood and the target graph. |
Method Summary | |
protected void |
addNeighbor(drasys.or.graph.tsp.Geni.Vert vv)
|
protected void |
addToTour(drasys.or.graph.tsp.Geni.Vert vv)
|
protected void |
applyForwardType1(drasys.or.graph.tsp.Geni.Vert v)
|
protected void |
applyForwardType2(drasys.or.graph.tsp.Geni.Vert v)
|
protected void |
applyReverseType1(drasys.or.graph.tsp.Geni.Vert v)
|
protected void |
applyReverseType2(drasys.or.graph.tsp.Geni.Vert v)
|
protected void |
applyType0(drasys.or.graph.tsp.Geni.Vert v)
|
protected double |
calcCost()
Returns the cost of the solution tour. |
protected int[] |
calcTour()
Returns the solution tour. |
protected boolean |
checkList()
|
protected void |
construct()
|
double |
constructClosedTour()
Construct a closed tour solution. |
double |
constructOpenTour()
Construct an open tour solution with arbitrary end points. |
double |
constructOpenTour(java.lang.Object originKey,
java.lang.Object destinationKey)
Construct a tour with explicit end points. |
double |
constructOpenTourFrom(java.lang.Object originKey)
Construct an open tour solution with an explicit origin and arbitrary destination. |
double |
constructOpenTourTo(java.lang.Object destinationKey)
Construct an open tour solution with an explicit destination and arbitrary origin. |
protected void |
costOfType0(int v,
drasys.or.graph.tsp.Geni.Vert vi)
|
protected void |
forwardCostOfInsertType1(int v,
drasys.or.graph.tsp.Geni.Vert vi,
drasys.or.graph.tsp.Geni.Vert vj,
drasys.or.graph.tsp.Geni.Vert vk)
|
protected void |
forwardCostOfInsertType2(int v,
drasys.or.graph.tsp.Geni.Vert vi,
drasys.or.graph.tsp.Geni.Vert vj,
drasys.or.graph.tsp.Geni.Vert vk,
drasys.or.graph.tsp.Geni.Vert vl)
|
protected void |
forwardFindBestInsert(drasys.or.graph.tsp.Geni.Vert vv)
|
protected void |
forwardFlip(drasys.or.graph.tsp.Geni.Vert beg,
drasys.or.graph.tsp.Geni.Vert end)
|
protected void |
forwardSequenceInsert(drasys.or.graph.tsp.Geni.Vert head)
|
protected void |
initTourGENI(int head,
int tail)
|
protected void |
newForwardEdge(drasys.or.graph.tsp.Geni.Vert from,
drasys.or.graph.tsp.Geni.Vert to)
|
protected void |
newReverseEdge(drasys.or.graph.tsp.Geni.Vert to,
drasys.or.graph.tsp.Geni.Vert from)
|
protected void |
reverseCostOfInsertType1(int v,
drasys.or.graph.tsp.Geni.Vert vi,
drasys.or.graph.tsp.Geni.Vert vj,
drasys.or.graph.tsp.Geni.Vert vk)
|
protected void |
reverseCostOfInsertType2(int v,
drasys.or.graph.tsp.Geni.Vert vi,
drasys.or.graph.tsp.Geni.Vert vj,
drasys.or.graph.tsp.Geni.Vert vk,
drasys.or.graph.tsp.Geni.Vert vl)
|
protected void |
reverseFindBestInsert(drasys.or.graph.tsp.Geni.Vert vv)
|
protected void |
reverseFlip(drasys.or.graph.tsp.Geni.Vert end,
drasys.or.graph.tsp.Geni.Vert beg)
|
protected void |
reverseSequenceInsert(drasys.or.graph.tsp.Geni.Vert tail)
|
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. |
java.lang.String |
toString()
|
Methods inherited from class drasys.or.graph.tsp.TSPBase |
checkChangeCount,
countVertices,
forwardCost,
getCost,
getTour,
initVertices,
initVertices,
reverseCost,
rotateClosedTour,
setEdgeKey,
setGraph,
setProperties |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Geni(int sizeOfNeighborhood)
public Geni(int sizeOfNeighborhood, GraphI graph)
Method Detail |
public double constructOpenTour(java.lang.Object originKey, java.lang.Object destinationKey) throws TourNotFoundException, VertexNotFoundException
public double constructOpenTourFrom(java.lang.Object originKey) throws TourNotFoundException, VertexNotFoundException
public double constructOpenTourTo(java.lang.Object destinationKey) throws TourNotFoundException, VertexNotFoundException
public double constructOpenTour() throws TourNotFoundException
public double constructClosedTour() throws TourNotFoundException
protected void initTourGENI(int head, int tail)
protected void construct() throws TourNotFoundException
protected double calcCost()
protected int[] calcTour()
protected boolean checkList()
protected void forwardFlip(drasys.or.graph.tsp.Geni.Vert beg, drasys.or.graph.tsp.Geni.Vert end)
protected void reverseFlip(drasys.or.graph.tsp.Geni.Vert end, drasys.or.graph.tsp.Geni.Vert beg)
protected void costOfType0(int v, drasys.or.graph.tsp.Geni.Vert vi)
protected void forwardCostOfInsertType1(int v, drasys.or.graph.tsp.Geni.Vert vi, drasys.or.graph.tsp.Geni.Vert vj, drasys.or.graph.tsp.Geni.Vert vk)
protected void forwardCostOfInsertType2(int v, drasys.or.graph.tsp.Geni.Vert vi, drasys.or.graph.tsp.Geni.Vert vj, drasys.or.graph.tsp.Geni.Vert vk, drasys.or.graph.tsp.Geni.Vert vl)
protected void reverseCostOfInsertType1(int v, drasys.or.graph.tsp.Geni.Vert vi, drasys.or.graph.tsp.Geni.Vert vj, drasys.or.graph.tsp.Geni.Vert vk)
protected void reverseCostOfInsertType2(int v, drasys.or.graph.tsp.Geni.Vert vi, drasys.or.graph.tsp.Geni.Vert vj, drasys.or.graph.tsp.Geni.Vert vk, drasys.or.graph.tsp.Geni.Vert vl)
protected void forwardFindBestInsert(drasys.or.graph.tsp.Geni.Vert vv)
protected void reverseFindBestInsert(drasys.or.graph.tsp.Geni.Vert vv)
protected void newForwardEdge(drasys.or.graph.tsp.Geni.Vert from, drasys.or.graph.tsp.Geni.Vert to)
protected void newReverseEdge(drasys.or.graph.tsp.Geni.Vert to, drasys.or.graph.tsp.Geni.Vert from)
protected void applyType0(drasys.or.graph.tsp.Geni.Vert v)
protected void applyForwardType1(drasys.or.graph.tsp.Geni.Vert v)
protected void applyForwardType2(drasys.or.graph.tsp.Geni.Vert v)
protected void applyReverseType1(drasys.or.graph.tsp.Geni.Vert v)
protected void applyReverseType2(drasys.or.graph.tsp.Geni.Vert v)
protected void addNeighbor(drasys.or.graph.tsp.Geni.Vert vv)
protected void addToTour(drasys.or.graph.tsp.Geni.Vert vv) throws TourNotFoundException
protected void forwardSequenceInsert(drasys.or.graph.tsp.Geni.Vert head)
protected void reverseSequenceInsert(drasys.or.graph.tsp.Geni.Vert tail)
public java.lang.String toString()
public void selectVertex(boolean[] select)
public void selectVertex(boolean select)
public void selectVertex(java.lang.Object key, boolean select) throws VertexNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |