Class Configurator
java.lang.Object
com.adriangarcia.metaheuristics.tsmbfoa.Population
com.adriangarcia.metaheuristics.tsmbfoa.Configurator
Configurator class creates a new configuration of the TS-MBFOA
own parameters.
With its methods, the following are adjusted.
With its methods, the following are adjusted.
- Sb is the number of bacteria
- Nc is the number of chemotaxis cycles
- β is the scaling factor
- R is the stepsize
- Sr is the number of bacteria to reproduce
- Repcycle is the reproduction frequency
- GMAX is the number of generations
- Version:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor method to create a new instance of the Configurator class. -
Method Summary
Modifier and TypeMethodDescriptionint
Method returns the stored value for the Sr parameter of the TS-MBFOA.Method that returns a description of the population of each run.int
Method returns the stored value for the GMAX parameter of the TS-MBFOA.int
getNc()
Method returns the stored value for the Nc parameter of the TS-MBFOA.int
Method returns the stored value for the RepClycle parameter of the TS-MBFOA.double
Method returns the stored value for the β parameter of the TS-MBFOA.void
setBacteriaReproduce
(int bacteriaReproduce) Method that assigns value to the Sr parameter of the TS-MBFOA.
(sr) the number of bacteria to reproduce [1, Sb/2]void
setEvaluations
(int evaluations) Method that assigns value to the GMAX parameter of the TS-MBFOA.
The number of generations [10000, 30000]void
setNc
(int nc) Method that assigns value to the Nc parameter of the TS-MBFOA.
the number of chemotaxis cycles [1,Sb]void
setRepcycle
(int repcycle) Method that assigns value to the RepCycle parameter of the TS-MBFOA.
The reproduction frequency [1, GMAX/2]void
setScalingFactor
(double scalingFactor) Method that assigns value to the β parameter of the TS-MBFOA.
(β) the scaling factor [0,2]Methods inherited from class com.adriangarcia.metaheuristics.tsmbfoa.Population
getBacteriumMatix, getSb, getStepSize, setBacteriumMatix, setSb, setStepSize, sortPopulation, startPopulation
-
Constructor Details
-
Configurator
public Configurator()Constructor method to create a new instance of the Configurator class.
Does not receive parameters.
-
-
Method Details
-
getNc
public int getNc()Method returns the stored value for the Nc parameter of the TS-MBFOA.- Returns:
- value of parameter Nc
-
setNc
public void setNc(int nc) Method that assigns value to the Nc parameter of the TS-MBFOA.
the number of chemotaxis cycles [1,Sb]- Parameters:
nc
- the nc to set
-
getScalingFactor
public double getScalingFactor()Method returns the stored value for the β parameter of the TS-MBFOA.- Returns:
- value of parameter scalingFactor (β)
-
setScalingFactor
public void setScalingFactor(double scalingFactor) Method that assigns value to the β parameter of the TS-MBFOA.
(β) the scaling factor [0,2]- Parameters:
scalingFactor
- the scalingFactor (β) to set
-
getBacteriaReproduce
public int getBacteriaReproduce()Method returns the stored value for the Sr parameter of the TS-MBFOA.- Returns:
- value of parameter bacteriaReproduce (Sr)
-
setBacteriaReproduce
public void setBacteriaReproduce(int bacteriaReproduce) Method that assigns value to the Sr parameter of the TS-MBFOA.
(sr) the number of bacteria to reproduce [1, Sb/2]- Parameters:
bacteriaReproduce
- the bacteriaReproduce (Sr) to set
-
getRepcycle
public int getRepcycle()Method returns the stored value for the RepClycle parameter of the TS-MBFOA.- Returns:
- value of parameter repcycle
-
setRepcycle
public void setRepcycle(int repcycle) Method that assigns value to the RepCycle parameter of the TS-MBFOA.
The reproduction frequency [1, GMAX/2]- Parameters:
repcycle
- the repcycle to set
-
getEvaluations
public int getEvaluations()Method returns the stored value for the GMAX parameter of the TS-MBFOA.- Returns:
- value of parameter evaluations (GMAX)
-
setEvaluations
public void setEvaluations(int evaluations) Method that assigns value to the GMAX parameter of the TS-MBFOA.
The number of generations [10000, 30000]- Parameters:
evaluations
- the evaluations (GMAX) to set
-
getDescription
Method that returns a description of the population of each run.- Overrides:
getDescription
in classPopulation
- Returns:
- value
String
The invocation is as follows:
object.getDescription();
-