Skip to content

Commit 0884698

Browse files
committed
GA ISB added
Signed-off-by: facaraff <[email protected]>
1 parent 15fba2a commit 0884698

File tree

4 files changed

+621
-608
lines changed

4 files changed

+621
-608
lines changed

src/algorithms/specialOptions/BIAS/DE.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public FTrend execute(Problem problem, int maxEvaluations) throws Exception
9898
int newID = 0;
9999
int bestID = -1;
100100

101-
writeHeader(" popSize "+populationSize+" F "+F+" CR "+CR+" alpha "+alpha, problem);
101+
writeHeader("popSize "+populationSize+" F "+F+" CR "+CR+" alpha "+alpha, problem);
102102

103103
String line = new String();
104104

src/algorithms/specialOptions/BIAS/GA.java

+10-7
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ public FTrend execute(Problem problem, int maxEvaluations) throws Exception
2424
{
2525
int populationSize = getParameter("p0").intValue();
2626
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
3031

3132
FTrend FT = new FTrend();
3233
int problemDimension = problem.getDimension();
@@ -45,9 +46,11 @@ public FTrend execute(Problem problem, int maxEvaluations) throws Exception
4546

4647

4748
if(this.selectionStrategy == 't')
48-
line+=" popSize "+populationSize+" nt "+nt;
49+
line+="popSize "+populationSize+" nt "+nt;
4950
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;
5154
else
5255
System.out.println("Unrecognised selection stratgy!");
5356

@@ -114,8 +117,8 @@ else if(this.mutationStrategy == 'g')
114117
while (i < maxEvaluations)
115118
{
116119

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);
119122
double[] child = GACrossovers(population[parent1], population[parent2], CR, d, crossoverStrategy, PRNGCounter);
120123

121124

0 commit comments

Comments
 (0)