[go: nahoru, domu]

Skip to content

Commit

Permalink
mogwo copy
Browse files Browse the repository at this point in the history
  • Loading branch information
castellanos94 committed Jul 2, 2021
1 parent f02c930 commit 3b9b2d3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/com/castellanos94/algorithms/multi/MOGWO_O.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
public class MOGWO_O<S extends DoubleSolution> extends MOGWO<S> implements ExtraInformation {
protected IntervalOutrankingRelations<S> preferences;
protected HeapSort<S> heapSortSolutions;
/**

/**
* Default ArchiveSelection : AdaptiveGrid
*
* @see com.castellanos94.operators.impl.AdaptiveGrid
Expand Down Expand Up @@ -46,11 +47,11 @@ protected void selectLeader(ArrayList<S> solutions) {

calculateNetScore(solutions);
int index = 0;
alphaWolf = solutions.get(index++);
alphaWolf = (S) solutions.get(index++).copy();
boolean isBetaWolf = false, isDeltaWolf = false, wasCalculteNetScoreForWolves = false;
int wolfIndex = 0;
if (index < solutions.size()) {
betaWolf = solutions.get(index++);
betaWolf = (S) solutions.get(index++).copy();
} else {
calculateNetScore(this.wolves);
wasCalculteNetScoreForWolves = true;
Expand All @@ -60,7 +61,7 @@ protected void selectLeader(ArrayList<S> solutions) {
// Select delta and remove to exclude

if (index < solutions.size()) {
deltaWolf = solutions.get(index++);
deltaWolf = (S) solutions.get(index++).copy();
} else {
if (!wasCalculteNetScoreForWolves)
calculateNetScore(this.wolves);
Expand Down Expand Up @@ -98,8 +99,8 @@ protected void calculateNetScore(ArrayList<S> solutions) {

@Override
public String toString() {
return "MOGWO-O [MAX_ITERATIONS=" + MAX_ITERATIONS + ", nGrid=" + nGrid + ", Problem="
+ this.problem.toString() + "]";
return "MOGWO-O [MAX_ITERATIONS=" + MAX_ITERATIONS + ", nGrid=" + nGrid + ", Problem=" + this.problem.toString()
+ "]";
}

@Override
Expand Down

0 comments on commit 3b9b2d3

Please sign in to comment.