Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


oracle.spatial.network.lod
Class TspOp2

java.lang.Object
  extended by oracle.spatial.network.lod.TspOp2

All Implemented Interfaces:
TSP

public class TspOp2
extends java.lang.Object
implements TSP

This class implements the op-2 heuristic algorithm for the Traveling-Salesman-Problem.

Since:
Oracle Database 11g Release 2 (11.2)

Nested Class Summary

 

Nested classes/interfaces inherited from interface oracle.spatial.network.lod.TSP
TSP.TourFlag

 

Constructor Summary
TspOp2(LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm, PairwiseCostCalculator pwcc)
          Constructs an op-2 tsp algorithm instance.
TspOp2(LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm, PairwiseCostCalculator pwcc, double tolerance)
          Constructs an op-2 tsp algorithm instance.

 

Method Summary
 TspPath tspPath(PointOnNet[][] points, TSP.TourFlag tourFlag, int linkLevel, LODNetworkConstraint constraint)
          Returns the traveling salesman tour with the optimal or suboptimal cost.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

TspOp2

public TspOp2(LinkCostCalculator[] lccs,
              NodeCostCalculator[] nccs,
              ShortestPath spAlgorithm,
              PairwiseCostCalculator pwcc)
Constructs an op-2 tsp algorithm instance. The tolerance for minimum cost improvement is set to the default value 1E-6.
Parameters:
lccs - link cost calculators
nccs - node cost calculators
spAlgorithm - shortest path algorithm to compute the cost between two points
pwcc - calculator to compute the cost between any two tsp points

TspOp2

public TspOp2(LinkCostCalculator[] lccs,
              NodeCostCalculator[] nccs,
              ShortestPath spAlgorithm,
              PairwiseCostCalculator pwcc,
              double tolerance)
Constructs an op-2 tsp algorithm instance.
Parameters:
lccs - link cost calculators
nccs - node cost calculators
spAlgorithm - shortest path algorithm to compute the cost between two points
pwcc - calculator to compute the cost between any two tsp points
tolerance - tolerance for minimum cost improvement

Method Detail

tspPath

public TspPath tspPath(PointOnNet[][] points,
                       TSP.TourFlag tourFlag,
                       int linkLevel,
                       LODNetworkConstraint constraint)
                throws LODNetworkException
Description copied from interface: TSP
Returns the traveling salesman tour with the optimal or suboptimal cost.
Specified by:
tspPath in interface TSP
Parameters:
points - points to visit on the TSP tour.
tourFlag - a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.
linkLevel - link level
constraint - network constraint
Throws:
LODNetworkException

Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


Copyright © 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.