|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cm.osm2po.tsp.TspDefaultMatrix
public class TspDefaultMatrix
Default-Implementation / Erstellung einer Kostenmatrix auf Basis des osm2po-Routings.
Field Summary | |
---|---|
protected float[][] |
matrixCosts
|
protected int[][][] |
matrixPaths
|
Constructor Summary | |
---|---|
protected |
TspDefaultMatrix()
|
|
TspDefaultMatrix(Graph graph,
int[] vertexIds,
float maxCost,
Log log,
java.util.Properties params)
|
Method Summary | |
---|---|
static float |
calcMaxGeoDistance(Graph graph,
int[] vertexIds)
Berechnet die laengste geografische Distanz zwischen allen uebergebenen Vertices. |
float |
calcTourCosts(int[] tour,
int x,
int y,
float costLimit)
Berechnet die Kosten einer SubTour (Besuchsreihenfolge), bricht allerdings bereits mit Float.NaN
ab, sobald ein Kosten-Limit erreicht wird und somit keine
Verbesserung eintritt. |
int[] |
createFullMatrixTour(boolean asRing)
Erstellt eine Anfangskonfiguration fuer eine Tour auf der kompletten Matrix. |
float[][] |
getCosts()
Liefert alle Kosten der Matrix. |
int[][][] |
getPaths()
Liefert den Kosten zugrundeliegenden Pfade. |
int[][] |
getTourPaths(int[] tour)
Generiert aus einer Besuchsreihenfolge die entsprechenden Pfade. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected float[][] matrixCosts
protected int[][][] matrixPaths
Constructor Detail |
---|
protected TspDefaultMatrix()
public TspDefaultMatrix(Graph graph, int[] vertexIds, float maxCost, Log log, java.util.Properties params)
Method Detail |
---|
public static float calcMaxGeoDistance(Graph graph, int[] vertexIds)
graph
- Graph
vertexIds
- int[] Ids von Vertices
public final float[][] getCosts()
TspMatrix
getCosts
in interface TspMatrix
public final int[][][] getPaths()
public final int[] createFullMatrixTour(boolean asRing)
TspMatrix
createFullMatrixTour
in interface TspMatrix
asRing
- boolean true: Start = Ziel (TSP)
public final int[][] getTourPaths(int[] tour)
tour
- int[] Besuchsreihenfolge.
public final float calcTourCosts(int[] tour, int x, int y, float costLimit)
Float.NaN
ab, sobald ein Kosten-Limit erreicht wird und somit keine
Verbesserung eintritt.
calcTourCosts
in interface TspMatrix
tour
- int[] Besuchsreihenfolge.x
- StartIndex innerhalb der Toury
- EndIndex der TourcostLimit
- float Maximale Kosten, Abbruchkriterium.
Float.NaN
|
osm2po-core-5.0.0 (c) December 24 2014 Carsten Moeller - info@osm2po.de | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |