com.c5corp.c5Algorithms
Class OtherPathHiker

java.lang.Object
  extended by com.c5corp.c5Algorithms.AbstractHiker
      extended by com.c5corp.c5Algorithms.OtherPathHiker

public class OtherPathHiker
extends AbstractHiker

The OtherPathHiker class extends AbstractHiker, but it in fact marshals many, many iterations of the RandomHiker algorithm, and it selects from among the many VirtualHikerTrackLogs thus produced that most closely match the input criteria, which in this class is another TrackLog. This class tries to most closely match the statistics of the input TrackLog. Note that the "natural selection" process from among tracks that are produced with the randomization algorithm in RandomHiker makes the algorithms in this class very compute intensive, and often yields slightly different results depending upon the good luck of the random hikers. However, it often provides much better lowest-cost-paths than the stepwise LcpHiker. OtherPathHiker also utilizes progressive back-off in an attempt to deliver a satisficing track.... still experimental.

Since:
2.0
See Also:
RandomHiker, LcpHiker

Field Summary
 
Fields inherited from class com.c5corp.c5Algorithms.AbstractHiker
CARDINAL_BITS, MOVE
 
Constructor Summary
OtherPathHiker(int zone, java.lang.String zoneChar, int easting, int northing, int eastingMeters, int northingMeters, TrackLog targetTrackLog, java.sql.Connection connection)
          Creates an OtherPathHiker from the UTM zone, the starting and target point, some padding (in meters) around the rectangular area specified by the two points, a target slope to search for, and a Connection object.
 
Method Summary
 VirtualHikerTrackLog getTrack()
          Returns a VirtualHikerTrackLog object containing the results of many, many iterations of the RandomHiker algorithm, and it selects from among the many VirtualHikerTrackLogs thus produced that most closely match the input criteria.
 
Methods inherited from class com.c5corp.c5Algorithms.AbstractHiker
calculateAzimuth, calculateCardinalDirection, getCardinalIndex, getDistance, getTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OtherPathHiker

public OtherPathHiker(int zone,
                      java.lang.String zoneChar,
                      int easting,
                      int northing,
                      int eastingMeters,
                      int northingMeters,
                      TrackLog targetTrackLog,
                      java.sql.Connection connection)
Creates an OtherPathHiker from the UTM zone, the starting and target point, some padding (in meters) around the rectangular area specified by the two points, a target slope to search for, and a Connection object. Note that this algorithm uses progressive back-off

Parameters:
zone - the UTM zone of the target area
zoneChar - the UTM grid zone designation character (GZD)
easting - of the sw corner
northing - of the sw corner
eastingMeters - meters east of the area to search
northingMeters - meters north of the area to search
connection - a connection object (see DbHelper)
targetTrackLog - the TrackLog to find the most similar for
See Also:
DbHelper
Method Detail

getTrack

public VirtualHikerTrackLog getTrack()
Returns a VirtualHikerTrackLog object containing the results of many, many iterations of the RandomHiker algorithm, and it selects from among the many VirtualHikerTrackLogs thus produced that most closely match the input criteria. Note that the "natural selection" process from among tracks that are produced with the randomization algorithm in RandomHiker makes this method both very compute intensive, and the results vary from run to run. It is a satisficing algorithm, not an optimizing one. It utilizes progressive back-off in an attempt to deliver a VirtualHikerTrackLog object with strong similarities to the TrackLog input in the constructor.

Specified by:
getTrack in class AbstractHiker
Returns:
a VirtualHikerTrackLog object containing the results of the artificial hike