|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.ants.felixgm.trmsim_wsn.trm.TRMParameters
es.ants.felixgm.trmsim_wsn.trm.btrm_wsn.BTRM_WSN_Parameters
public class BTRM_WSN_Parameters
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.
| 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 |
|---|
public static final java.lang.String defaultParametersFileName
| Constructor Detail |
|---|
public BTRM_WSN_Parameters()
public BTRM_WSN_Parameters(java.lang.String fileName)
throws java.lang.Exception
fileName - BTRM-WSN parameters file name
java.lang.Exception - If any parameter can not be successfully retrieved| Method Detail |
|---|
public double get_phi()
public double get_rho()
public double get_q0()
public double get_alpha()
public double get_beta()
public double get_numAnts()
public double get_numIterations()
public double get_initialPheromone()
public double get_pathLengthFactor()
public double get_transitionThreshold()
public double get_punishmentThreshold()
public void set_phi(double phi)
phi - New phi parameter valuepublic void set_rho(double rho)
rho - New rho parameter valuepublic void set_q0(double q0)
q0 - New q0 parameter valuepublic void set_alpha(double alpha)
alpha - New alpha parameter valuepublic void set_beta(double beta)
beta - New beta parameter valuepublic void set_numAnts(double numAnts)
numAnts - New numAnts parameter valuepublic void set_numIterations(double numIterations)
numIterations - New numIterations parameter valuepublic void set_initialPheromone(double initialPheromone)
initialPheromone - New initialPheromone parameter valuepublic void set_pathLengthFactor(double pathLengthFactor)
pathLengthFactor - New pathLengthFactor parameter valuepublic void set_transitionThreshold(double transitionThreshold)
transitionThreshold - New transitionThreshold parameter valuepublic void set_punishmentThreshold(double punishmentThreshold)
punishmentThreshold - New punishmentThreshold parameter valuepublic java.lang.String toString()
toString in class TRMParameters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||