org.agmodel.bioinfo.antmap
Class Ant

java.lang.Object
  extended byorg.agmodel.bioinfo.antmap.Ant

public class Ant
extends java.lang.Object


Constructor Summary
Ant(AcoParamsBean params, int n_city, MersenneTwister rand)
          Construct an Ant object
 
Method Summary
 void depart(double[][] choice_info)
          Set out on a journey
 int[] getTourOrder()
          Get tour order
 void move(double[][] choice_info)
          Move to the next stop
 void prepareForJourney()
          Prepare for a journey
(Initialize flags for visited cities)
 void secretePheromone(double[][] tau)
          Secrete pheromone on the tau matrix
 void setTourLength(double length)
          Set tour length
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ant

public Ant(AcoParamsBean params,
           int n_city,
           MersenneTwister rand)
Construct an Ant object

Parameters:
params - ACO parameters
n_city - Number of cities
Method Detail

prepareForJourney

public void prepareForJourney()
Prepare for a journey
(Initialize flags for visited cities)


depart

public void depart(double[][] choice_info)
Set out on a journey

Parameters:
choice_info -

move

public void move(double[][] choice_info)
Move to the next stop

Parameters:
choice_info - Heuristic information for choosing city

getTourOrder

public int[] getTourOrder()
Get tour order

Returns:
Tour order

setTourLength

public void setTourLength(double length)
Set tour length

Parameters:
length - Tour length

secretePheromone

public void secretePheromone(double[][] tau)
Secrete pheromone on the tau matrix