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

java.lang.Object
  extended by es.ants.felixgm.trmsim_wsn.trm.TRMParameters
      extended by es.ants.felixgm.trmsim_wsn.trm.btrm_wsn.BTRM_WSN_Parameters

public class BTRM_WSN_Parameters
extends TRMParameters

This class represents the set of parameters' values of BTRM_WSN.

A BTRM-WSN parameters file has the following structure:

    ####################################
    # BTRM-WSN parameters file
    # Thu Jun 19 14:07:13 CEST 2008
    ####################################
    pathLengthFactor=0.71
    alpha=1.0
    phi=0.01
    initialPheromone=0.85
    q0=0.45
    numIterations=0.59
    punishmentThreshold=0.48
    rho=0.87
    beta=1.0
    numAnts=0.35
    transitionThreshold=0.66
 
This file can be downloaded here. But if any of the parameters can not be successfully extracted from the file, they are set to a default value.

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

Field Summary
static java.lang.String defaultParametersFileName
          Default parameters file name
 
Fields inherited from class es.ants.felixgm.trmsim_wsn.trm.TRMParameters
parameters, parametersFile, parametersFileHeader
 
Constructor Summary
BTRM_WSN_Parameters()
          Creates a new instance of BTRM_WSN_Parameters setting them to their default values
BTRM_WSN_Parameters(java.lang.String fileName)
          Creates a new instance of BTRM_WSN_Parameters from a given parameters file name
 
Method Summary
 double get_alpha()
          Returns alpha parameter value
 double get_beta()
          Returns beta parameter value
 double get_initialPheromone()
          Returns initialPheromone parameter value
 double get_numAnts()
          Returns numAnts parameter value
 double get_numIterations()
          Returns numIterations parameter value
 double get_pathLengthFactor()
          Returns pathLengthFactor parameter value
 double get_phi()
          Returns phi parameter value
 double get_punishmentThreshold()
          Returns punishmentThreshold parameter value
 double get_q0()
          Returns q0 parameter value
 double get_rho()
          Returns rho parameter value
 double get_transitionThreshold()
          Returns transitionThreshold parameter value
 void set_alpha(double alpha)
          Sets a new alpha parameter value
 void set_beta(double beta)
          Sets a new beta parameter value
 void set_initialPheromone(double initialPheromone)
          Sets a new initialPheromone parameter value
 void set_numAnts(double numAnts)
          Sets a new numAnts parameter value
 void set_numIterations(double numIterations)
          Sets a new numIterations parameter value
 void set_pathLengthFactor(double pathLengthFactor)
          Sets a new pathLengthFactor parameter value
 void set_phi(double phi)
          Sets a new phi parameter value
 void set_punishmentThreshold(double punishmentThreshold)
          Sets a new punishmentThreshold parameter value
 void set_q0(double q0)
          Sets a new q0 parameter value
 void set_rho(double rho)
          Sets a new rho parameter value
 void set_transitionThreshold(double transitionThreshold)
          Sets a new transitionThreshold parameter value
 java.lang.String toString()
           
 
Methods inherited from class es.ants.felixgm.trmsim_wsn.trm.TRMParameters
getBooleanParameter, getDoubleParameter, getIntegerParameter, getStringParameter, saveToFile, saveToFile, setBooleanParameter, setDoubleParameter, setIntegerParameter, setStringParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultParametersFileName

public static final java.lang.String defaultParametersFileName
Default parameters file name

See Also:
Constant Field Values
Constructor Detail

BTRM_WSN_Parameters

public BTRM_WSN_Parameters()
Creates a new instance of BTRM_WSN_Parameters setting them to their default values


BTRM_WSN_Parameters

public BTRM_WSN_Parameters(java.lang.String fileName)
                    throws java.lang.Exception
Creates a new instance of BTRM_WSN_Parameters from a given parameters file name

Parameters:
fileName - BTRM-WSN parameters file name
Throws:
java.lang.Exception - If any parameter can not be successfully retrieved
Method Detail

get_phi

public double get_phi()
Returns phi parameter value

Returns:
phi parameter value

get_rho

public double get_rho()
Returns rho parameter value

Returns:
rho parameter value

get_q0

public double get_q0()
Returns q0 parameter value

Returns:
q0 parameter value

get_alpha

public double get_alpha()
Returns alpha parameter value

Returns:
alpha parameter value

get_beta

public double get_beta()
Returns beta parameter value

Returns:
beta parameter value

get_numAnts

public double get_numAnts()
Returns numAnts parameter value

Returns:
numAnts parameter value

get_numIterations

public double get_numIterations()
Returns numIterations parameter value

Returns:
numIterations parameter value

get_initialPheromone

public double get_initialPheromone()
Returns initialPheromone parameter value

Returns:
initialPheromone parameter value

get_pathLengthFactor

public double get_pathLengthFactor()
Returns pathLengthFactor parameter value

Returns:
pathLengthFactor parameter value

get_transitionThreshold

public double get_transitionThreshold()
Returns transitionThreshold parameter value

Returns:
transitionThreshold parameter value

get_punishmentThreshold

public double get_punishmentThreshold()
Returns punishmentThreshold parameter value

Returns:
punishmentThreshold parameter value

set_phi

public void set_phi(double phi)
Sets a new phi parameter value

Parameters:
phi - New phi parameter value

set_rho

public void set_rho(double rho)
Sets a new rho parameter value

Parameters:
rho - New rho parameter value

set_q0

public void set_q0(double q0)
Sets a new q0 parameter value

Parameters:
q0 - New q0 parameter value

set_alpha

public void set_alpha(double alpha)
Sets a new alpha parameter value

Parameters:
alpha - New alpha parameter value

set_beta

public void set_beta(double beta)
Sets a new beta parameter value

Parameters:
beta - New beta parameter value

set_numAnts

public void set_numAnts(double numAnts)
Sets a new numAnts parameter value

Parameters:
numAnts - New numAnts parameter value

set_numIterations

public void set_numIterations(double numIterations)
Sets a new numIterations parameter value

Parameters:
numIterations - New numIterations parameter value

set_initialPheromone

public void set_initialPheromone(double initialPheromone)
Sets a new initialPheromone parameter value

Parameters:
initialPheromone - New initialPheromone parameter value

set_pathLengthFactor

public void set_pathLengthFactor(double pathLengthFactor)
Sets a new pathLengthFactor parameter value

Parameters:
pathLengthFactor - New pathLengthFactor parameter value

set_transitionThreshold

public void set_transitionThreshold(double transitionThreshold)
Sets a new transitionThreshold parameter value

Parameters:
transitionThreshold - New transitionThreshold parameter value

set_punishmentThreshold

public void set_punishmentThreshold(double punishmentThreshold)
Sets a new punishmentThreshold parameter value

Parameters:
punishmentThreshold - New punishmentThreshold parameter value

toString

public java.lang.String toString()
Specified by:
toString in class TRMParameters