es.ants.felixgm.trmsim_wsn.trm.btrm_wsn
Class BTRM_Link

java.lang.Object
  extended by es.ants.felixgm.trmsim_wsn.network.Link
      extended by es.ants.felixgm.trmsim_wsn.trm.btrm_wsn.BTRM_Link

public class BTRM_Link
extends Link

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

Since:
0.2
Version:
0.2
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.999
static double MIN_PHEROMONE
          Minimum value for a pheromone trace: 0.0010
protected  double pheromone
          Pheromone trace of this link
 
Fields inherited from class es.ants.felixgm.trmsim_wsn.network.Link
destination, source
 
Constructor Summary
BTRM_Link(BTRM_Sensor source, BTRM_Sensor destination)
          Class BTRM_Link constructor
 
Method Summary
 BTRM_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
 BTRM_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.999

See Also:
Constant Field Values

MIN_PHEROMONE

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

See Also:
Constant Field Values

pheromone

protected double pheromone
Pheromone trace of this link


heuristic

protected double heuristic
Heuristic value of this link

Constructor Detail

BTRM_Link

public BTRM_Link(BTRM_Sensor source,
                 BTRM_Sensor destination)
Class BTRM_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 BTRM_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 BTRM_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