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

java.lang.Object
  extended by es.ants.felixgm.trmsim_wsn.trm.TRMParameters
      extended by es.ants.felixgm.trmsim_wsn.trm.lftm.LFTM_Parameters

public class LFTM_Parameters
extends TRMParameters

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

A LFTM parameters file has the following structure:

    ####################################
    # LFTM parameters file
    ####################################
    phi=0.01
    rho=0.87
    q0=0.45
    numAnts=0.35
    numIterations=0.59
    alpha=1.0
    beta=1.0
    initialPheromone=0.85
    pathLengthFactor=0.71
    transitionThreshold=0.66
    punishmentThreshold=0.48
    U_MIN=0.0
    U_MAX=1.0
    VH_A=0.7
    VH_B=0.9
    VH_C=1.0
    VH_D=1.0
    H_A=0.55
    H_B=0.7
    H_C=0.8
    H_D=0.9
    M_A=0.3
    M_B=0.45
    M_C=0.55
    M_D=0.7
    L_A=0.1
    L_B=0.2
    L_C=0.3
    L_D=0.45
    VL_A=0.0
    VL_B=0.0
    VL_C=0.1
    VL_D=0.3
 
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.4
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
LFTM_Parameters()
          Creates a new instance of LFTM_Parameters setting them to their default values
LFTM_Parameters(java.lang.String fileName)
          Creates a new instance of LFTM_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
static java.util.Collection<LinguisticTerm> get_linguisticTerms()
          Returns linguisticTerms 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
static double get_U_MAX()
          Returns U_MAX parameter value
static double get_U_MIN()
          Returns U_MIN parameter value
static FuzzyRuleSet getFRSClientSatisfaction(Variable clientConformity, Variable servicesComparison, Variable clientSatisfaction)
          This method returns the set of fuzzy rules which will determine the satisfaction of a client with the actually received service
static FuzzyRuleSet getFRSPunishmentReward(Variable clientGoodness, Variable clientSatisfaction, Variable punishmentReward)
          This method returns the set of fuzzy rules which will determine the punishment or reward degree to be applied over the selected service provider
static FuzzyRuleSet getFRSServerGoodnessNegative(Variable serverGoodness, Variable offeredServiceProperty, Variable givenServiceProperty)
          This method returns the set of fuzzy rules which will determine the value of the attribute of the service provided by a server, for those service attributes which improve when they decrease (for example, the price)
static FuzzyRuleSet getFRSServerGoodnessPositive(Variable serverGoodness, Variable offeredServiceProperty, Variable givenServiceProperty)
          This method returns the set of fuzzy rules which will determine the value of the attribute of the service provided by a server, for those service attributes which improve when they increase (for example, the quality)
static FuzzyRuleSet getFRSServicesAttributesNegative(Variable service1Property, Variable service2Property, Variable servicesPropertiesComparisson)
          This method returns the set of fuzzy rules corresponding to the comparison of those service attributes which improve when they decrease (for example, the price)
static FuzzyRuleSet getFRSServicesAttributesPositive(Variable service1Property, Variable service2Property, Variable servicesPropertiesComparisson)
          This method returns the set of fuzzy rules corresponding to the comparison of those service attributes which improve when they increase (for example, the quality)
 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_linguisticTerms(java.util.Collection<LinguisticTerm> _linguisticTerms)
          Sets a new linguisticTerms 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
 void set_U_MAX(double _U_MAX)
          Sets a new U_MAX parameter value
 void set_U_MIN(double _U_MIN)
          Sets a new U_MIN 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

LFTM_Parameters

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


LFTM_Parameters

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

Parameters:
fileName - LFTM 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

get_U_MIN

public static double get_U_MIN()
Returns U_MIN parameter value

Returns:
U_MIN parameter value

get_U_MAX

public static double get_U_MAX()
Returns U_MAX parameter value

Returns:
U_MAX parameter value

get_linguisticTerms

public static java.util.Collection<LinguisticTerm> get_linguisticTerms()
Returns linguisticTerms parameter value

Returns:
linguisticTerms 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

set_U_MIN

public void set_U_MIN(double _U_MIN)
Sets a new U_MIN parameter value

Parameters:
_U_MIN - New U_MIN parameter value

set_U_MAX

public void set_U_MAX(double _U_MAX)
Sets a new U_MAX parameter value

