Multiobjective DE now makes sense and works after the DEMO scheme
This commit is contained in:
parent
bb67e727bb
commit
3af8d5cd25
@ -9,6 +9,7 @@ import eva2.server.go.enums.DETypeEnum;
|
|||||||
import eva2.server.go.individuals.AbstractEAIndividual;
|
import eva2.server.go.individuals.AbstractEAIndividual;
|
||||||
import eva2.server.go.individuals.InterfaceDataTypeDouble;
|
import eva2.server.go.individuals.InterfaceDataTypeDouble;
|
||||||
import eva2.server.go.operators.selection.replacement.ReplacementCrowding;
|
import eva2.server.go.operators.selection.replacement.ReplacementCrowding;
|
||||||
|
import eva2.server.go.operators.selection.replacement.ReplacementNondominatedSortingDistanceCrowding;
|
||||||
import eva2.server.go.populations.InterfaceSolutionSet;
|
import eva2.server.go.populations.InterfaceSolutionSet;
|
||||||
import eva2.server.go.populations.Population;
|
import eva2.server.go.populations.Population;
|
||||||
import eva2.server.go.populations.SolutionSet;
|
import eva2.server.go.populations.SolutionSet;
|
||||||
@ -463,9 +464,18 @@ public class DifferentialEvolution implements InterfaceOptimizer, java.io.Serial
|
|||||||
nextDoomed = getNextDoomed(m_Population, nextDoomed+1);
|
nextDoomed = getNextDoomed(m_Population, nextDoomed+1);
|
||||||
} else {
|
} else {
|
||||||
if (m_Problem instanceof AbstractMultiObjectiveOptimizationProblem) {
|
if (m_Problem instanceof AbstractMultiObjectiveOptimizationProblem) {
|
||||||
ReplacementCrowding repl = new ReplacementCrowding();
|
|
||||||
repl.insertIndividual(indy, m_Population, null);
|
if(indy.isDominatingDebConstraints(m_Population.getEAIndividual(index))){ //child dominates the parent replace the parent
|
||||||
} else {
|
m_Population.replaceIndividualAt(index, indy);
|
||||||
|
}else if(!(m_Population.getEAIndividual(index).isDominatingDebConstraints(indy))){ //do nothing if parent dominates the child use crowding if neither one dominates the other one
|
||||||
|
ReplacementNondominatedSortingDistanceCrowding repl =new ReplacementNondominatedSortingDistanceCrowding();
|
||||||
|
repl.insertIndividual(indy, m_Population, null);
|
||||||
|
}
|
||||||
|
// ReplacementCrowding repl = new ReplacementCrowding();
|
||||||
|
// repl.insertIndividual(indy, m_Population, null);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
// index = RNG.randomInt(0, this.m_Population.size()-1);
|
// index = RNG.randomInt(0, this.m_Population.size()-1);
|
||||||
if (!compareToParent) index = RNG.randomInt(0, this.m_Population.size()-1);
|
if (!compareToParent) index = RNG.randomInt(0, this.m_Population.size()-1);
|
||||||
orig = (AbstractEAIndividual)this.m_Population.get(index);
|
orig = (AbstractEAIndividual)this.m_Population.get(index);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user