es.ants.felixgm.trmsim_wsn.trm.lftm
Class LFTM_Link

java.lang.Object
  extended by es.ants.felixgm.trmsim_wsn.network.Link
      extended by es.ants.felixgm.trmsim_wsn.trm.lftm.LFTM_Link

public class LFTM_Link
extends Link

This class models a link between two sensors, with a certain trace of pheromone and a certain heuristic value.

Since:
0.4
Version:
0.4
Author:
Félix Gómez Mármol, Gregorio Martínez Pérez

Field Summary
protected  double heuristic
          Heuristic value of this link
static double MAX_PHEROMONE
          Maximum value for a pheromone trace: 0.999999
static double MIN_PHEROMONE
          Minimum value for a pheromone trace: 0.000001
protected  double pheromone
          Pheromone trace of this link
 
Fields inherited from class es.ants.felixgm.trmsim_wsn.network.Link
destination, source
 
Constructor Summary
LFTM_Link(LFTM_Sensor source, LFTM_Sensor destination)
          Class LFTM_Link constructor
 
Method Summary
 LFTM_Sensor get_destination()
          Retrives the destination sensor of this link
 double get_heuristic()
          Returns the heuristic value of this link
 double get_pheromone()
          Returns the pheromone trace of this link
 LFTM_Sensor get_source()
          Retrives the source sensor of this link
 void reset()
          Sets this link to an initial state
 void set_heuristic(double value)
          Sets the heuristic value of this link
static void set_initialPheromone(double initialPheromone)
          Sets the initial value of pheromone of this link
 void set_pheromone(double value)
          Sets the pheromone trace of this link
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_PHEROMONE

public static final double MAX_PHEROMONE
Maximum value for a pheromone trace: 0.999999


MIN_PHEROMONE

public static final double MIN_PHEROMONE
Minimum value for a pheromone trace: 0.000001


pheromone

protected double pheromone
Pheromone trace of this link


heuristic

protected double heuristic
Heuristic value of this link

Constructor Detail

LFTM_Link

public LFTM_Link(LFTM_Sensor source,
                 LFTM_Sensor destination)
Class LFTM_Link constructor

Parameters:
source - Source sensor of the link
destination - Destination sensor of the link
Method Detail

reset

public void reset()
Sets this link to an initial state


get_source

public LFTM_Sensor get_source()
Description copied from class: Link
Retrives the source sensor of this link

Overrides:
get_source in class Link
Returns:
The source sensor of this link

get_destination

public LFTM_Sensor get_destination()
Description copied from class: Link
Retrives the destination sensor of this link

Overrides:
get_destination in class Link
Returns:
The destination sensor of this link

get_pheromone

public double get_pheromone()
Returns the pheromone trace of this link

Returns:
The pheromone trace of this link

set_pheromone

public void set_pheromone(double value)
Sets the pheromone trace of this link

Parameters:
value - The new pheromone trace of this link

get_heuristic

public double get_heuristic()
Returns the heuristic value of this link

Returns:
The heuristic value of this link

set_heuristic

public void set_heuristic(double value)
Sets the heuristic value of this link

Parameters:
value - The new heuristic value of this link

set_initialPheromone

public static void set_initialPheromone(double initialPheromone)
Sets the initial value of pheromone of this link

Parameters:
initialPheromone - The new initial value of pheromone of this link