@@ -24,9 +24,10 @@ public FTrend execute(Problem problem, int maxEvaluations) throws Exception
24
24
{
25
25
int populationSize = getParameter ("p0" ).intValue ();
26
26
int nt = getParameter ("p1" ).intValue ();
27
- double CR = getParameter ("p2" ).doubleValue ();
28
- double d = getParameter ("p3" ).doubleValue (); //fixed to 0.25 in Kononova 2015
29
- double md = getParameter ("p4" ).doubleValue (); //fixed to ; 0.01 in Kononova 2015
27
+ int pt = getParameter ("p2" ).intValue (); //selection probability for stochastic tournament
28
+ double CR = getParameter ("p3" ).doubleValue ();
29
+ double d = getParameter ("p4" ).doubleValue (); //fixed to 0.25 in Kononova 2015
30
+ double md = getParameter ("p5" ).doubleValue (); //fixed to ; 0.01 in Kononova 2015
30
31
31
32
FTrend FT = new FTrend ();
32
33
int problemDimension = problem .getDimension ();
@@ -45,9 +46,11 @@ public FTrend execute(Problem problem, int maxEvaluations) throws Exception
45
46
46
47
47
48
if (this .selectionStrategy == 't' )
48
- line +=" popSize " +populationSize +" nt " +nt ;
49
+ line +="popSize " +populationSize +" nt " +nt ;
49
50
else if (this .selectionStrategy == 'r' )
50
- line +=" popSize " +populationSize ;
51
+ line +="popSize " +populationSize ;
52
+ else if (this .selectionStrategy == 's' )
53
+ line +="popSize " +populationSize +" pt " +pt ;
51
54
else
52
55
System .out .println ("Unrecognised selection stratgy!" );
53
56
@@ -114,8 +117,8 @@ else if(this.mutationStrategy == 'g')
114
117
while (i < maxEvaluations )
115
118
{
116
119
117
- parent1 = GAParentSelections ( selectionStrategy , fitnesses , nt , PRNGCounter );
118
- parent2 = GAParentSelections ( selectionStrategy , fitnesses , nt ,PRNGCounter );
120
+ parent1 = GAParentSelections ( selectionStrategy , fitnesses , nt ,pt , PRNGCounter );
121
+ parent2 = GAParentSelections ( selectionStrategy , fitnesses , nt ,pt , PRNGCounter );
119
122
double [] child = GACrossovers (population [parent1 ], population [parent2 ], CR , d , crossoverStrategy , PRNGCounter );
120
123
121
124
0 commit comments