Parameters:
_U_MAX - New U_MAX parameter value

set_linguisticTerms

public void set_linguisticTerms(java.util.Collection<LinguisticTerm> _linguisticTerms)
Sets a new linguisticTerms parameter value

Parameters:
_linguisticTerms - New linguisticTerms parameter value

getFRSServicesAttributesPositive

public static FuzzyRuleSet getFRSServicesAttributesPositive(Variable service1Property,
                                                            Variable service2Property,
                                                            Variable servicesPropertiesComparisson)
This method returns the set of fuzzy rules corresponding to the comparison of those service attributes which improve when they increase (for example, the quality)

Parameters:
service1Property - Service 1's property or attribute (quality...)
service2Property - Service 2's property or attribute (quality...)
servicesPropertiesComparisson - Output fuzzy set that will contain the actual comparison between the two given service properties or attributes
Returns:
The set of fuzzy rules corresponding to the comparison of those service attributes which improve when they increase (for example, the price)

getFRSServicesAttributesNegative

public static FuzzyRuleSet getFRSServicesAttributesNegative(Variable service1Property,
                                                            Variable service2Property,
                                                            Variable servicesPropertiesComparisson)
This method returns the set of fuzzy rules corresponding to the comparison of those service attributes which improve when they decrease (for example, the price)

Parameters:
service1Property - Service 1's property or attribute (price, delivery time...)
service2Property - Service 2's property or attribute (price, delivery time...)
servicesPropertiesComparisson - Output fuzzy set that will contain the actual comparison between the two given service properties or attributes
Returns:
The set of fuzzy rules corresponding to the comparison of those service attributes which improve when they decrease (for example, the price)

getFRSServerGoodnessPositive

public static FuzzyRuleSet getFRSServerGoodnessPositive(Variable serverGoodness,
                                                        Variable offeredServiceProperty,
                                                        Variable givenServiceProperty)
This method returns the set of fuzzy rules which will determine the value of the attribute of the service provided by a server, for those service attributes which improve when they increase (for example, the quality)

Parameters:
serverGoodness - Goodness of the server providing the service
offeredServiceProperty - Property or attribute of the service offered by the server
givenServiceProperty - Output fuzzy set that will contain the value of the property or attribute of the service actually provided by the server
Returns:
The set of fuzzy rules which will determine the value of the attribute of the service provided by a server, for those service attributes which improve when they increase (for example, the quality)

getFRSServerGoodnessNegative

public static FuzzyRuleSet getFRSServerGoodnessNegative(Variable serverGoodness,
                                                        Variable offeredServiceProperty,
                                                        Variable givenServiceProperty)
This method returns the set of fuzzy rules which will determine the value of the attribute of the service provided by a server, for those service attributes which improve when they decrease (for example, the price)

Parameters:
serverGoodness - Goodness of the server providing the service
offeredServiceProperty - Property or attribute of the service offered by the server
givenServiceProperty - Output fuzzy set that will contain the value of the property or attribute of the service actually provided by the server
Returns:
The set of fuzzy rules which will determine the value of the attribute of the service provided by a server, for those service attributes which improve when they decrease (for example, the price)

getFRSClientSatisfaction

public static FuzzyRuleSet getFRSClientSatisfaction(Variable clientConformity,
                                                    Variable servicesComparison,
                                                    Variable clientSatisfaction)
This method returns the set of fuzzy rules which will determine the satisfaction of a client with the actually received service

Parameters:
clientConformity - Client's conformity
servicesComparison - Comparison between the requested service (the one initially offered by the server) and the actually received one
clientSatisfaction - Output fuzzy set that will contain the satisfaction of a client with the actually received service
Returns:
The set of fuzzy rules which determine the satisfaction of a client with the actually received service

getFRSPunishmentReward

public static FuzzyRuleSet getFRSPunishmentReward(Variable clientGoodness,
                                                  Variable clientSatisfaction,
                                                  Variable punishmentReward)
This method returns the set of fuzzy rules which will determine the punishment or reward degree to be applied over the selected service provider

Parameters:
clientGoodness - Client's goodness
clientSatisfaction - Satisfaction of a client with the actually received service
punishmentReward - Output fuzzy set that will contain the punishment or reward degree to be applied over the selected service provider
Returns:
The set of fuzzy rules which will determine the punishment or reward degree to be applied over the selected service provider

toString

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