parent
e9bd1becf1
commit
d8a169eb10
@ -15,6 +15,7 @@ import eva2.optimization.problems.B1Problem;
|
|||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.Pair;
|
import eva2.tools.Pair;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
@ -22,12 +23,12 @@ import java.util.BitSet;
|
|||||||
/**
|
/**
|
||||||
* A BinaryScatterSearch implementation taken mainly from [i].
|
* A BinaryScatterSearch implementation taken mainly from [i].
|
||||||
*
|
*
|
||||||
* @author Alex
|
|
||||||
* <p/>
|
* <p/>
|
||||||
* F. Gortazar, A. Duarte, M. Laguna and R. Marti: Black Box Scatter Search for
|
* F. Gortazar, A. Duarte, M. Laguna and R. Marti: Black Box Scatter Search for
|
||||||
* General Classes of Binary Optimization Problems Computers and Operations
|
* General Classes of Binary Optimization Problems Computers and Operations
|
||||||
* research, vol. 37, no. 11, pp. 1977-1986 (2010)
|
* research, vol. 37, no. 11, pp. 1977-1986 (2010)
|
||||||
*/
|
*/
|
||||||
|
@Description("A basic implementation of a Binary ScatterSearch")
|
||||||
public class BinaryScatterSearch implements InterfaceOptimizer, java.io.Serializable, InterfacePopulationChangedEventListener {
|
public class BinaryScatterSearch implements InterfaceOptimizer, java.io.Serializable, InterfacePopulationChangedEventListener {
|
||||||
|
|
||||||
private static boolean TRACE = false;
|
private static boolean TRACE = false;
|
||||||
@ -910,8 +911,4 @@ public class BinaryScatterSearch implements InterfaceOptimizer, java.io.Serializ
|
|||||||
public String perCentSecondGenMethodTipText() {
|
public String perCentSecondGenMethodTipText() {
|
||||||
return "The number of individuals generated with the second Generation Method. The percentage, that is not covered with the first and the second method will be covered with a third method";
|
return "The number of individuals generated with the second Generation Method. The percentage, that is not covered with the first and the second method will be covered with a third method";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "A basic implementation of a Binary ScatterSearch";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,11 @@ import eva2.optimization.problems.InterfaceOptimizationProblem;
|
|||||||
import eva2.optimization.problems.InterfaceProblemDouble;
|
import eva2.optimization.problems.InterfaceProblemDouble;
|
||||||
import eva2.tools.EVAERROR;
|
import eva2.tools.EVAERROR;
|
||||||
import eva2.tools.ToolBox;
|
import eva2.tools.ToolBox;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Description("A CBN-EA variant employing PSO and dynamic variation of the clustering parameter by default.")
|
||||||
public class CBNPSO extends ClusterBasedNichingEA implements Serializable {
|
public class CBNPSO extends ClusterBasedNichingEA implements Serializable {
|
||||||
private boolean forceUpperClustDist = true;
|
private boolean forceUpperClustDist = true;
|
||||||
|
|
||||||
@ -158,10 +160,6 @@ public class CBNPSO extends ClusterBasedNichingEA implements Serializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "A CBN-EA variant employing PSO and dynamic variation of the clustering parameter by default.";
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setForceUpperClustDist(boolean forceUpperClustDist) {
|
public void setForceUpperClustDist(boolean forceUpperClustDist) {
|
||||||
this.forceUpperClustDist = forceUpperClustDist;
|
this.forceUpperClustDist = forceUpperClustDist;
|
||||||
}
|
}
|
||||||
|
@ -22,15 +22,10 @@ import java.util.BitSet;
|
|||||||
* able to make it competitive to a standard GA.. *sigh* This is a
|
* able to make it competitive to a standard GA.. *sigh* This is a
|
||||||
* implementation of the CHC Adaptive Search Algorithm (Cross generational
|
* implementation of the CHC Adaptive Search Algorithm (Cross generational
|
||||||
* elitist selection, Heterogeneous recombination and Cataclysmic mutation).
|
* elitist selection, Heterogeneous recombination and Cataclysmic mutation).
|
||||||
* Citation:
|
|
||||||
* <p/>
|
|
||||||
* Copyright: Copyright (c) 2003 Company: University of Tuebingen, Computer
|
|
||||||
* Architecture
|
|
||||||
*
|
*
|
||||||
* @author Felix Streichert
|
* ToDo: Check implementation for correctness.
|
||||||
* @version: $Revision: 307 $ $Date: 2007-12-04 14:31:47 +0100 (Tue, 04 Dec
|
|
||||||
* 2007) $ $Author: mkron $
|
|
||||||
*/
|
*/
|
||||||
|
@eva2.util.annotation.Description("This is an implementation of the CHC Adaptive Search Algorithm by Eselman.")
|
||||||
public class CHCAdaptiveSearchAlgorithm implements InterfaceOptimizer, java.io.Serializable {
|
public class CHCAdaptiveSearchAlgorithm implements InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
private double initialDifferenceThreshold = 0.25;
|
private double initialDifferenceThreshold = 0.25;
|
||||||
@ -310,19 +305,6 @@ public class CHCAdaptiveSearchAlgorithm implements InterfaceOptimizer, java.io.S
|
|||||||
return this.identifier;
|
return this.identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "This is an implementation of the CHC Adaptive Search Algorithm by Eselman.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -26,6 +26,7 @@ import eva2.optimization.problems.*;
|
|||||||
import eva2.tools.EVAERROR;
|
import eva2.tools.EVAERROR;
|
||||||
import eva2.tools.chart2d.*;
|
import eva2.tools.chart2d.*;
|
||||||
import eva2.tools.math.Mathematics;
|
import eva2.tools.math.Mathematics;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@ -41,17 +42,13 @@ import java.util.*;
|
|||||||
* For the CBN-PSO remember to use the IndividualDataMetric so that the
|
* For the CBN-PSO remember to use the IndividualDataMetric so that the
|
||||||
* remembered positions are used for clustering (which are rel. stable - so that
|
* remembered positions are used for clustering (which are rel. stable - so that
|
||||||
* species clustering actually makes sense).
|
* species clustering actually makes sense).
|
||||||
* <p/>
|
|
||||||
* Copyright: Copyright (c) 2010 Company: University of Tuebingen, Computer
|
|
||||||
* Architecture
|
|
||||||
*
|
|
||||||
* @author Felix Streichert, Marcel Kronfeld
|
|
||||||
*/
|
*/
|
||||||
|
@Description("This is a versatile species based niching EA method.")
|
||||||
public class ClusterBasedNichingEA implements InterfacePopulationChangedEventListener, InterfaceAdditionalPopulationInformer, InterfaceOptimizer, java.io.Serializable {
|
public class ClusterBasedNichingEA implements InterfacePopulationChangedEventListener, InterfaceAdditionalPopulationInformer, InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -3143069327594708609L;
|
private static final long serialVersionUID = -3143069327594708609L;
|
||||||
private Population population = new Population();
|
private Population population = new Population();
|
||||||
private transient Population poulationArchive = new Population();
|
private transient Population populationArchive = new Population();
|
||||||
private ArrayList<Population> species = new ArrayList<Population>();
|
private ArrayList<Population> species = new ArrayList<Population>();
|
||||||
private Population undifferentiatedPopulation = new Population();
|
private Population undifferentiatedPopulation = new Population();
|
||||||
private transient Population doomedPopulation = new Population();
|
private transient Population doomedPopulation = new Population();
|
||||||
@ -127,7 +124,7 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
public ClusterBasedNichingEA(ClusterBasedNichingEA a) {
|
public ClusterBasedNichingEA(ClusterBasedNichingEA a) {
|
||||||
this.epsilonBound = a.epsilonBound;
|
this.epsilonBound = a.epsilonBound;
|
||||||
this.population = (Population) a.population.clone();
|
this.population = (Population) a.population.clone();
|
||||||
this.poulationArchive = (Population) a.poulationArchive.clone();
|
this.populationArchive = (Population) a.populationArchive.clone();
|
||||||
this.doomedPopulation = (Population) a.doomedPopulation.clone();
|
this.doomedPopulation = (Population) a.doomedPopulation.clone();
|
||||||
this.optimizationProblem = (InterfaceOptimizationProblem) a.optimizationProblem.clone();
|
this.optimizationProblem = (InterfaceOptimizationProblem) a.optimizationProblem.clone();
|
||||||
this.optimizer = (InterfaceOptimizer) a.optimizer.clone();
|
this.optimizer = (InterfaceOptimizer) a.optimizer.clone();
|
||||||
@ -199,7 +196,7 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
this.optimizer.addPopulationChangedEventListener(this);
|
this.optimizer.addPopulationChangedEventListener(this);
|
||||||
this.undifferentiatedPopulation.setTargetSize(this.populationSize);
|
this.undifferentiatedPopulation.setTargetSize(this.populationSize);
|
||||||
this.species = new ArrayList<Population>();
|
this.species = new ArrayList<Population>();
|
||||||
this.poulationArchive = undifferentiatedPopulation.cloneWithoutInds();
|
this.populationArchive = undifferentiatedPopulation.cloneWithoutInds();
|
||||||
// if (useDistraction) distraction = new Distraction(distrDefaultStrength, Distraction.METH_BEST);
|
// if (useDistraction) distraction = new Distraction(distrDefaultStrength, Distraction.METH_BEST);
|
||||||
convergedCnt = 0;
|
convergedCnt = 0;
|
||||||
collisions = 0;
|
collisions = 0;
|
||||||
@ -296,8 +293,8 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
plotPopConnected(topologyPlot, pop);
|
plotPopConnected(topologyPlot, pop);
|
||||||
}
|
}
|
||||||
if (!useDistraction) {
|
if (!useDistraction) {
|
||||||
for (int i = 0; i < this.poulationArchive.size(); i++) {
|
for (int i = 0; i < this.populationArchive.size(); i++) {
|
||||||
plotIndy(topologyPlot, 'x', (InterfaceDataTypeDouble) poulationArchive.get(i));
|
plotIndy(topologyPlot, 'x', (InterfaceDataTypeDouble) populationArchive.get(i));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// for (int i = 0; i < this.distraction.getDistractorSetSize(); i++) {
|
// for (int i = 0; i < this.distraction.getDistractorSetSize(); i++) {
|
||||||
@ -606,7 +603,7 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
// }
|
// }
|
||||||
int toReinit = 0;
|
int toReinit = 0;
|
||||||
if (true) { //if (m_UseArchive) {
|
if (true) { //if (m_UseArchive) {
|
||||||
poulationArchive.add(best);
|
populationArchive.add(best);
|
||||||
// System.out.println((""+ population.getFunctionCalls() + " " + (BeanInspector.toString(best.getDoublePosition())).replaceAll(";|\\[|\\]", "")));
|
// System.out.println((""+ population.getFunctionCalls() + " " + (BeanInspector.toString(best.getDoublePosition())).replaceAll(";|\\[|\\]", "")));
|
||||||
species.remove(i); // remove the converged Species
|
species.remove(i); // remove the converged Species
|
||||||
toReinit = curSpecies.size();
|
toReinit = curSpecies.size();
|
||||||
@ -757,11 +754,11 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
}
|
}
|
||||||
Population spec1, spec2;
|
Population spec1, spec2;
|
||||||
// test if species are close to already archived solutions - deactivate them if so
|
// test if species are close to already archived solutions - deactivate them if so
|
||||||
assocSpec = caForSpeciesMerging.associateLoners(poulationArchive, species.toArray(new Population[species.size()]), population);
|
assocSpec = caForSpeciesMerging.associateLoners(populationArchive, species.toArray(new Population[species.size()]), population);
|
||||||
PriorityQueue<Integer> specToRemove = new PriorityQueue<Integer>(5, Collections.reverseOrder()); // backwards sorted or DIE!
|
PriorityQueue<Integer> specToRemove = new PriorityQueue<Integer>(5, Collections.reverseOrder()); // backwards sorted or DIE!
|
||||||
for (int i = poulationArchive.size() - 1; i >= 0; i--) {
|
for (int i = populationArchive.size() - 1; i >= 0; i--) {
|
||||||
if (assocSpec[i] >= 0) {
|
if (assocSpec[i] >= 0) {
|
||||||
AbstractEAIndividual aIndy = poulationArchive.getEAIndividual(i);
|
AbstractEAIndividual aIndy = populationArchive.getEAIndividual(i);
|
||||||
spec1 = (Population) this.species.get(assocSpec[i]);
|
spec1 = (Population) this.species.get(assocSpec[i]);
|
||||||
// archived solution corresponds to an existing species
|
// archived solution corresponds to an existing species
|
||||||
if (!specToRemove.contains(assocSpec[i])) {
|
if (!specToRemove.contains(assocSpec[i])) {
|
||||||
@ -773,7 +770,7 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
}
|
}
|
||||||
if (spec1.getBestEAIndividual().isDominating(aIndy)) {
|
if (spec1.getBestEAIndividual().isDominating(aIndy)) {
|
||||||
// update the archived one with the better one? No rather not - it may happen that a large species is assoctiated which is quite large and spans over several optima - in that case an earlier found may get lost
|
// update the archived one with the better one? No rather not - it may happen that a large species is assoctiated which is quite large and spans over several optima - in that case an earlier found may get lost
|
||||||
// poulationArchive.set(i, spec1.getBestEAIndividual());
|
// populationArchive.set(i, spec1.getBestEAIndividual());
|
||||||
}
|
}
|
||||||
if (TRACE_EVTS) {
|
if (TRACE_EVTS) {
|
||||||
System.out.println("!!! Reinit Spec " + assocSpec[i] + ", fit " + spec1.getBestEAIndividual());
|
System.out.println("!!! Reinit Spec " + assocSpec[i] + ", fit " + spec1.getBestEAIndividual());
|
||||||
@ -872,7 +869,7 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
}
|
}
|
||||||
if (TRACE_STATE) {
|
if (TRACE_STATE) {
|
||||||
printState("---- EoCBN", doomedPopulation);
|
printState("---- EoCBN", doomedPopulation);
|
||||||
System.out.println("Archive: " + poulationArchive.getStringRepresentation());
|
System.out.println("Archive: " + populationArchive.getStringRepresentation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (TRACE) {
|
// if (TRACE) {
|
||||||
@ -1111,18 +1108,6 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
return this.identifier;
|
return this.identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "This is a versatile species based niching EA method.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
@ -1145,10 +1130,10 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
@Override
|
@Override
|
||||||
public void setPopulation(Population pop) {
|
public void setPopulation(Population pop) {
|
||||||
this.undifferentiatedPopulation = pop;
|
this.undifferentiatedPopulation = pop;
|
||||||
if (poulationArchive == null) {
|
if (populationArchive == null) {
|
||||||
poulationArchive = new Population();
|
populationArchive = new Population();
|
||||||
}
|
}
|
||||||
poulationArchive.setPopMetric(pop.getPopMetric());
|
populationArchive.setPopMetric(pop.getPopMetric());
|
||||||
population.setPopMetric(pop.getPopMetric());
|
population.setPopMetric(pop.getPopMetric());
|
||||||
doomedPopulation.setPopMetric(pop.getPopMetric());
|
doomedPopulation.setPopMetric(pop.getPopMetric());
|
||||||
|
|
||||||
@ -1166,7 +1151,7 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Population getArchivedSolutions() {
|
public Population getArchivedSolutions() {
|
||||||
return (Population) poulationArchive.clone();
|
return (Population) populationArchive.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1469,12 +1454,12 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
undifferentiatedPopulation.size(),
|
undifferentiatedPopulation.size(),
|
||||||
species.size(),
|
species.size(),
|
||||||
getAvgSpeciesMeasures()[0],
|
getAvgSpeciesMeasures()[0],
|
||||||
poulationArchive.size(),
|
populationArchive.size(),
|
||||||
poulationArchive.getCorrelations()[3],
|
populationArchive.getCorrelations()[3],
|
||||||
poulationArchive.getPopulationMeasures()[0],
|
populationArchive.getPopulationMeasures()[0],
|
||||||
collisions,
|
collisions,
|
||||||
getClusterDiffDist()};
|
getClusterDiffDist()};
|
||||||
// return undifferentiatedPopulation.size() + " \t " + species.size() + " \t " + BeanInspector.toString(getAvgSpeciesMeasures()[0]) + " \t " + (poulationArchive.size());
|
// return undifferentiatedPopulation.size() + " \t " + species.size() + " \t " + BeanInspector.toString(getAvgSpeciesMeasures()[0]) + " \t " + (populationArchive.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,6 +14,7 @@ import eva2.optimization.problems.F1Problem;
|
|||||||
import eva2.optimization.problems.InterfaceAdditionalPopulationInformer;
|
import eva2.optimization.problems.InterfaceAdditionalPopulationInformer;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.Pair;
|
import eva2.tools.Pair;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@ -32,8 +33,9 @@ import java.io.Serializable;
|
|||||||
* number of optima that may be found and returned by getAllSolutions is higher
|
* number of optima that may be found and returned by getAllSolutions is higher
|
||||||
* than the population size.
|
* than the population size.
|
||||||
*
|
*
|
||||||
* @author mkron
|
|
||||||
*/
|
*/
|
||||||
|
@Description("Similar to multi-start HC, but clusters the population during optimization to remove redundant individuals for efficiency."
|
||||||
|
+ "If the local search step does not achieve a minimum improvement, the population may be reinitialized.")
|
||||||
public class ClusteringHillClimbing implements InterfacePopulationChangedEventListener,
|
public class ClusteringHillClimbing implements InterfacePopulationChangedEventListener,
|
||||||
InterfaceOptimizer, Serializable, InterfaceAdditionalPopulationInformer {
|
InterfaceOptimizer, Serializable, InterfaceAdditionalPopulationInformer {
|
||||||
|
|
||||||
@ -331,11 +333,6 @@ public class ClusteringHillClimbing implements InterfacePopulationChangedEventLi
|
|||||||
return "ClustHC-" + initialPopSize + "-" + localSearchMethod;
|
return "ClustHC-" + initialPopSize + "-" + localSearchMethod;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Similar to multi-start HC, but clusters the population during optimization to remove redundant individuals for efficiency."
|
|
||||||
+ "If the local search step does not achieve a minimum improvement, the population may be reinitialized.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the hcEvalCycle
|
* @return the hcEvalCycle
|
||||||
*/
|
*/
|
||||||
|
@ -10,14 +10,12 @@ import eva2.optimization.problems.InterfaceOptimizationProblem;
|
|||||||
import eva2.tools.SelectedTag;
|
import eva2.tools.SelectedTag;
|
||||||
import eva2.tools.math.Mathematics;
|
import eva2.tools.math.Mathematics;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This extends our particle swarm implementation to dynamic optimization problems.
|
* This extends our particle swarm implementation to dynamic optimization problems.
|
||||||
* <p/>
|
|
||||||
* User: marcekro
|
|
||||||
* Date: 2007
|
|
||||||
* Time: 11:23:21
|
|
||||||
*/
|
*/
|
||||||
|
@Description("Particle Swarm Optimization tuned for tracking a dynamic target")
|
||||||
public class DynamicParticleSwarmOptimization extends ParticleSwarmOptimization {
|
public class DynamicParticleSwarmOptimization extends ParticleSwarmOptimization {
|
||||||
|
|
||||||
private boolean envHasChanged = false;
|
private boolean envHasChanged = false;
|
||||||
@ -507,19 +505,6 @@ public class DynamicParticleSwarmOptimization extends ParticleSwarmOptimization
|
|||||||
return strB.toString();
|
return strB.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Particle Swarm Optimization tuned for tracking a dynamic target";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -24,6 +24,7 @@ import eva2.optimization.problems.InterfaceAdditionalPopulationInformer;
|
|||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.Mathematics;
|
import eva2.tools.math.Mathematics;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -84,9 +85,10 @@ import java.util.Formatter;
|
|||||||
* <p/>
|
* <p/>
|
||||||
* TODO Add adaptive niche radius. Add parameter to every indy which is adapted
|
* TODO Add adaptive niche radius. Add parameter to every indy which is adapted
|
||||||
* after all new peaks have been found.
|
* after all new peaks have been found.
|
||||||
*
|
|
||||||
* @author mkron
|
|
||||||
*/
|
*/
|
||||||
|
@Description("A niching ES with dynamic peak identification, after Shir and Bäck: Niching in Evolution Strategies, "
|
||||||
|
+ "GECCO 2005. Basically, there are several variants of a (mu,lambda)-ES performed "
|
||||||
|
+ "in parallel, which are reclustered in each iteration based on the dynamic peak set.")
|
||||||
public class EsDpiNiching implements InterfaceOptimizer, Serializable, InterfaceAdditionalPopulationInformer, InterfacePopulationChangedEventListener {
|
public class EsDpiNiching implements InterfaceOptimizer, Serializable, InterfaceAdditionalPopulationInformer, InterfacePopulationChangedEventListener {
|
||||||
|
|
||||||
private static final boolean TRACE = false, TRACE_DEMES = false;
|
private static final boolean TRACE = false, TRACE_DEMES = false;
|
||||||
@ -1019,12 +1021,6 @@ public class EsDpiNiching implements InterfaceOptimizer, Serializable, Interface
|
|||||||
return identifier + "_" + getExpectedPeaks() + "_" + getNicheRadius();
|
return identifier + "_" + getExpectedPeaks() + "_" + getNicheRadius();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "A niching ES with dynamic peak identification, after Shir and Bäck: Niching in Evolution Strategies, "
|
|
||||||
+ "GECCO 2005. Basically, there are several variants of a (mu,lambda)-ES performed "
|
|
||||||
+ "in parallel, which are reclustered in each iteration based on the dynamic peak set.";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addPopulationChangedEventListener(
|
public void addPopulationChangedEventListener(
|
||||||
InterfacePopulationChangedEventListener ea) {
|
InterfacePopulationChangedEventListener ea) {
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
package eva2.optimization.strategies;
|
package eva2.optimization.strategies;
|
||||||
|
|
||||||
import eva2.optimization.operator.selection.SelectBestSingle;
|
import eva2.optimization.operator.selection.SelectBestSingle;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
|
@Description("A variant of the DPI Niching ES to be usable with CMA-Mutation (Shir&Bäck, CEC'05). " +
|
||||||
|
"Remember to turn off crossover for lambda=1, and to set CMA as mutation in the individual template.")
|
||||||
public class EsDpiNichingCma extends EsDpiNiching {
|
public class EsDpiNichingCma extends EsDpiNiching {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -39,9 +42,4 @@ public class EsDpiNichingCma extends EsDpiNiching {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "CMA-" + super.getName();
|
return "CMA-" + super.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "A variant of the DPI Niching ES to be usable with CMA-Mutation (Shir&Bäck, CEC'05). " +
|
|
||||||
"Remember to turn off crossover for lambda=1, and to set CMA as mutation in the individual template.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.optimization.population.PopulationInterface;
|
import eva2.optimization.population.PopulationInterface;
|
||||||
import eva2.optimization.population.SolutionSet;
|
import eva2.optimization.population.SolutionSet;
|
||||||
import eva2.optimization.problems.InterfaceAdditionalPopulationInformer;
|
import eva2.optimization.problems.InterfaceAdditionalPopulationInformer;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
@ -32,9 +33,8 @@ import java.util.LinkedList;
|
|||||||
* Refer to Auger&Hansen 05 for more details.
|
* Refer to Auger&Hansen 05 for more details.
|
||||||
* <p/>
|
* <p/>
|
||||||
* A.Auger & N.Hansen. A Restart CMA Evolution Strategy With Increasing Population Size. CEC 2005.
|
* A.Auger & N.Hansen. A Restart CMA Evolution Strategy With Increasing Population Size. CEC 2005.
|
||||||
*
|
|
||||||
* @author mkron
|
|
||||||
*/
|
*/
|
||||||
|
@Description("An ES with increasing population size.")
|
||||||
public class EvolutionStrategyIPOP extends EvolutionStrategies implements InterfacePopulationChangedEventListener, InterfaceAdditionalPopulationInformer {
|
public class EvolutionStrategyIPOP extends EvolutionStrategies implements InterfacePopulationChangedEventListener, InterfaceAdditionalPopulationInformer {
|
||||||
private static final long serialVersionUID = 4102736881931867818L;
|
private static final long serialVersionUID = 4102736881931867818L;
|
||||||
int dim = -1;
|
int dim = -1;
|
||||||
@ -270,10 +270,6 @@ public class EvolutionStrategyIPOP extends EvolutionStrategies implements Interf
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return getIncPopSizeFact() + "-IPOP-ES";
|
return getIncPopSizeFact() + "-IPOP-ES";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "An ES with increasing population size.";
|
|
||||||
}
|
|
||||||
//
|
//
|
||||||
// protected void checkPopulationConstraints() {
|
// protected void checkPopulationConstraints() {
|
||||||
// if (getLambda()!=initialLambda) setLambda(initialLambda);
|
// if (getLambda()!=initialLambda) setLambda(initialLambda);
|
||||||
|
@ -9,20 +9,15 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.optimization.population.SolutionSet;
|
import eva2.optimization.population.SolutionSet;
|
||||||
import eva2.optimization.problems.F1Problem;
|
import eva2.optimization.problems.F1Problem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Evolutionary programming by Fogel. Works fine but is actually a quite greedy
|
* Evolutionary programming by Fogel. Works fine but is actually a quite greedy
|
||||||
* local search strategy solely based on mutation. To prevent any confusion, the
|
* local search strategy solely based on mutation. To prevent any confusion, the
|
||||||
* mutation rate is temporaily set to 1.0. Potential citation: the PhD thesis of
|
* mutation rate is temporaily set to 1.0. Potential citation: the PhD thesis of
|
||||||
* David B. Fogel (1992).
|
* David B. Fogel (1992).
|
||||||
* <p/>
|
|
||||||
* Copyright: Copyright (c) 2003 Company: University of Tuebingen, Computer
|
|
||||||
* Architecture
|
|
||||||
*
|
|
||||||
* @author Felix Streichert
|
|
||||||
* @version: $Revision: 307 $ $Date: 2007-12-04 14:31:47 +0100 (Tue, 04 Dec
|
|
||||||
* 2007) $ $Author: mkron $
|
|
||||||
*/
|
*/
|
||||||
|
@Description("This is a basic Evolutionary Programming scheme.")
|
||||||
public class EvolutionaryProgramming implements InterfaceOptimizer, java.io.Serializable {
|
public class EvolutionaryProgramming implements InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
private int m_PopulationSize = 0;
|
private int m_PopulationSize = 0;
|
||||||
@ -192,19 +187,6 @@ public class EvolutionaryProgramming implements InterfaceOptimizer, java.io.Seri
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "This is a basic Evolutionary Programming scheme.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -8,6 +8,7 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.optimization.population.SolutionSet;
|
import eva2.optimization.population.SolutionSet;
|
||||||
import eva2.optimization.problems.B1Problem;
|
import eva2.optimization.problems.B1Problem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The flood algorithm, and alternative to the threshold algorithms. No really
|
* The flood algorithm, and alternative to the threshold algorithms. No really
|
||||||
@ -16,10 +17,9 @@ import eva2.optimization.problems.InterfaceOptimizationProblem;
|
|||||||
* current optimization problem. But again this is a greedy local search
|
* current optimization problem. But again this is a greedy local search
|
||||||
* strategy. Similar to the evolutionary programming strategy this strategy sets
|
* strategy. Similar to the evolutionary programming strategy this strategy sets
|
||||||
* the mutation rate temporarily to 1.0. The algorithm regards only
|
* the mutation rate temporarily to 1.0. The algorithm regards only
|
||||||
* one-dimensional fitness. Created by IntelliJ IDEA. User: streiche Date:
|
* one-dimensional fitness.
|
||||||
* 01.10.2004 Time: 13:46:02 To change this template use File | Settings | File
|
|
||||||
* Templates.
|
|
||||||
*/
|
*/
|
||||||
|
@Description("The flood algorithm uses an declining flood peak to accpect new solutions (*shudder* check inital flood peak and drain very carefully!).")
|
||||||
public class FloodAlgorithm implements InterfaceOptimizer, java.io.Serializable {
|
public class FloodAlgorithm implements InterfaceOptimizer, java.io.Serializable {
|
||||||
// These variables are necessary for the simple testcase
|
// These variables are necessary for the simple testcase
|
||||||
|
|
||||||
@ -250,19 +250,6 @@ public class FloodAlgorithm implements InterfaceOptimizer, java.io.Serializable
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "The flood algorithm uses an declining flood peak to accpect new solutions (*shudder* check inital flood peak and drain very carefully!).";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -12,6 +12,7 @@ import eva2.optimization.problems.InterfaceFirstOrderDerivableProblem;
|
|||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.EVAERROR;
|
import eva2.tools.EVAERROR;
|
||||||
import eva2.tools.ReflectPackage;
|
import eva2.tools.ReflectPackage;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A gradient descent algorithm by hannes planatscher don't expect any
|
* A gradient descent algorithm by hannes planatscher don't expect any
|
||||||
@ -19,9 +20,8 @@ import eva2.tools.ReflectPackage;
|
|||||||
* <p/>
|
* <p/>
|
||||||
* mkron added some!
|
* mkron added some!
|
||||||
*
|
*
|
||||||
* @author not attributable
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
*/
|
||||||
|
@Description("Gradient Descent can be applied to derivable functions (InterfaceFirstOrderDerivableProblem).")
|
||||||
public class GradientDescentAlgorithm implements InterfaceOptimizer, java.io.Serializable {
|
public class GradientDescentAlgorithm implements InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizationProblem m_Problem;
|
private InterfaceOptimizationProblem m_Problem;
|
||||||
@ -399,9 +399,6 @@ public class GradientDescentAlgorithm implements InterfaceOptimizer, java.io.Ser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Gradient Descent can be applied to derivable functions (" + InterfaceFirstOrderDerivableProblem.class.getSimpleName() + ").";
|
|
||||||
}
|
|
||||||
//////////////// for global adaption
|
//////////////// for global adaption
|
||||||
|
|
||||||
public boolean isAdaptStepSizeGlobally() {
|
public boolean isAdaptStepSizeGlobally() {
|
||||||
|
@ -12,6 +12,7 @@ import eva2.optimization.problems.F1Problem;
|
|||||||
import eva2.optimization.problems.F8Problem;
|
import eva2.optimization.problems.F8Problem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.optimization.problems.TF1Problem;
|
import eva2.optimization.problems.TF1Problem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The one and only island model for parallelization. Since parallelization
|
* The one and only island model for parallelization. Since parallelization
|
||||||
@ -29,10 +30,8 @@ import eva2.optimization.problems.TF1Problem;
|
|||||||
* after which a communication step is performed according to the migration
|
* after which a communication step is performed according to the migration
|
||||||
* model. Only after migration is a main cycle complete, the statistics updated
|
* model. Only after migration is a main cycle complete, the statistics updated
|
||||||
* etc.
|
* etc.
|
||||||
* <p/>
|
|
||||||
* Created by IntelliJ IDEA. User: streiche Date: 12.09.2004 Time: 14:48:20 To
|
|
||||||
* change this template use File | Settings | File Templates.
|
|
||||||
*/
|
*/
|
||||||
|
@Description("This is an island model EA distributing the individuals across several (remote) CPUs for optimization.")
|
||||||
public class IslandModelEA implements InterfacePopulationChangedEventListener, InterfaceOptimizer, java.io.Serializable {
|
public class IslandModelEA implements InterfacePopulationChangedEventListener, InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
private Population m_Population = new Population();
|
private Population m_Population = new Population();
|
||||||
@ -475,18 +474,6 @@ public class IslandModelEA implements InterfacePopulationChangedEventListener, I
|
|||||||
//System.out.println(sourceID + " is at generation "+ opt.getPopulation().getGeneration() +" i'm at " +this.m_Generation);
|
//System.out.println(sourceID + " is at generation "+ opt.getPopulation().getGeneration() +" i'm at " +this.m_Generation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "This is an island model EA distributing the individuals across several (remote) CPUs for optimization.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
|
@ -13,6 +13,7 @@ import eva2.optimization.problems.BKnapsackProblem;
|
|||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.Pair;
|
import eva2.tools.Pair;
|
||||||
import eva2.tools.math.SpecialFunction;
|
import eva2.tools.math.SpecialFunction;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -21,10 +22,11 @@ import java.util.Stack;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
@Description("Basic implementation of the Linkage Tree Genetic Algorithm based on the works by Dirk Thierens.")
|
||||||
public class LTGA implements InterfaceOptimizer, java.io.Serializable, InterfacePopulationChangedEventListener {
|
public class LTGA implements InterfaceOptimizer, java.io.Serializable, InterfacePopulationChangedEventListener {
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(LTGA.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(LTGA.class.getName());
|
||||||
transient private InterfacePopulationChangedEventListener m_Listener = null;
|
transient private InterfacePopulationChangedEventListener populationChangedEventListener = null;
|
||||||
private String m_Identifier = "LTGA";
|
private String m_Identifier = "LTGA";
|
||||||
private int probDim = 8;
|
private int probDim = 8;
|
||||||
private int fitCrit = -1;
|
private int fitCrit = -1;
|
||||||
@ -39,7 +41,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
public LTGA(LTGA l) {
|
public LTGA(LTGA l) {
|
||||||
this.m_Listener = l.m_Listener;
|
this.populationChangedEventListener = l.populationChangedEventListener;
|
||||||
this.m_Identifier = l.m_Identifier;
|
this.m_Identifier = l.m_Identifier;
|
||||||
this.probDim = l.probDim;
|
this.probDim = l.probDim;
|
||||||
this.popSize = l.popSize;
|
this.popSize = l.popSize;
|
||||||
@ -58,22 +60,18 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
|||||||
return "Linkage Tree Genetic Algorithm";
|
return "Linkage Tree Genetic Algorithm";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Basic implementation of the Linkage Tree Genetic Algorithm based on the works by Dirk Thierens.";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addPopulationChangedEventListener(
|
public void addPopulationChangedEventListener(
|
||||||
InterfacePopulationChangedEventListener ea) {
|
InterfacePopulationChangedEventListener ea) {
|
||||||
this.m_Listener = ea;
|
this.populationChangedEventListener = ea;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean removePopulationChangedEventListener(
|
public boolean removePopulationChangedEventListener(
|
||||||
InterfacePopulationChangedEventListener ea) {
|
InterfacePopulationChangedEventListener ea) {
|
||||||
if (m_Listener == ea) {
|
if (populationChangedEventListener == ea) {
|
||||||
m_Listener = null;
|
populationChangedEventListener = null;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -308,8 +306,8 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
|||||||
* Something has changed
|
* Something has changed
|
||||||
*/
|
*/
|
||||||
protected void firePropertyChangedEvent(String name) {
|
protected void firePropertyChangedEvent(String name) {
|
||||||
if (this.m_Listener != null) {
|
if (this.populationChangedEventListener != null) {
|
||||||
this.m_Listener.registerPopulationStateChanged(this, name);
|
this.populationChangedEventListener.registerPopulationStateChanged(this, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,18 +10,20 @@ import eva2.optimization.population.SolutionSet;
|
|||||||
import eva2.optimization.problems.F1Problem;
|
import eva2.optimization.problems.F1Problem;
|
||||||
import eva2.optimization.problems.InterfaceLocalSearchable;
|
import eva2.optimization.problems.InterfaceLocalSearchable;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A memetic algorithm by hannes planatscher. The local search strategy can only
|
* A memetic algorithm by hannes planatscher. The local search strategy can only
|
||||||
* be applied to problems which implement the InterfaceLocalSearchable else the
|
* be applied to problems which implement the InterfaceLocalSearchable else the
|
||||||
* local search will not be activated at all. <p> Title: EvA2 </p> <p>
|
* local search will not be activated at all.
|
||||||
* Description: </p> <p> Copyright: Copyright (c) 2003 </p> <p> Company: </p>
|
|
||||||
*
|
*
|
||||||
* @author not attributable
|
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
@Description("This is a basic generational Memetic Algorithm. Local search steps are performed on a selected subset "
|
||||||
|
+ "of individuals after certain numbers of global search iterations. Note "
|
||||||
|
+ "that the problem class must implement InterfaceLocalSearchable.")
|
||||||
public class MemeticAlgorithm implements InterfaceOptimizer,
|
public class MemeticAlgorithm implements InterfaceOptimizer,
|
||||||
java.io.Serializable {
|
java.io.Serializable {
|
||||||
|
|
||||||
@ -259,22 +261,6 @@ public class MemeticAlgorithm implements InterfaceOptimizer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ========================================================================================
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "This is a basic generational Memetic Algorithm. Local search steps are performed on a selected subset "
|
|
||||||
+ "of individuals after certain numbers of global search iterations. Note "
|
|
||||||
+ "that the problem class must implement InterfaceLocalSearchable.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -11,13 +11,15 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.optimization.population.SolutionSet;
|
import eva2.optimization.population.SolutionSet;
|
||||||
import eva2.optimization.problems.AbstractOptimizationProblem;
|
import eva2.optimization.problems.AbstractOptimizationProblem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author mkron
|
* ToDo: Document
|
||||||
*/
|
*/
|
||||||
|
@Description("A multi-objective CMA-ES variant after Igel, Hansen and Roth 2007 (EC 15(1),1-28).")
|
||||||
public class MultiObjectiveCMAES implements InterfaceOptimizer, Serializable {
|
public class MultiObjectiveCMAES implements InterfaceOptimizer, Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -131,10 +133,6 @@ public class MultiObjectiveCMAES implements InterfaceOptimizer, Serializable {
|
|||||||
return "(1+" + m_lambda + ") MO-CMA-ES";
|
return "(1+" + m_lambda + ") MO-CMA-ES";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "A multi-objective CMA-ES variant after Igel, Hansen and Roth 2007 (EC 15(1),1-28).";
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -14,6 +14,7 @@ import eva2.optimization.population.SolutionSet;
|
|||||||
import eva2.optimization.problems.AbstractOptimizationProblem;
|
import eva2.optimization.problems.AbstractOptimizationProblem;
|
||||||
import eva2.optimization.problems.FM0Problem;
|
import eva2.optimization.problems.FM0Problem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A generic framework for multi-objecitve optimization, you need to specify an
|
* A generic framework for multi-objecitve optimization, you need to specify an
|
||||||
@ -24,10 +25,9 @@ import eva2.optimization.problems.InterfaceOptimizationProblem;
|
|||||||
* optimizer instead of this MOEA, such an optimizer would randomly toggle
|
* optimizer instead of this MOEA, such an optimizer would randomly toggle
|
||||||
* between the objective for each selection and thus explore at least the
|
* between the objective for each selection and thus explore at least the
|
||||||
* extreme points of the objective space, but simpler methods like random search
|
* extreme points of the objective space, but simpler methods like random search
|
||||||
* or hill-climbing might even fail on that. Created by IntelliJ IDEA. User:
|
* or hill-climbing might even fail on that.
|
||||||
* streiche Date: 05.06.2003 Time: 11:03:50 To change this template use Options
|
|
||||||
* | File Templates.
|
|
||||||
*/
|
*/
|
||||||
|
@Description("This is a general Multi-objective Evolutionary Optimization Framework.")
|
||||||
public class MultiObjectiveEA implements InterfaceOptimizer, java.io.Serializable {
|
public class MultiObjectiveEA implements InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizer m_Optimizer = new GeneticAlgorithm();
|
private InterfaceOptimizer m_Optimizer = new GeneticAlgorithm();
|
||||||
@ -230,19 +230,6 @@ public class MultiObjectiveEA implements InterfaceOptimizer, java.io.Serializabl
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "This is a general Multi-objective Evolutionary Optimization Framework.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -11,6 +11,7 @@ import eva2.optimization.problems.AbstractOptimizationProblem;
|
|||||||
import eva2.optimization.problems.AbstractProblemDouble;
|
import eva2.optimization.problems.AbstractProblemDouble;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.Mathematics;
|
import eva2.tools.math.Mathematics;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
@ -19,9 +20,8 @@ import java.util.Vector;
|
|||||||
* Nelder-Mead-Simplex does not guarantee an equal number of evaluations within
|
* Nelder-Mead-Simplex does not guarantee an equal number of evaluations within
|
||||||
* each optimize call because of the different step types. Range check is now
|
* each optimize call because of the different step types. Range check is now
|
||||||
* available by projection at the bounds.
|
* available by projection at the bounds.
|
||||||
*
|
|
||||||
* @author mkron
|
|
||||||
*/
|
*/
|
||||||
|
@Description("The Nelder-Mead simplex search algorithm for local search. Reflection on bounds may be used for constraint handling.")
|
||||||
public class NelderMeadSimplex implements InterfaceOptimizer, Serializable, InterfacePopulationChangedEventListener {
|
public class NelderMeadSimplex implements InterfaceOptimizer, Serializable, InterfacePopulationChangedEventListener {
|
||||||
|
|
||||||
private int populationSize = 100;
|
private int populationSize = 100;
|
||||||
@ -231,10 +231,6 @@ public class NelderMeadSimplex implements InterfaceOptimizer, Serializable, Inte
|
|||||||
return m_Identifier;
|
return m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "The Nelder-Mead simplex search algorithm for local search. Reflection on bounds may be used for constraint handling.";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Population getPopulation() {
|
public Population getPopulation() {
|
||||||
return m_Population;
|
return m_Population;
|
||||||
|
@ -17,20 +17,15 @@ import eva2.optimization.population.SolutionSet;
|
|||||||
import eva2.optimization.problems.AbstractOptimizationProblem;
|
import eva2.optimization.problems.AbstractOptimizationProblem;
|
||||||
import eva2.optimization.problems.F1Problem;
|
import eva2.optimization.problems.F1Problem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a Particle Filter implemented by Frank Senke, only some documentation
|
* This is a Particle Filter implemented by Frank Senke, only some documentation
|
||||||
* here and not completely checked whether this works on arbitrary problem
|
* here and not completely checked whether this works on arbitrary problem
|
||||||
* instances. MK did some adaptations, this should work on real valued problems
|
* instances. MK did some adaptations, this should work on real valued problems
|
||||||
* now.
|
* now.
|
||||||
* <p/>
|
|
||||||
* This is a implementation of Genetic Algorithms. Copyright: Copyright (c) 2003
|
|
||||||
* Company: University of Tuebingen, Computer Architecture
|
|
||||||
*
|
|
||||||
* @author Felix Streichert
|
|
||||||
* @version: $Revision: 307 $ $Date: 2007-12-04 14:31:47 +0100 (Tue, 04 Dec
|
|
||||||
* 2007) $ $Author: mkron $
|
|
||||||
*/
|
*/
|
||||||
|
@Description("This is a Particle Filter Algorithm.")
|
||||||
public class ParticleFilterOptimization implements InterfaceOptimizer, java.io.Serializable {
|
public class ParticleFilterOptimization implements InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,7 +36,6 @@ public class ParticleFilterOptimization implements InterfaceOptimizer, java.io.S
|
|||||||
private Population m_Population = new Population();
|
private Population m_Population = new Population();
|
||||||
private InterfaceOptimizationProblem m_Problem = new F1Problem();
|
private InterfaceOptimizationProblem m_Problem = new F1Problem();
|
||||||
private InterfaceSelection m_ParentSelection = new SelectParticleWheel(0.5);
|
private InterfaceSelection m_ParentSelection = new SelectParticleWheel(0.5);
|
||||||
//private boolean m_UseElitism = true;
|
|
||||||
private String m_Identifier = "";
|
private String m_Identifier = "";
|
||||||
private boolean withShow = false;
|
private boolean withShow = false;
|
||||||
private double mutationSigma = 0.01;
|
private double mutationSigma = 0.01;
|
||||||
@ -341,19 +335,6 @@ public class ParticleFilterOptimization implements InterfaceOptimizer, java.io.S
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "This is a Particle Filter Algorithm.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -23,6 +23,7 @@ import eva2.tools.chart2d.DPointSet;
|
|||||||
import eva2.tools.math.Jama.Matrix;
|
import eva2.tools.math.Jama.Matrix;
|
||||||
import eva2.tools.math.Mathematics;
|
import eva2.tools.math.Mathematics;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -38,6 +39,7 @@ import java.util.Vector;
|
|||||||
* Possible topologies are: "Linear", "Grid", "Star", "Multi-Swarm", "Tree",
|
* Possible topologies are: "Linear", "Grid", "Star", "Multi-Swarm", "Tree",
|
||||||
* "HPSO", "Random" in that order starting by 0.
|
* "HPSO", "Random" in that order starting by 0.
|
||||||
*/
|
*/
|
||||||
|
@Description("Particle Swarm Optimization by Kennedy and Eberhart.")
|
||||||
public class ParticleSwarmOptimization implements InterfaceOptimizer, java.io.Serializable, InterfaceAdditionalPopulationInformer {
|
public class ParticleSwarmOptimization implements InterfaceOptimizer, java.io.Serializable, InterfaceAdditionalPopulationInformer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1725,19 +1727,6 @@ public class ParticleSwarmOptimization implements InterfaceOptimizer, java.io.Se
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Particle Swarm Optimization by Kennedy and Eberhart.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -2,6 +2,7 @@ package eva2.optimization.strategies;
|
|||||||
|
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This extends the particle swarm optimization implementation
|
* This extends the particle swarm optimization implementation
|
||||||
@ -9,6 +10,7 @@ import eva2.tools.math.RNG;
|
|||||||
* Franz van den Bergh in "An Analysis of Particle Swarm Optimizers".
|
* Franz van den Bergh in "An Analysis of Particle Swarm Optimizers".
|
||||||
* In this modification the velocity of the global best particle is updated differently.
|
* In this modification the velocity of the global best particle is updated differently.
|
||||||
*/
|
*/
|
||||||
|
@Description("Guaranteed Convergence Particle Swarm Optimiser (GCPSO) as proposed by F. van den Bergh.")
|
||||||
public class ParticleSwarmOptimizationGCPSO extends ParticleSwarmOptimization {
|
public class ParticleSwarmOptimizationGCPSO extends ParticleSwarmOptimization {
|
||||||
// choosable parameters:
|
// choosable parameters:
|
||||||
protected boolean gcpso;
|
protected boolean gcpso;
|
||||||
@ -71,16 +73,6 @@ public class ParticleSwarmOptimizationGCPSO extends ParticleSwarmOptimization {
|
|||||||
this.SetRhoDecreaseFactor(a.getRhoDecreaseFactor());
|
this.SetRhoDecreaseFactor(a.getRhoDecreaseFactor());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Guaranteed Convergence Particle Swarm Optimiser (GCPSO) " +
|
|
||||||
"as proposed by F. van den Bergh.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
/**********************************************************************************************************************
|
||||||
* overwritten
|
* overwritten
|
||||||
*/
|
*/
|
||||||
|
@ -12,6 +12,7 @@ import eva2.optimization.population.SolutionSet;
|
|||||||
import eva2.optimization.problems.AbstractOptimizationProblem;
|
import eva2.optimization.problems.AbstractOptimizationProblem;
|
||||||
import eva2.optimization.problems.B1Problem;
|
import eva2.optimization.problems.B1Problem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Population based incremental learning in the PSM by Monmarche version with
|
* Population based incremental learning in the PSM by Monmarche version with
|
||||||
@ -22,14 +23,8 @@ import eva2.optimization.problems.InterfaceOptimizationProblem;
|
|||||||
* Nicolas Monmarché , Eric Ramat , Guillaume Dromel , Mohamed Slimane , Gilles
|
* Nicolas Monmarché , Eric Ramat , Guillaume Dromel , Mohamed Slimane , Gilles
|
||||||
* Venturini: On the similarities between AS, BSC and PBIL: toward the birth of
|
* Venturini: On the similarities between AS, BSC and PBIL: toward the birth of
|
||||||
* a new meta-heuristic. TecReport 215. Univ. de Tours, 1999.
|
* a new meta-heuristic. TecReport 215. Univ. de Tours, 1999.
|
||||||
* <p/>
|
|
||||||
* Copyright: Copyright (c) 2003 Company: University of Tuebingen, Computer
|
|
||||||
* Architecture
|
|
||||||
*
|
|
||||||
* @author Felix Streichert
|
|
||||||
* @version: $Revision: 307 $ $Date: 2007-12-04 14:31:47 +0100 (Tue, 04 Dec
|
|
||||||
* 2007) $ $Author: mkron $
|
|
||||||
*/
|
*/
|
||||||
|
@Description("The Population based incremental learning is based on a statistical distribution of bit positions. Please note: This optimizer requires a binary genotype!")
|
||||||
public class PopulationBasedIncrementalLearning implements InterfaceOptimizer, java.io.Serializable {
|
public class PopulationBasedIncrementalLearning implements InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
// These variables are necessary for the simple testcase
|
// These variables are necessary for the simple testcase
|
||||||
@ -221,19 +216,6 @@ public class PopulationBasedIncrementalLearning implements InterfaceOptimizer, j
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "The Population based incremental learning is based on a statistical distribution of bit positions. Please note: This optimizer requires a binary genotype!";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -9,15 +9,15 @@ import eva2.optimization.population.SolutionSet;
|
|||||||
import eva2.optimization.problems.B1Problem;
|
import eva2.optimization.problems.B1Problem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simulated Annealing by Nelder and Mead, a simple yet efficient local search
|
* Simulated Annealing by Nelder and Mead, a simple yet efficient local search
|
||||||
* method. But to become less prone to premature convergence the cooling rate
|
* method. But to become less prone to premature convergence the cooling rate
|
||||||
* has to be tuned to the optimization problem at hand. Again the population
|
* has to be tuned to the optimization problem at hand. Again the population
|
||||||
* size gives the number of multi-starts. Created by IntelliJ IDEA. User:
|
* size gives the number of multi-starts.
|
||||||
* streiche Date: 13.05.2004 Time: 10:30:26 To change this template use File |
|
|
||||||
* Settings | File Templates.
|
|
||||||
*/
|
*/
|
||||||
|
@Description("The simulated annealing uses an additional cooling rate instead of a simple dominate criteria to accept worse solutions by chance.")
|
||||||
public class SimulatedAnnealing implements InterfaceOptimizer, java.io.Serializable {
|
public class SimulatedAnnealing implements InterfaceOptimizer, java.io.Serializable {
|
||||||
// These variables are necessary for the simple testcase
|
// These variables are necessary for the simple testcase
|
||||||
|
|
||||||
@ -248,18 +248,6 @@ public class SimulatedAnnealing implements InterfaceOptimizer, java.io.Serializa
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "The simulated annealing uses an additional cooling rate instead of a simple dominate criteria to accpect worse solutions by chance.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
|
@ -12,14 +12,14 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.optimization.population.SolutionSet;
|
import eva2.optimization.population.SolutionSet;
|
||||||
import eva2.optimization.problems.B1Problem;
|
import eva2.optimization.problems.B1Problem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple implementation of the steady-state GA with variable replacement
|
* A simple implementation of the steady-state GA with variable replacement
|
||||||
* schemes. To reduce the logging effort population.size() optimization steps
|
* schemes. To reduce the logging effort population.size() optimization steps
|
||||||
* are performed each time optimize() is called. Created by IntelliJ IDEA. User:
|
* are performed each time optimize() is called.
|
||||||
* streiche Date: 19.07.2005 Time: 14:30:20 To change this template use File |
|
|
||||||
* Settings | File Templates.
|
|
||||||
*/
|
*/
|
||||||
|
@Description("This is a Steady-State Genetic Algorithm.")
|
||||||
public class SteadyStateGA implements InterfaceOptimizer, java.io.Serializable {
|
public class SteadyStateGA implements InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
private Population population = new Population();
|
private Population population = new Population();
|
||||||
@ -191,19 +191,6 @@ public class SteadyStateGA implements InterfaceOptimizer, java.io.Serializable {
|
|||||||
return this.identifier;
|
return this.identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "This is a Steady-State Genetic Algorithm.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -8,12 +8,13 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.optimization.population.SolutionSet;
|
import eva2.optimization.population.SolutionSet;
|
||||||
import eva2.optimization.problems.B1Problem;
|
import eva2.optimization.problems.B1Problem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Threshold accepting algorithm simliar strategy as the flood algorithm,
|
* Threshold accepting algorithm simliar strategy as the flood algorithm,
|
||||||
* similar problems. Created by IntelliJ IDEA. User: streiche Date: 01.10.2004
|
* similar problems.
|
||||||
* Time: 13:35:49 To change this template use File | Settings | File Templates.
|
|
||||||
*/
|
*/
|
||||||
|
@Description("The threshold algorithm uses an declining threshold to accpect new solutions.")
|
||||||
public class ThresholdAlgorithm implements InterfaceOptimizer, java.io.Serializable {
|
public class ThresholdAlgorithm implements InterfaceOptimizer, java.io.Serializable {
|
||||||
// These variables are necessary for the simple testcase
|
// These variables are necessary for the simple testcase
|
||||||
|
|
||||||
@ -238,19 +239,6 @@ public class ThresholdAlgorithm implements InterfaceOptimizer, java.io.Serializa
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "The threshold algorithm uses an declining threshold to accpect new solutions.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@ -15,6 +15,7 @@ import eva2.optimization.strategies.tribes.TribesExplorer;
|
|||||||
import eva2.optimization.strategies.tribes.TribesParam;
|
import eva2.optimization.strategies.tribes.TribesParam;
|
||||||
import eva2.optimization.strategies.tribes.TribesPosition;
|
import eva2.optimization.strategies.tribes.TribesPosition;
|
||||||
import eva2.optimization.strategies.tribes.TribesSwarm;
|
import eva2.optimization.strategies.tribes.TribesSwarm;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -130,6 +131,7 @@ import java.util.List;
|
|||||||
2005-11-21. Check if it is possible to easily find just the _value_ of the
|
2005-11-21. Check if it is possible to easily find just the _value_ of the
|
||||||
global minimum (not the position). "Chinese shadow" method?
|
global minimum (not the position). "Chinese shadow" method?
|
||||||
*/
|
*/
|
||||||
|
@Description("TRIBES: a parameter free PSO implementation by Maurice Clerc.")
|
||||||
public class Tribes implements InterfaceOptimizer, java.io.Serializable {
|
public class Tribes implements InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
public static final boolean TRACE = false;
|
public static final boolean TRACE = false;
|
||||||
@ -667,12 +669,10 @@ public class Tribes implements InterfaceOptimizer, java.io.Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getStringRepresentation() {
|
public String getStringRepresentation() {
|
||||||
return globalInfo();
|
// ToDo: Implement properly (was globalInfo)
|
||||||
|
return "Not implemented";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "TRIBES: a parameter free PSO implementation by Maurice Clerc.";
|
|
||||||
}
|
|
||||||
|
|
||||||
public void incEvalCnt() {
|
public void incEvalCnt() {
|
||||||
population.incrFunctionCalls();
|
population.incrFunctionCalls();
|
||||||
|
@ -10,6 +10,7 @@ import eva2.optimization.population.SolutionSet;
|
|||||||
import eva2.optimization.problems.AbstractMultiObjectiveOptimizationProblem;
|
import eva2.optimization.problems.AbstractMultiObjectiveOptimizationProblem;
|
||||||
import eva2.optimization.problems.FM0Problem;
|
import eva2.optimization.problems.FM0Problem;
|
||||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The winged MOEA was a nice idea, which didn't really work out. Here a
|
* The winged MOEA was a nice idea, which didn't really work out. Here a
|
||||||
@ -17,9 +18,8 @@ import eva2.optimization.problems.InterfaceOptimizationProblem;
|
|||||||
* just one objective. The idea was that these local optimizers would span the
|
* just one objective. The idea was that these local optimizers would span the
|
||||||
* search space and would allow the MOEA to converge faster. But in the end the
|
* search space and would allow the MOEA to converge faster. But in the end the
|
||||||
* performance of this algorithm strongly depends on the optimization problem.
|
* performance of this algorithm strongly depends on the optimization problem.
|
||||||
* Created by IntelliJ IDEA. User: streiche Date: 16.02.2005 Time: 16:34:22 To
|
|
||||||
* change this template use File | Settings | File Templates.
|
|
||||||
*/
|
*/
|
||||||
|
@Description("This is Evolutionary Multi-Criteria Optimization Algorithm hybridized with Local Searchers to span the Pareto-Front.")
|
||||||
public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Serializable {
|
public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizer m_MOOptimizer = new MultiObjectiveEA();
|
private InterfaceOptimizer m_MOOptimizer = new MultiObjectiveEA();
|
||||||
@ -28,7 +28,6 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
|||||||
private Population m_Population = new Population();
|
private Population m_Population = new Population();
|
||||||
private int m_MigrationRate = 5;
|
private int m_MigrationRate = 5;
|
||||||
private int m_OutputDimension = 2;
|
private int m_OutputDimension = 2;
|
||||||
private int m_NumberOfLocalOptimizers = 2;
|
|
||||||
private InterfaceOptimizationProblem m_Problem = new FM0Problem();
|
private InterfaceOptimizationProblem m_Problem = new FM0Problem();
|
||||||
private String m_Identifier = "";
|
private String m_Identifier = "";
|
||||||
transient private InterfacePopulationChangedEventListener m_Listener;
|
transient private InterfacePopulationChangedEventListener m_Listener;
|
||||||
@ -285,19 +284,6 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "This is Evolutionary Multi-Criteria Optimization Algorithm hybridized with Local Searchers to span the Pareto-Front.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will return a naming String
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user