parent
0b35a9e880
commit
4db79c69d2
@ -1,3 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: eva2.gui.Main
|
||||
|
@ -769,7 +769,7 @@ public class OptimizerFactory {
|
||||
opt.setPopulation(pop);
|
||||
params.setOptimizer(opt);
|
||||
params.setTerminator(term);
|
||||
params.setSeed(seed);
|
||||
params.setRandomSeed(seed);
|
||||
return params;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class TestingCbnPostProc {
|
||||
|
||||
OptimizationParameters esParams = OptimizerFactory.standardCbnES(fm0);
|
||||
esParams.setTerminator(new EvaluationTerminator(2000));
|
||||
esParams.setSeed(0);
|
||||
esParams.setRandomSeed(0);
|
||||
best = (AbstractEAIndividual) OptimizerFactory.optimizeToInd(esParams, null);
|
||||
|
||||
System.out.println(esParams.getTerminator().lastTerminationMessage() + "\nFound solution: "
|
||||
|
@ -19,7 +19,7 @@ public class TestingGAB1 {
|
||||
// add an evaluation terminator
|
||||
gaParams.setTerminator(new EvaluationTerminator(1000));
|
||||
// set a specific random seed
|
||||
gaParams.setSeed(2342);
|
||||
gaParams.setRandomSeed(2342);
|
||||
|
||||
// access the GA
|
||||
GeneticAlgorithm ga = (GeneticAlgorithm) gaParams.getOptimizer();
|
||||
|
@ -19,7 +19,7 @@ public class TestingPlusCmaEs {
|
||||
OptimizationParameters esParams = OptimizerFactory.standardES(fm0);
|
||||
esParams.setTerminator(new EvaluationTerminator(2000));
|
||||
// set a random seed based on system time
|
||||
esParams.setSeed(0);
|
||||
esParams.setRandomSeed(0);
|
||||
|
||||
// set evolutionary operators and probabilities
|
||||
AbstractEAIndividual.setOperators(
|
||||
|
@ -68,9 +68,12 @@ public class PropertyPanel extends JPanel {
|
||||
Rectangle box = new Rectangle(i.left, i.top,
|
||||
getSize().width - i.left - i.right,
|
||||
getSize().height - i.top - i.bottom);
|
||||
g.clearRect(i.left, i.top,
|
||||
Color back = g.getColor();
|
||||
g.setColor(Color.WHITE);
|
||||
g.fillRect(i.left, i.top,
|
||||
getSize().width - i.right - i.left,
|
||||
getSize().height - i.bottom - i.top);
|
||||
g.setColor(back);
|
||||
propertyEditor.paintValue(g, box);
|
||||
}
|
||||
|
||||
|
@ -27,9 +27,9 @@ public interface InterfaceOptimizationParameters {
|
||||
*
|
||||
* @param x Long seed.
|
||||
*/
|
||||
void setSeed(long x);
|
||||
void setRandomSeed(long x);
|
||||
|
||||
long getSeed();
|
||||
long getRandomSeed();
|
||||
|
||||
/**
|
||||
* This method allows you to choose a termination criteria for the
|
||||
|
@ -78,7 +78,7 @@ public class StandaloneOptimization implements InterfaceStandaloneOptimization,
|
||||
this.optimizationParameters = OptimizationParameters.getInstance();
|
||||
this.experimentName = this.optimizationParameters.getOptimizer().getName() + "-" + this.performedRuns.size();
|
||||
this.optimizationParameters.addPopulationChangedEventListener(this);
|
||||
RNG.setRandomSeed(optimizationParameters.getSeed());
|
||||
RNG.setRandomSeed(optimizationParameters.getRandomSeed());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -348,7 +348,7 @@ public class StandaloneOptimization implements InterfaceStandaloneOptimization,
|
||||
this.statusField.setText("Optimizing...");
|
||||
}
|
||||
|
||||
RNG.setRandomSeed(optimizationParameters.getSeed());
|
||||
RNG.setRandomSeed(optimizationParameters.getRandomSeed());
|
||||
// opening output file...
|
||||
if (!this.outputFileName.equalsIgnoreCase("none")) {
|
||||
String name = "";
|
||||
@ -646,10 +646,10 @@ public class StandaloneOptimization implements InterfaceStandaloneOptimization,
|
||||
* @param seed The seed for the random number generator
|
||||
*/
|
||||
// MK: These methods have nothing to do with the seed parameter from the optimizationParameters object which is actually used, so I comment them out
|
||||
// public void setSeed(long seed) {
|
||||
// public void setRandomSeed(long seed) {
|
||||
// RNG.setseed(seed);
|
||||
// }
|
||||
// public long getSeed() {
|
||||
// public long getRandomSeed() {
|
||||
// return RNG.getRandomSeed();
|
||||
// }
|
||||
// public String seedTipText() {
|
||||
|
@ -55,7 +55,7 @@ public abstract class AbstractOptimizationParameters implements InterfaceOptimiz
|
||||
* optimization e.g. with Hill Climbing.
|
||||
*/
|
||||
@Parameter(name = "Post Processing", description = "Parameters for the post processing step.")
|
||||
protected InterfacePostProcessParams postProcessing = new PostProcessParams(false);
|
||||
protected InterfacePostProcessParams postProcessParams = new PostProcessParams(false);
|
||||
|
||||
transient protected InterfacePopulationChangedEventListener populationChangedEventListener;
|
||||
transient private List<InterfaceNotifyOnInformers> toInformAboutInformers = null;
|
||||
@ -70,7 +70,7 @@ public abstract class AbstractOptimizationParameters implements InterfaceOptimiz
|
||||
this.terminator = optimizationParameters.terminator;
|
||||
this.optimizer.setProblem(this.problem);
|
||||
this.randomSeed = optimizationParameters.randomSeed;
|
||||
this.postProcessing = optimizationParameters.postProcessing;
|
||||
this.postProcessParams = optimizationParameters.postProcessParams;
|
||||
}
|
||||
|
||||
public AbstractOptimizationParameters(InterfaceOptimizer opt, InterfaceOptimizationProblem prob, InterfaceTerminator term) {
|
||||
@ -78,7 +78,7 @@ public abstract class AbstractOptimizationParameters implements InterfaceOptimiz
|
||||
optimizer = opt;
|
||||
problem = prob;
|
||||
terminator = term;
|
||||
postProcessing = new PostProcessParams(false);
|
||||
postProcessParams = new PostProcessParams(false);
|
||||
opt.setProblem(prob);
|
||||
}
|
||||
|
||||
@ -92,8 +92,8 @@ public abstract class AbstractOptimizationParameters implements InterfaceOptimiz
|
||||
setProblem(parameters.problem);
|
||||
setTerminator(parameters.terminator);
|
||||
this.optimizer.setProblem(this.problem);
|
||||
setSeed(parameters.randomSeed);
|
||||
setPostProcessParams(parameters.postProcessing);
|
||||
setRandomSeed(parameters.randomSeed);
|
||||
setPostProcessParams(parameters.postProcessParams);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -236,7 +236,7 @@ public abstract class AbstractOptimizationParameters implements InterfaceOptimiz
|
||||
* @param x Long seed.
|
||||
*/
|
||||
@Override
|
||||
public void setSeed(long x) {
|
||||
public void setRandomSeed(long x) {
|
||||
randomSeed = x;
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ public abstract class AbstractOptimizationParameters implements InterfaceOptimiz
|
||||
* @return The current seed for the random number generator.
|
||||
*/
|
||||
@Override
|
||||
public long getSeed() {
|
||||
public long getRandomSeed() {
|
||||
return randomSeed;
|
||||
}
|
||||
|
||||
@ -268,16 +268,16 @@ public abstract class AbstractOptimizationParameters implements InterfaceOptimiz
|
||||
|
||||
@Override
|
||||
public InterfacePostProcessParams getPostProcessParams() {
|
||||
return postProcessing;
|
||||
return postProcessParams;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPostProcessParams(InterfacePostProcessParams ppp) {
|
||||
postProcessing = ppp;
|
||||
postProcessParams = ppp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDoPostProcessing(boolean doPP) {
|
||||
postProcessing.setDoPostProcessing(doPP);
|
||||
postProcessParams.setDoPostProcessing(doPP);
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ public class Processor extends Thread implements InterfaceProcessor, InterfacePo
|
||||
setOptimizationRunning(true);
|
||||
}
|
||||
|
||||
RNG.setRandomSeed(optimizationParameters.getSeed());
|
||||
RNG.setRandomSeed(optimizationParameters.getRandomSeed());
|
||||
|
||||
if (optimizationStateListener != null) {
|
||||
if (wasRestarted) {
|
||||
|
@ -3,11 +3,13 @@ package eva2.optimization.operator.archiving;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.operator.selection.SelectBestIndividuals;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* This simple strategy simply archives all Pareto optimal solutions. This method is
|
||||
* very prone to OutOfMemory errors!
|
||||
*/
|
||||
@Description("This is a straightforward strategy, which selects all dominating individuals (very prone to generate OutOfMemory errors).")
|
||||
public class ArchivingAllDominating extends AbstractArchiving implements java.io.Serializable {
|
||||
|
||||
|
||||
@ -63,18 +65,6 @@ public class ArchivingAllDominating extends AbstractArchiving implements java.io
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is a straightforward strategy, which selects all dominating individuals (very prone to generate OutOfMemory errors).";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -7,17 +7,14 @@ import eva2.optimization.operator.selection.SelectBestIndividuals;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconCross;
|
||||
import eva2.tools.chart2d.DPointIcon;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
|
||||
/**
|
||||
* Another simple archiving strategy not based on dominance but on the MaxiMin
|
||||
* criterion. Doesn't work well on non-convex Pareto fronts.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 09.08.2004
|
||||
* Time: 17:59:26
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("Maxi Min Archiving.")
|
||||
public class ArchivingMaxiMin implements InterfaceArchiving, java.io.Serializable {
|
||||
|
||||
private MOSOMaxiMin maxiMin = new MOSOMaxiMin();
|
||||
@ -85,18 +82,6 @@ public class ArchivingMaxiMin implements InterfaceArchiving, java.io.Serializabl
|
||||
return new Chart2DDPointIconCross();
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "Maxi Min Archiving.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
@ -141,90 +126,4 @@ public class ArchivingMaxiMin implements InterfaceArchiving, java.io.Serializabl
|
||||
public String obeyDebsConstViolationPrincipleToolTip() {
|
||||
return "Toggle the use of Deb's coonstraint violation principle.";
|
||||
}
|
||||
}
|
||||
//extends AbstractArchiving implements java.io.Serializable {
|
||||
//
|
||||
// private MOSOMaxiMin maxiMin = new MOSOMaxiMin();
|
||||
// private InterfaceSelection selections = new SelectBestIndividuals();
|
||||
//
|
||||
// public ArchivingMaxiMin() {
|
||||
// }
|
||||
//
|
||||
// public ArchivingMaxiMin(ArchivingMaxiMin a) {
|
||||
// this.maxiMin = new MOSOMaxiMin();
|
||||
// this.selections = (InterfaceSelection)a.selections.clone();
|
||||
// }
|
||||
//
|
||||
// public Object clone() {
|
||||
// return (Object) new ArchivingMaxiMin(this);
|
||||
// }
|
||||
//
|
||||
// /** This method allows you to merge to populations into an archive.
|
||||
// * This method will add elements from pop to the archive but will also
|
||||
// * remove elements from the archive if the archive target size is exceeded.
|
||||
// * @param pop The population that may add Individuals to the archive.
|
||||
// */
|
||||
// public void addElementsToArchive(Population pop) {
|
||||
// Population archive;
|
||||
// double[] tmpD;
|
||||
// if (pop.getArchive() == null) pop.SetArchive(new Population());
|
||||
//
|
||||
// // First merge the current population and the archive
|
||||
// Population tmpPop = new Population();
|
||||
// tmpPop.addPopulation((Population)pop.getClone());
|
||||
// tmpPop.addPopulation((Population)pop.getArchive().getClone());
|
||||
// tmpPop.removeDoubleInstancesUsingFitness();
|
||||
//
|
||||
// // Now calculate the MaxiMin Criterium
|
||||
// this.maxiMin.convertMultiObjective2SingleObjective(tmpPop);
|
||||
// this.selections.prepareSelection(tmpPop);
|
||||
// archive = this.selections.selectFrom(tmpPop, pop.getArchive().getPopulationSize());
|
||||
// archive.setPopulationSize(pop.getArchive().getPopulationSize());
|
||||
//
|
||||
// // now unconvert from SO to MO
|
||||
// for (int i = 0; i < archive.size(); i++) {
|
||||
// tmpD = (double[])((AbstractEAIndividual)archive.get(i)).getData("MOFitness");
|
||||
// ((AbstractEAIndividual)archive.get(i)).SetFitness(tmpD);
|
||||
// }
|
||||
//
|
||||
// pop.SetArchive(archive);
|
||||
// }
|
||||
//
|
||||
// /** This method allows you to determine an icon for a given individual
|
||||
// * @param pop The population
|
||||
// * @param index The identifier for the individual
|
||||
// */
|
||||
// public DPointIcon getIconFor(int index, Population pop) {
|
||||
// return new Chart2DDPointIconCross();
|
||||
// }
|
||||
//
|
||||
///**********************************************************************************************************************
|
||||
// * These are for GUI
|
||||
// */
|
||||
// /** This method returns a global info string
|
||||
// * @return description
|
||||
// */
|
||||
// public static String globalInfo() {
|
||||
// return "Maxi Min Archiving.";
|
||||
// }
|
||||
// /** This method will return a naming String
|
||||
// * @return The name of the algorithm
|
||||
// */
|
||||
// public String getName() {
|
||||
// return "MaxiMin";
|
||||
// }
|
||||
//
|
||||
// /** Since SelectMOMaxiMin relies on a MOSO conversion
|
||||
// * a single criterion selection method can be used.
|
||||
// * @param pop The selection method used.
|
||||
// */
|
||||
// public void setSelectionMethod(InterfaceSelection pop) {
|
||||
// this.selections = pop;
|
||||
// }
|
||||
// public InterfaceSelection getSelectionMethod() {
|
||||
// return this.selections;
|
||||
// }
|
||||
// public String selectionMethodTipText() {
|
||||
// return "Choose the selection method (single-criteria ones please).";
|
||||
// }
|
||||
//}
|
||||
}
|
@ -4,18 +4,15 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconCross;
|
||||
import eva2.tools.chart2d.DPointIcon;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
/**
|
||||
* The secon verison of the non dominace sorting GA.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 04.08.2003
|
||||
* Time: 16:56:10
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
@Description("Non-dominating sorting GA revision 2.0.")
|
||||
public class ArchivingNSGAII extends ArchivingNSGA implements java.io.Serializable {
|
||||
|
||||
public ArchivingNSGAII() {
|
||||
@ -176,18 +173,6 @@ public class ArchivingNSGAII extends ArchivingNSGA implements java.io.Serializab
|
||||
return new Chart2DDPointIconCross();
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "Non-dominating sorting GA revision 2.0.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -3,18 +3,15 @@ package eva2.optimization.operator.archiving;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* The Pareto envelope sorting algorithm using a hybergrid and
|
||||
* the so called squezze factor.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 05.04.2004
|
||||
* Time: 14:24:54
|
||||
* To change this template use File | Settings | File Templates.
|
||||
* the so called squeeze factor.
|
||||
*/
|
||||
@Description("Pareto Envelope-based Selection Algorithm revision 2.0.")
|
||||
public class ArchivingPESAII extends AbstractArchiving implements java.io.Serializable {
|
||||
|
||||
private int gridSize = 4;
|
||||
@ -173,19 +170,6 @@ public class ArchivingPESAII extends AbstractArchiving implements java.io.Serial
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "Pareto Envelope-based Selection Algorithm revision 2.0.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -10,11 +10,13 @@ import eva2.optimization.population.Population;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconText;
|
||||
import eva2.tools.chart2d.DPoint;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* The strength Pareto EA in it's second version, which is based on
|
||||
* dominance counts.
|
||||
*/
|
||||
@Description("Strength Pareto EA revision 2.0. The variable k to calculate the k-th distance is given by max(2, sqrt(archive.size())).")
|
||||
public class ArchivingSPEAII extends AbstractArchiving implements java.io.Serializable {
|
||||
|
||||
private InterfaceDistanceMetric metric = new ObjectiveSpaceMetric();
|
||||
@ -379,18 +381,6 @@ public class ArchivingSPEAII extends AbstractArchiving implements java.io.Serial
|
||||
return SPEAResult;
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "Strength Pareto EA revision 2.0. The variable k to calculate the k-th distance is given by max(2, sqrt(archive.size())).";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -1,12 +1,14 @@
|
||||
package eva2.optimization.operator.archiving;
|
||||
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* This information retrieval inserts the retrieved
|
||||
* solutions, by removing random individuals from the
|
||||
* population.
|
||||
*/
|
||||
@Description("This Information Retrieval will insert the archive into current population by replacing random individuals if necessary.")
|
||||
public class InformationRetrievalInserting implements InterfaceInformationRetrieval, java.io.Serializable {
|
||||
|
||||
public InformationRetrievalInserting() {
|
||||
@ -43,18 +45,6 @@ public class InformationRetrievalInserting implements InterfaceInformationRetrie
|
||||
pop.addPopulation((Population) archive.getClone());
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This Information Retrieval will insert the archive into current population by replacing random individuals if necessary.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -1,16 +1,13 @@
|
||||
package eva2.optimization.operator.archiving;
|
||||
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* This class allows no information retrieval and thus no elitism
|
||||
* for MOEAs.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 11.03.2004
|
||||
* Time: 14:54:33
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("This implements a deactivated Information Retrieval.")
|
||||
public class InformationRetrievalNone implements InterfaceInformationRetrieval, java.io.Serializable {
|
||||
|
||||
public InformationRetrievalNone() {
|
||||
@ -35,17 +32,6 @@ public class InformationRetrievalNone implements InterfaceInformationRetrieval,
|
||||
// no InterfaceInformation Retrieval is performed
|
||||
return;
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This implements a deactivated Information Retrieval.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
|
@ -2,11 +2,13 @@ package eva2.optimization.operator.archiving;
|
||||
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* This information retrieval method simply add the retrieved solutions
|
||||
* to the current population.
|
||||
*/
|
||||
@Description("This Information Retrieval will replace the current population by the archive.")
|
||||
public class InformationRetrievalReplacing implements InterfaceInformationRetrieval, java.io.Serializable {
|
||||
|
||||
public InformationRetrievalReplacing() {
|
||||
@ -43,18 +45,6 @@ public class InformationRetrievalReplacing implements InterfaceInformationRetrie
|
||||
pop.addPopulation(tmp);
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This Information Retrieval will replace the current population by the archive.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -2,6 +2,7 @@ package eva2.optimization.operator.classification;
|
||||
|
||||
import eva2.tools.chart2d.*;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@ -13,6 +14,7 @@ import java.awt.event.WindowEvent;
|
||||
* for classification. The Dikel flag is an undocumented extension,
|
||||
* which seems to work but is not published.
|
||||
*/
|
||||
@Description("The Self-Organizing Maps, have been proposed by Kohonen (read this book on SOMs for further details).")
|
||||
public class ClassificationSelfOrganizingMaps implements java.io.Serializable, InterfaceClassification {
|
||||
|
||||
/**
|
||||
@ -489,9 +491,6 @@ public class ClassificationSelfOrganizingMaps implements java.io.Serializable, I
|
||||
som.train(data, type);
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -502,15 +501,6 @@ public class ClassificationSelfOrganizingMaps implements java.io.Serializable, I
|
||||
return "Self-Organizing Maps";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The Self-Organizing Maps, have been proposed by Kohonen (read this book on SOMs for further details).";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set the number of neurons
|
||||
* in x dimension
|
||||
|
@ -1,15 +1,15 @@
|
||||
package eva2.optimization.operator.cluster;
|
||||
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Dummy class which assigns all individuals to a single cluster only.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("A dummy clustering implementation which assigns all elements to a single cluster.")
|
||||
public class ClusterAll implements InterfaceClustering, Serializable {
|
||||
|
||||
private boolean assignLoners = false; // should loners be assigned?
|
||||
@ -80,10 +80,6 @@ public class ClusterAll implements InterfaceClustering, Serializable {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "A dummy clustering implementation which assigns all elements to a single cluster.";
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "Cluster-all";
|
||||
}
|
||||
|
@ -5,14 +5,16 @@ import eva2.optimization.operator.distancemetric.InterfaceDistanceMetric;
|
||||
import eva2.optimization.operator.distancemetric.PhenotypeMetric;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.Pair;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
/**
|
||||
* The DBSCAN method. As far as I recall this is an hierachical
|
||||
* The DBSCAN method. As far as I recall this is an hierarchical
|
||||
* clustering method like the single-link method.
|
||||
*/
|
||||
@Description("A density-based clustering algorithm (DBSCAN).")
|
||||
public class ClusteringDensityBased implements InterfaceClusteringDistanceParam, InterfaceClusteringMetricBased, java.io.Serializable {
|
||||
|
||||
private InterfaceDistanceMetric metric = new PhenotypeMetric();
|
||||
@ -233,18 +235,6 @@ public class ClusteringDensityBased implements InterfaceClusteringDistanceParam,
|
||||
return res;
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "A density-based clustering algorithm (DBSCAN).";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -12,13 +12,15 @@ import eva2.problems.F1Problem;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconText;
|
||||
import eva2.tools.chart2d.DPoint;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* The k-mean clustering algorithms. I guess it is not a hierachical
|
||||
* The k-mean clustering algorithms. I guess it is not a hierarchical
|
||||
* clustering method.
|
||||
*/
|
||||
@Description("Oldy but goldy: K-Means clustering.")
|
||||
public class ClusteringKMeans implements InterfaceClustering, java.io.Serializable {
|
||||
|
||||
private int k = 5;
|
||||
@ -404,18 +406,6 @@ public class ClusteringKMeans implements InterfaceClustering, java.io.Serializab
|
||||
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "Oldy but goldy: K-Means clustering.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -8,6 +8,7 @@ import eva2.optimization.operator.distancemetric.PhenotypeMetric;
|
||||
import eva2.optimization.operator.paramcontrol.ParamAdaption;
|
||||
import eva2.optimization.operator.paramcontrol.ParameterControlManager;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
@ -21,9 +22,8 @@ import java.util.Vector;
|
||||
* A tree is produced by assigning each individual the closest individual with better fitness.
|
||||
* Connections with a distance above a certain threshold are cut. After that, each interconnected subtree forms a cluster.
|
||||
* In the paper, the threshold is deduced as 2*d_p for d_p: the mean distance in the population.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("A tree is produced by assigning each individual the closest individual with better fitness. Connections with a distance above a certain threshold are cut. After that, each interconnected subtree forms a cluster.")
|
||||
public class ClusteringNearestBetter implements InterfaceClustering, Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private InterfaceDistanceMetric metric = new PhenotypeMetric();
|
||||
@ -391,10 +391,6 @@ public class ClusteringNearestBetter implements InterfaceClustering, Serializabl
|
||||
}
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "A tree is produced by assigning each individual the closest individual with better fitness. Connections with a distance above a certain threshold are cut. After that, each interconnected subtree forms a cluster.";
|
||||
}
|
||||
|
||||
public String metricTipText() {
|
||||
return "The metric to use during clustering.";
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconText;
|
||||
import eva2.tools.chart2d.DPoint;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@ -18,12 +19,8 @@ import java.util.Arrays;
|
||||
* The x-means clustering method should be able to determine a
|
||||
* suiteable value for k automatically, simply by evaluating all
|
||||
* alternatives.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 23.06.2005
|
||||
* Time: 14:48:35
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("Oldy but goldy: K-Means clustering.")
|
||||
public class ClusteringXMeans implements InterfaceClustering, java.io.Serializable {
|
||||
|
||||
public int maxK = 5;
|
||||
@ -365,18 +362,6 @@ public class ClusteringXMeans implements InterfaceClustering, java.io.Serializab
|
||||
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "Oldy but goldy: K-Means clustering.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -7,11 +7,6 @@ import eva2.optimization.population.Population;
|
||||
* is no true concept on how to calculate a possibly problem
|
||||
* specific distance between two individuals, this is still to
|
||||
* be considered as under construction.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 24.04.2003
|
||||
* Time: 15:13:36
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public interface InterfaceClustering {
|
||||
|
||||
@ -66,19 +61,6 @@ public interface InterfaceClustering {
|
||||
*/
|
||||
public String initClustering(Population pop);
|
||||
|
||||
/**
|
||||
* This method decides if an unclustered individual belongs to an already established species.
|
||||
* For some clustering methods this can only be decided in reference to the complete population.
|
||||
*
|
||||
* @param indy A unclustered individual.
|
||||
* @param species A species.
|
||||
* @param pop The complete population as a reference.
|
||||
* @return True or False.
|
||||
*/
|
||||
//Removed since for some clustering methods its not feasible to associate loners sequentially. Instead, a whole set of
|
||||
// lone individuals can now be associated to a given set of clusters
|
||||
//public boolean belongsToSpecies(AbstractEAIndividual indy, Population species);
|
||||
|
||||
/**
|
||||
* Try to associate a set of loners with a given set of species. Return a list
|
||||
* of indices assigning loner i with species j for all loners. If no species can
|
||||
|
@ -1,11 +1,12 @@
|
||||
package eva2.optimization.operator.constraint;
|
||||
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* To handle a set of constraints with a single parameter adaption mechanism.
|
||||
* Single constraints are
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("A set of constraints with a single parameter adaption mechanism.")
|
||||
public class ConstraintCollection extends AbstractConstraint {
|
||||
private AbstractConstraint[] constraintArray = new AbstractConstraint[]{};
|
||||
|
||||
@ -64,8 +65,4 @@ public class ConstraintCollection extends AbstractConstraint {
|
||||
public String getName() {
|
||||
return constraintArray.length + " constr./" + getPenaltyFactor() + "/" + getHandlingMethod() + "/" + getPenaltyFactControl().getClass().getSimpleName();
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "A set of constraints with a single parameter adaption mechanism.";
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
package eva2.optimization.operator.constraint;
|
||||
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* This constraint is always satisfied.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("This constraint is always fulfilled.")
|
||||
public class DummyConstraint extends AbstractConstraint {
|
||||
|
||||
@Override
|
||||
@ -23,8 +23,4 @@ public class DummyConstraint extends AbstractConstraint {
|
||||
protected double getRawViolationValue(double[] indyX) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "This constraint is always fulfilled.";
|
||||
}
|
||||
}
|
||||
|
@ -3,15 +3,15 @@ package eva2.optimization.operator.constraint;
|
||||
import eva2.optimization.individuals.codings.gp.AbstractGPNode;
|
||||
import eva2.problems.GPFunctionProblem;
|
||||
import eva2.tools.EVAERROR;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* A generic constraint is defined by a String describing a function of the x0...xn values of potential solutions.
|
||||
* The function String is parsed to a GP function tree using AbstractGPNode and GPFunctionProblem.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("A generic constraint which is parsed from a String; n is dimension, x0..xn are solution components. Use prefix notation as in \"+(-(sum(x),n),sqrt(*(pi,x0)))\".")
|
||||
public class GenericConstraint extends AbstractConstraint implements InterfaceDoubleConstraint, Serializable {
|
||||
private String constraintString = "+(x0,x1)";
|
||||
private transient AbstractGPNode constraintProgram = null;
|
||||
@ -20,7 +20,6 @@ public class GenericConstraint extends AbstractConstraint implements InterfaceDo
|
||||
public GenericConstraint() {
|
||||
super();
|
||||
constraintProgram = null;
|
||||
// compileConstraint(constraintString);
|
||||
}
|
||||
|
||||
public GenericConstraint(String str) {
|
||||
@ -110,9 +109,4 @@ public class GenericConstraint extends AbstractConstraint implements InterfaceDo
|
||||
public String getName() {
|
||||
return this.getClass().getSimpleName() + " " + constraintString;
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "A generic constraint which is parsed from a String; n is dimension, x0..xn are solution components. Use prefix notation as in \"+(-(sum(x),n),sqrt(*(pi,x0)))\".";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
package eva2.optimization.operator.constraint;
|
||||
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* A constraint that is already calculated by the fitness function as an
|
||||
* independent criterion. This class can be used to transform it into
|
||||
* a fitness penalty.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("Similar to a multi-objective translation into fitness, this class allows to interpret fitness criteria as constraints.")
|
||||
public class ImplicitConstraint extends AbstractConstraint {
|
||||
int index = 0;
|
||||
|
||||
@ -35,10 +36,6 @@ public class ImplicitConstraint extends AbstractConstraint {
|
||||
return "ImplicitCnstr-" + index;
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "Similar to a multi-objective translation into fitness, this class allows to interpret fitness criteria as constraints.";
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package eva2.optimization.operator.distancemetric;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.tools.EVAERROR;
|
||||
import eva2.tools.math.Mathematics;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -12,12 +13,11 @@ import java.io.Serializable;
|
||||
* <p/>
|
||||
* This can be used with any individual type that implements getDoublePositionShallow.
|
||||
*
|
||||
* @author mkron
|
||||
* @see AbstractEAIndividual.getDoublePositionShallow(AbstractEAIndividual)
|
||||
* @see AbstractEAIndividual#getDoublePositionShallow(AbstractEAIndividual)
|
||||
*/
|
||||
@Description("A simple integral metric for real-valued types.")
|
||||
public class DoubleIntegralMetric implements InterfaceDistanceMetric, Serializable {
|
||||
boolean oneNormed = true; // if true, the vectors are normed to unity sum before comparison.
|
||||
// String indyDataKey=null;
|
||||
|
||||
public DoubleIntegralMetric() {
|
||||
}
|
||||
@ -34,13 +34,6 @@ public class DoubleIntegralMetric implements InterfaceDistanceMetric, Serializab
|
||||
@Override
|
||||
public double distance(AbstractEAIndividual indy1, AbstractEAIndividual indy2) {
|
||||
double[] dIndy1 = null, dIndy2 = null;
|
||||
// String indyDataKey = ParticleSwarmOptimization.partBestPosKey;
|
||||
// if (indyDataKey!=null && (indyDataKey.length()>0)) {
|
||||
// try {
|
||||
// dIndy1 = (double[]) indy1.getData(indyDataKey);
|
||||
// dIndy2 = (double[]) indy2.getData(indyDataKey);
|
||||
// } catch (Exception e) {dIndy1=null;}
|
||||
// } else dIndy1=null;
|
||||
|
||||
if (dIndy1 == null || dIndy2 == null) {
|
||||
dIndy1 = AbstractEAIndividual.getDoublePositionShallow(indy1);
|
||||
@ -76,10 +69,6 @@ public class DoubleIntegralMetric implements InterfaceDistanceMetric, Serializab
|
||||
return "Real-valued integral metric";
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "A simple integral metric for real-valued types.";
|
||||
}
|
||||
|
||||
public boolean isOneNormed() {
|
||||
return oneNormed;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package eva2.optimization.operator.distancemetric;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.individuals.InterfaceDataTypeDouble;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -10,8 +11,9 @@ import java.io.Serializable;
|
||||
* as given by AbstractEAIndividual.getDoublePosition(AbstractEAIndividual).
|
||||
*
|
||||
* @author mkron
|
||||
* @see AbstractEAIndividual.getDoublePosition(AbstractEAIndividual)
|
||||
* @see AbstractEAIndividual#getDoublePosition(AbstractEAIndividual)
|
||||
*/
|
||||
@Description("Set to true to norm the distance by the double range - only possible with InterfaceDataTypeDouble individuals.")
|
||||
public class EuclideanMetric implements InterfaceDistanceMetric, Serializable {
|
||||
private boolean normedByDblRange = false;
|
||||
|
||||
@ -93,7 +95,7 @@ public class EuclideanMetric implements InterfaceDistanceMetric, Serializable {
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The euclidean metric calculates euclidian distances for individuals which have a real valued interpretation.";
|
||||
return "The euclidean metric calculates euclidean distances for individuals which have a real valued interpretation.";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -112,9 +114,5 @@ public class EuclideanMetric implements InterfaceDistanceMetric, Serializable {
|
||||
public boolean isNormedByDblRange() {
|
||||
return normedByDblRange;
|
||||
}
|
||||
|
||||
public String normedByDblRangeTipText() {
|
||||
return "Set to true to norm the distance by the double range - only possible with InterfaceDataTypeDouble individuals.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,17 +3,14 @@ package eva2.optimization.operator.distancemetric;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.individuals.InterfaceGAIndividual;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
/**
|
||||
* Distance based on a bit-set if any.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 27.04.2003
|
||||
* Time: 18:21:01
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
@Description("This is a genotype based distance metric suited for binary data. The hamming distance is computed and normalized by chromosome length.")
|
||||
public class GenotypeMetricBitSet implements InterfaceDistanceMetric, java.io.Serializable {
|
||||
|
||||
public GenotypeMetricBitSet() {
|
||||
@ -63,17 +60,6 @@ public class GenotypeMetricBitSet implements InterfaceDistanceMetric, java.io.Se
|
||||
}
|
||||
return result / (double) length;
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is a genotype based distance metric suited for binary data. The hamming distance is computed and normalized by chromosome length.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
|
@ -3,6 +3,7 @@ package eva2.optimization.operator.distancemetric;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.strategies.ParticleSwarmOptimization;
|
||||
import eva2.tools.EVAERROR;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -10,9 +11,8 @@ import java.io.Serializable;
|
||||
* Define a metric on data stored within individuals, such as the personal best position
|
||||
* in PSO. The metric tries to set the stored data as double position to an indy clone.
|
||||
* On these clones, the base metric is applied.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("Uses individual object data (so far only double[]) to calculate the distance.")
|
||||
public class IndividualDataMetric implements InterfaceDistanceMetric, Serializable {
|
||||
private String dataKey = ParticleSwarmOptimization.partBestPosKey;
|
||||
// private boolean normedDistance = true; // flag whether to use normed distances (for InterfaceDataTypeDouble)
|
||||
@ -89,16 +89,6 @@ public class IndividualDataMetric implements InterfaceDistanceMetric, Serializab
|
||||
public String normedDistanceTipText() {
|
||||
return "Flag whether to use euclidean distance directly or normed by the double range.";
|
||||
}
|
||||
// public boolean isNormedDistance() {
|
||||
// return normedDistance;
|
||||
// }
|
||||
// public void setNormedDistance(boolean normedDistance) {
|
||||
// this.normedDistance = normedDistance;
|
||||
// }
|
||||
|
||||
public static String globalInfo() {
|
||||
return "Uses individual object data (so far only double[]) to calculate the distance.";
|
||||
}
|
||||
|
||||
public void setBaseMetric(InterfaceDistanceMetric baseMetric) {
|
||||
this.baseMetric = baseMetric;
|
||||
|
@ -1,15 +1,12 @@
|
||||
package eva2.optimization.operator.distancemetric;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Objective space metric suited for multi-objective optimization.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 04.08.2003
|
||||
* Time: 14:39:47
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
@Description("The objective space metric calculates euclidian distances on the fitness vectors.")
|
||||
public class ObjectiveSpaceMetric implements InterfaceDistanceMetric, java.io.Serializable {
|
||||
|
||||
public ObjectiveSpaceMetric() {
|
||||
@ -45,17 +42,6 @@ public class ObjectiveSpaceMetric implements InterfaceDistanceMetric, java.io.Se
|
||||
}
|
||||
return Math.sqrt(result);
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The objective space metric calculates euclidian distances on the fitness vectors.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
|
@ -3,15 +3,14 @@ package eva2.optimization.operator.distancemetric;
|
||||
|
||||
import eva2.gui.BeanInspector;
|
||||
import eva2.optimization.individuals.*;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
/**
|
||||
* A phenotype metric suited for the most common data types.
|
||||
* <p/>
|
||||
* User: streiche
|
||||
* Date: 19.07.2005
|
||||
*/
|
||||
@Description("This is a phenotype based metric which can be applied to binary, integer, double, permutation, and program data types. For the latter two, the Levenshtein distance is computed. All distance values are normed.")
|
||||
public class PhenotypeMetric implements InterfaceDistanceMetric, java.io.Serializable {
|
||||
private static PhenotypeMetric pMetric = null;
|
||||
private static GenotypeMetricBitSet bitMetric = null;
|
||||
@ -223,18 +222,6 @@ public class PhenotypeMetric implements InterfaceDistanceMetric, java.io.Seriali
|
||||
return Math.sqrt(result);
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is a phenotype based metric which can be applied to binary, integer, double, permutation, and program data types. For the latter two, the Levenshtein distance is computed. All distance values are normed.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -3,6 +3,7 @@ package eva2.optimization.operator.distancemetric;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.individuals.InterfaceDataTypeDouble;
|
||||
import eva2.optimization.operator.mutation.MutateESGlobal;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* This method includes the sigma as distance element.
|
||||
@ -10,12 +11,8 @@ import eva2.optimization.operator.mutation.MutateESGlobal;
|
||||
* at least on real-valued search spaces together
|
||||
* with the correct mutation operator. I guess this
|
||||
* could be a paper, but I'm so lazy right now.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 23.04.2004
|
||||
* Time: 12:48:26
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("This is an experimental method for individuals using global ES mutation.")
|
||||
public class SigmaSingleMetricGlobalMutation implements InterfaceDistanceMetric, java.io.Serializable {
|
||||
|
||||
public SigmaSingleMetricGlobalMutation() {
|
||||
@ -66,17 +63,6 @@ public class SigmaSingleMetricGlobalMutation implements InterfaceDistanceMetric,
|
||||
return 1.0;
|
||||
}
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is an experimental method for individuals using global ES mutation.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
|
@ -4,11 +4,13 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.operator.cluster.ClusteringDensityBased;
|
||||
import eva2.optimization.operator.cluster.InterfaceClustering;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* The fitness modifier are defunct and are to be moved to
|
||||
* the selection operators...
|
||||
*/
|
||||
@Description("This is a normation method based on Fitness Sharing. It adds a penalty for too similar individuals on the standard Normation method.")
|
||||
public class FitnessAdaptiveClustering implements java.io.Serializable, InterfaceFitnessModifier {
|
||||
|
||||
private InterfaceClustering clusteringAlgorithm = new ClusteringDensityBased();
|
||||
@ -61,18 +63,6 @@ public class FitnessAdaptiveClustering implements java.io.Serializable, Interfac
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is a normation method based on Fitness Sharing. It adds a penalty for too similar individuals on the standard Normation method.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set/get the clustering method on which the
|
||||
* species convergence is based.
|
||||
|
@ -1,16 +1,13 @@
|
||||
package eva2.optimization.operator.fitnessmodifier;
|
||||
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* The fitness modifier are defunct and are to be moved to
|
||||
* the selection operators...
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 30.03.2004
|
||||
* Time: 17:43:49
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("With this method the fitness remains unaltered.")
|
||||
public class FitnessModifierNone implements java.io.Serializable, InterfaceFitnessModifier {
|
||||
|
||||
/**
|
||||
@ -24,9 +21,6 @@ public class FitnessModifierNone implements java.io.Serializable, InterfaceFitne
|
||||
// as the name might suggest this guy is pretty lazy
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -36,14 +30,5 @@ public class FitnessModifierNone implements java.io.Serializable, InterfaceFitne
|
||||
public String getName() {
|
||||
return "No Fitness Modification";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "With this method the fitness remains unaltered.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,13 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.operator.distancemetric.InterfaceDistanceMetric;
|
||||
import eva2.optimization.operator.distancemetric.PhenotypeMetric;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* The fitness modifier are defunct and are to be moved to
|
||||
* the selection operators...
|
||||
*/
|
||||
@Description("This is a normation method based on Fitness Sharing. It adds a penalty for too similar individuals on the standard Normation method.")
|
||||
public class FitnessSharing implements java.io.Serializable, InterfaceFitnessModifier {
|
||||
|
||||
private double sharingDistance = 0.05;
|
||||
@ -64,18 +66,6 @@ public class FitnessSharing implements java.io.Serializable, InterfaceFitnessMod
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is a normation method based on Fitness Sharing. It adds a penalty for too similar individuals on the standard Normation method.";
|
||||
}
|
||||
|
||||
/**
|
||||
* These methods allows you to set/get the Sharing Distance
|
||||
*
|
||||
|
@ -2,14 +2,13 @@ package eva2.optimization.operator.initialization;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* A dummy initialization method which only calls the default initialize method of the individual.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("Uses the standard initialization of the individual implementation")
|
||||
public class DefaultInitialization implements InterfaceInitialization, java.io.Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public DefaultInitialization() {
|
||||
}
|
||||
@ -27,8 +26,4 @@ public class DefaultInitialization implements InterfaceInitialization, java.io.S
|
||||
public String getName() {
|
||||
return "DefaultInitialization";
|
||||
}
|
||||
|
||||
public String globalInfo() {
|
||||
return "Uses the standard initialization of the individual implementation";
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.EVAERROR;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
@ -18,7 +19,7 @@ import java.util.BitSet;
|
||||
* integer individuals, it allows to control the number of occurrences of a certain integer
|
||||
* per segment. It may also be used to initialize with subsets of integers (by setting 0
|
||||
* elements to a certain type and all to a subset of the range).
|
||||
* <p/>
|
||||
* </p><p>
|
||||
* The initialization may be parameterized in two ways, where each takes a fixed
|
||||
* segment length s. Firstly, a fixed number of bits (k<=s) is set per segment,
|
||||
* so each segment has equal cardinality.
|
||||
@ -26,9 +27,9 @@ import java.util.BitSet;
|
||||
* each segment i, so different segments may have different cardinality. The array
|
||||
* must comply to the binary genotype length of the problem. The array definition
|
||||
* has strict priority over the fixed cardinality definition.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("A method which initializes with a fixed number of occurences per segment, which is a fixed-length" +
|
||||
" substring of equal length. In the binary case, thus the cardinality of each segment can be predefined.")
|
||||
public class GAGIInitializeSegmentwise implements InterfaceInitialization, java.io.Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected int[] bitsPerSegmentArray = new int[0];
|
||||
@ -93,14 +94,6 @@ public class GAGIInitializeSegmentwise implements InterfaceInitialization, java.
|
||||
public InterfaceInitialization clone() {
|
||||
return new GAGIInitializeSegmentwise(this);
|
||||
}
|
||||
//
|
||||
// public static void main(String[] args) {
|
||||
// GAGIInitializeSegmentwise initialize = new GAGIInitializeSegmentwise(5, new int[]{5,0}, 0.5);
|
||||
// GIIndividualIntegerData indy = new GIIndividualIntegerData();
|
||||
// indy.setInitOperator(initialize);
|
||||
// indy.initialize(null);
|
||||
// System.out.println(indy.getStringRepresentation());
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void initialize(AbstractEAIndividual indy,
|
||||
@ -287,16 +280,10 @@ public class GAGIInitializeSegmentwise implements InterfaceInitialization, java.
|
||||
return "The fixed length of a segment, which is a substring of the binary genotype";
|
||||
}
|
||||
|
||||
////////
|
||||
public String getName() {
|
||||
return "GA-GI segment-wise initialize";
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "A method which initializes with a fixed number of occurences per segment, which is a fixed-length" +
|
||||
" substring of equal length. In the binary case, thus the cardinality of each segment can be predefined.";
|
||||
}
|
||||
|
||||
public int getTargetElement() {
|
||||
return targetElement;
|
||||
}
|
||||
|
@ -4,11 +4,13 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.individuals.IndividualInterface;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
|
||||
/**
|
||||
* Mutate individuals using the default operator implemented by the individuals themselves.
|
||||
*/
|
||||
@Description("The default mutation just uses the default method implemented in the individual.")
|
||||
public class MutateDefault implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
/**
|
||||
@ -51,9 +53,7 @@ public class MutateDefault implements InterfaceMutation, java.io.Serializable {
|
||||
*/
|
||||
@Override
|
||||
public void mutate(AbstractEAIndividual individual) {
|
||||
if (individual instanceof IndividualInterface) {
|
||||
individual.defaultMutate();
|
||||
}
|
||||
individual.defaultMutate();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -79,9 +79,6 @@ public class MutateDefault implements InterfaceMutation, java.io.Serializable {
|
||||
return "Default mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -91,13 +88,4 @@ public class MutateDefault implements InterfaceMutation, java.io.Serializable {
|
||||
public String getName() {
|
||||
return "Default mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The default mutation just uses the default method implemented in the individual.";
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -12,6 +13,7 @@ import java.util.ArrayList;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Description("This meta-mutation operator allows you to combine multiple alternative mutation operators.")
|
||||
public class MutateEAMixer implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
private PropertyMutationMixer mutationMixer;
|
||||
@ -180,9 +182,6 @@ public class MutateEAMixer implements InterfaceMutation, java.io.Serializable {
|
||||
return "EA mutation mixer";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -193,15 +192,6 @@ public class MutateEAMixer implements InterfaceMutation, java.io.Serializable {
|
||||
return "EA mutation mixer";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This meta-mutation operator allows you to combine multiple alternative mutation operators.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Choose the set of mutators.
|
||||
*
|
||||
|
@ -6,6 +6,7 @@ import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.Mathematics;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -15,12 +16,13 @@ import java.util.ArrayList;
|
||||
* updates the velocity by rotation and scaling, and then mutates the individual
|
||||
* by adding the velocity. This was used for a particle filter localization problem
|
||||
* and is less useful in general.
|
||||
* <p/>
|
||||
* </p><p>
|
||||
* Rotation vectors are normal distributed with mean zero, scaling factors are
|
||||
* log-normally distributed around mean 1. This means that the averaged expected change
|
||||
* of the mutation vector is zero. The smaller the deviations, the higher the correlations
|
||||
* between successive mutation steps.
|
||||
*/
|
||||
@Description("The correlated vector mutation stores a specific mutation vector per individual.")
|
||||
public class MutateESCorrVector implements InterfaceMutation, java.io.Serializable {
|
||||
protected double scalingDev = 0.05;
|
||||
protected double initialVelocity = 0.02;
|
||||
@ -208,9 +210,6 @@ public class MutateESCorrVector implements InterfaceMutation, java.io.Serializab
|
||||
return "ES global mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -221,15 +220,6 @@ public class MutateESCorrVector implements InterfaceMutation, java.io.Serializab
|
||||
return "ES correlated vector mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The correlated vector mutation stores a specific mutation vector per individual.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the initial mutation step size with this method.
|
||||
*
|
||||
|
@ -5,14 +5,11 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 02.04.2003
|
||||
* Time: 17:58:30
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
@Description("The local correlated mutation stores n sigmas for each double attribute and n(n-1) alphas.")
|
||||
public class MutateESCorrolated implements InterfaceMutation, java.io.Serializable {
|
||||
protected double mutationStepSize = 0.2;
|
||||
protected double tau1 = 0.15;
|
||||
@ -228,9 +225,6 @@ public class MutateESCorrolated implements InterfaceMutation, java.io.Serializab
|
||||
return "ES local correlated mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -241,15 +235,6 @@ public class MutateESCorrolated implements InterfaceMutation, java.io.Serializab
|
||||
return "ES local correlated mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The local correlated mutation stores n sigmas for each double attribute and n(n-1) alphas.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value for tau2 with this method.
|
||||
*
|
||||
|
@ -8,10 +8,11 @@ import eva2.tools.math.Jama.EigenvalueDecomposition;
|
||||
import eva2.tools.math.Jama.Matrix;
|
||||
import eva2.tools.math.Mathematics;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
@Description("This is the most sophisticated CMA mutation.")
|
||||
public class MutateESCovarianceMatrixAdaption implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
protected int D;
|
||||
@ -307,9 +308,7 @@ public class MutateESCovarianceMatrixAdaption implements InterfaceMutation, java
|
||||
public String getStringRepresentation() {
|
||||
return "CMA mutation";
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -320,15 +319,6 @@ public class MutateESCovarianceMatrixAdaption implements InterfaceMutation, java
|
||||
return "CMA mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is the most sophisticated CMA mutation.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Use only positive numbers this limits the freedom of effect.
|
||||
*
|
||||
|
@ -5,7 +5,9 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.Jama.Matrix;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
@Description("This is the CMA mutation according to Igel,Hansen,Roth 2007")
|
||||
public class MutateESCovarianceMatrixAdaptionPlus extends
|
||||
MutateESCovarianceMatrixAdaption implements InterfaceMutation,
|
||||
InterfaceAdaptOperatorGenerational {
|
||||
@ -215,15 +217,6 @@ public class MutateESCovarianceMatrixAdaptionPlus extends
|
||||
return "CMA mutation for plus Strategies";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is the CMA mutation according to Igel,Hansen,Roth 2007";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStringRepresentation() {
|
||||
// TODO Auto-generated method stub
|
||||
|
@ -5,14 +5,11 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 08.09.2004
|
||||
* Time: 17:05:23
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("The fixed step size mutation alters all elements with a fixed mutation step size.")
|
||||
public class MutateESFixedStepSize implements InterfaceMutation, java.io.Serializable {
|
||||
protected double sigma = 0.005;
|
||||
|
||||
@ -114,9 +111,6 @@ public class MutateESFixedStepSize implements InterfaceMutation, java.io.Seriali
|
||||
return "ES fixed step size mutation " + getSigma();
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -127,15 +121,6 @@ public class MutateESFixedStepSize implements InterfaceMutation, java.io.Seriali
|
||||
return "ES fixed step size mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The fixed step size mutation alters all elements with a fixed mutation step size.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value for Sigma with this method.
|
||||
*
|
||||
|
@ -8,6 +8,7 @@ import eva2.optimization.population.PopulationInterface;
|
||||
import eva2.problems.InterfaceAdditionalPopulationInformer;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -15,6 +16,7 @@ import java.util.ArrayList;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Description("The global mutation stores only one sigma for all double attributes.")
|
||||
public class MutateESGlobal implements InterfaceMutation, java.io.Serializable, InterfaceAdditionalPopulationInformer {
|
||||
protected double mutationStepSize = 0.2;
|
||||
protected double tau1 = 0.15;
|
||||
@ -179,9 +181,6 @@ public class MutateESGlobal implements InterfaceMutation, java.io.Serializable,
|
||||
return "ES global mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -192,15 +191,6 @@ public class MutateESGlobal implements InterfaceMutation, java.io.Serializable,
|
||||
return "ES global mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The global mutation stores only one sigma for all double attributes.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the initial mutation step size with this method.
|
||||
*
|
||||
|
@ -10,12 +10,14 @@ import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.SelectedTag;
|
||||
import eva2.tools.Tag;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Description("The local mutation stores n sigmas for each double attribute.")
|
||||
public class MutateESLocal implements InterfaceMutation, InterfaceAdditionalPopulationInformer, java.io.Serializable {
|
||||
|
||||
protected double mutationStepSize = 0.2;
|
||||
@ -217,9 +219,6 @@ public class MutateESLocal implements InterfaceMutation, InterfaceAdditionalPopu
|
||||
return "ES local mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -230,15 +229,6 @@ public class MutateESLocal implements InterfaceMutation, InterfaceAdditionalPopu
|
||||
return "ES local mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The local mutation stores n sigmas for each double attribute.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the initial mutation step size with this method.
|
||||
*
|
||||
|
@ -6,10 +6,12 @@ import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.Mathematics;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Description("This is the most sophisticated MVA mutation.")
|
||||
public class MutateESMainVectorAdaption implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
private boolean checkConstraints = true;
|
||||
@ -242,9 +244,7 @@ public class MutateESMainVectorAdaption implements InterfaceMutation, java.io.Se
|
||||
public String getStringRepresentation() {
|
||||
return "MVA mutation";
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -255,15 +255,6 @@ public class MutateESMainVectorAdaption implements InterfaceMutation, java.io.Se
|
||||
return "MVA mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is the most sophisticated MVA mutation.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Use only positive numbers this limits the freedom of effect.
|
||||
*
|
||||
|
@ -5,10 +5,12 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Description("The mutative step size control mutation randomly increases/decreases the current step size.")
|
||||
public class MutateESMutativeStepSizeControl implements InterfaceMutation, java.io.Serializable {
|
||||
protected double mutationStepSize = 0.2;
|
||||
protected double alpha = 1.2;
|
||||
@ -161,15 +163,6 @@ public class MutateESMutativeStepSizeControl implements InterfaceMutation, java.
|
||||
return "MSR";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The mutative step size control mutation randomly increases/decreases the current step size.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the initial mutation step size with this method.
|
||||
*
|
||||
|
@ -6,6 +6,7 @@ import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.Mathematics;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* ES mutation with path length control. The step size (single sigma) is
|
||||
@ -13,6 +14,7 @@ import eva2.tools.math.RNG;
|
||||
* to the expected path length in for uncorrelated single steps.
|
||||
* See Hansen&Ostermeier 2001, Eqs. 16,17.
|
||||
*/
|
||||
@Description("The single step size is controlled using the evolution path.")
|
||||
public class MutateESPathLengthAdaption implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
private int dim;
|
||||
@ -217,9 +219,7 @@ public class MutateESPathLengthAdaption implements InterfaceMutation, java.io.Se
|
||||
public String getStringRepresentation() {
|
||||
return "Mutation/Path-Length-Control";
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -230,28 +230,6 @@ public class MutateESPathLengthAdaption implements InterfaceMutation, java.io.Se
|
||||
return "Mutation/Path-Length-Control";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The single step size is controlled using the evolution path.";
|
||||
}
|
||||
|
||||
// /** Use only positive numbers this limits the freedom of effect.
|
||||
// * @param bit The new representation for the inner constants.
|
||||
// */
|
||||
// public void setUsePath(boolean bit) {
|
||||
// this.usePath = bit;
|
||||
// }
|
||||
// public boolean getUsePath() {
|
||||
// return this.usePath;
|
||||
// }
|
||||
// public String usePathTipText() {
|
||||
// return "Use path.";
|
||||
// }
|
||||
|
||||
/**
|
||||
* This method allows you to set the initial sigma value.
|
||||
*
|
||||
|
@ -5,10 +5,12 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Description("The polynomial mutation alters all elements according to a polynomial distribution")
|
||||
public class MutateESPolynomial implements InterfaceMutation, java.io.Serializable {
|
||||
private double eta = 0.2;
|
||||
|
||||
@ -119,9 +121,6 @@ public class MutateESPolynomial implements InterfaceMutation, java.io.Serializab
|
||||
return "ES fixed step size mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -132,15 +131,6 @@ public class MutateESPolynomial implements InterfaceMutation, java.io.Serializab
|
||||
return "ES polynomial mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public String globalInfo() {
|
||||
return "The polynomial mutation alters all elements according to a polynomial distribution";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set the number of crossovers that occur in the
|
||||
* genotype.
|
||||
|
@ -14,6 +14,7 @@ import eva2.tools.Pair;
|
||||
import eva2.tools.math.Jama.EigenvalueDecomposition;
|
||||
import eva2.tools.math.Mathematics;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -28,9 +29,8 @@ import java.io.Serializable;
|
||||
* in the populations, so that in principle, multi-modal optimization with several populations becomes possible.
|
||||
* This of course requires proper handling of the generational cycle, i.e., new generations should be cloned from
|
||||
* the former ones (without individuals is ok) so that the parameters are taken over.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("The CMA mutator scheme with static cov. matrix, rank-mu update and weighted recombination.")
|
||||
public class MutateESRankMuCMA implements InterfaceAdaptOperatorGenerational, InterfaceMutation, Serializable {
|
||||
// int dim;
|
||||
private double c_c, expRandStepLen;
|
||||
@ -518,10 +518,6 @@ public class MutateESRankMuCMA implements InterfaceAdaptOperatorGenerational, In
|
||||
return "Rank-Mu-CMA-Mutator";
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "The CMA mutator scheme with static cov. matrix, rank-mu update and weighted recombination.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(AbstractEAIndividual individual,
|
||||
InterfaceOptimizationProblem opt) {
|
||||
|
@ -10,12 +10,8 @@ package eva2.optimization.operator.mutation;
|
||||
//import eva2.tools.math.RNG;
|
||||
//
|
||||
///**
|
||||
// * Created by IntelliJ IDEA.
|
||||
// * User: streiche
|
||||
// * Date: 15.05.2003
|
||||
// * Time: 17:04:24
|
||||
// * To change this template use Options | File Templates.
|
||||
// */
|
||||
//@Description("The standard mutation alters all elements of the double attributes with a fixed mutation step size.")
|
||||
//public class MutateESStandard implements InterfaceMutation, java.io.Serializable {
|
||||
// protected double mutationStepSize = 0.1;
|
||||
// public MutateESStandard() {
|
||||
@ -88,10 +84,7 @@ package eva2.optimization.operator.mutation;
|
||||
// public String getStringRepresentation() {
|
||||
// return "ES standard mutation";
|
||||
// }
|
||||
//
|
||||
///**********************************************************************************************************************
|
||||
// * These are for GUI
|
||||
// */
|
||||
|
||||
// /** This method allows the CommonJavaObjectEditorPanel to read the
|
||||
// * name to the current object.
|
||||
// * @return The name.
|
||||
@ -99,12 +92,6 @@ package eva2.optimization.operator.mutation;
|
||||
// public String getName() {
|
||||
// return "ES standard mutation ";
|
||||
// }
|
||||
// /** This method returns a global info string
|
||||
// * @return description
|
||||
// */
|
||||
// public static String globalInfo() {
|
||||
// return "The standard mutation alters all elements of the double attributes with a fixed mutation step size.";
|
||||
// }
|
||||
//
|
||||
// /** This method allows you to set the fixed mutation step size
|
||||
// * @param step The new mutation step size
|
||||
|
@ -2,10 +2,12 @@ package eva2.optimization.operator.mutation;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Success rule implementation.
|
||||
*/
|
||||
@Description("The 1/5 success rule works only together with an ES optimizer.")
|
||||
public class MutateESSuccessRule extends MutateESFixedStepSize implements InterfaceMutation, InterfaceAdaptOperatorGenerational, java.io.Serializable {
|
||||
protected double successRate = 0.2;
|
||||
protected double alpha = 1.2;
|
||||
@ -90,15 +92,6 @@ public class MutateESSuccessRule extends MutateESFixedStepSize implements Interf
|
||||
return "ES 1/5 Success Rule mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The 1/5 success rule works only together with an ES optimizer.";
|
||||
}
|
||||
|
||||
public String mutationStepSizeTipText() {
|
||||
return "Choose the initial mutation step size.";
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import eva2.optimization.individuals.InterfaceGAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
@ -13,6 +14,7 @@ import java.util.BitSet;
|
||||
* The mutation probability is adapted using a parameter tau and stored in the individual.
|
||||
* Better mutation probabilities are selected indirectly as they produce better offspring.
|
||||
*/
|
||||
@Description("The standard mutation switches n bits of the GA genotype.")
|
||||
public class MutateGAAdaptive implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
protected double mutationStep = 1;
|
||||
@ -120,9 +122,6 @@ public class MutateGAAdaptive implements InterfaceMutation, java.io.Serializable
|
||||
return "GA adaptive mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -133,15 +132,6 @@ public class MutateGAAdaptive implements InterfaceMutation, java.io.Serializable
|
||||
return "GA adaptive mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The standard mutation switches n bits of the GA genotype.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the initial mutation step size with this method.
|
||||
*
|
||||
|
@ -6,6 +6,7 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
@ -15,12 +16,9 @@ import java.util.BitSet;
|
||||
* individual length).
|
||||
* A range of number of par mutations can be given from which the actual number of pairs
|
||||
* is drawn in a uniform way.
|
||||
* <p/>
|
||||
* User: streiche, mkron
|
||||
* Date: 05.08.2004
|
||||
* Time: 17:45:36
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("This mutation operator swaps n random position pairs (bits or integers). The number of mutations is" +
|
||||
" chosen uniformly in a given interval.")
|
||||
public class MutateGAGISwapBits implements InterfaceMutation, java.io.Serializable {
|
||||
private int minNumMutations = 1;
|
||||
private int maxNumMutations = 3;
|
||||
@ -221,16 +219,6 @@ public class MutateGAGISwapBits implements InterfaceMutation, java.io.Serializab
|
||||
return "GA-GI swap bits mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This mutation operator swaps n random position pairs (bits or integers). The number of mutations is" +
|
||||
" chosen uniformly in a given interval.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set the number of mutations that occur in the
|
||||
* genotype.
|
||||
|
@ -1,15 +1,16 @@
|
||||
package eva2.optimization.operator.mutation;
|
||||
|
||||
import eva2.tools.EVAERROR;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* This implementation restricts the swap positions of the standard swapping mutation
|
||||
* to swaps within subsequences (segments) of the genotype. The segments have a fixed length.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("Segment-wise swapping of elements - the mutation pairs are selected within the same" +
|
||||
" sub-sequence of the genotype.")
|
||||
public class MutateGAGISwapBitsSegmentwise extends MutateGAGISwapBits implements Serializable {
|
||||
private int segmentLength = 8;
|
||||
|
||||
@ -37,11 +38,6 @@ public class MutateGAGISwapBitsSegmentwise extends MutateGAGISwapBits implements
|
||||
return new MutateGAGISwapBitsSegmentwise(this);
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "Segment-wise swapping of elements - the mutation pairs are selected within the same" +
|
||||
" subsequence of the genotype.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "GA-GI swap bits segment-wise mutation";
|
||||
|
@ -5,12 +5,14 @@ import eva2.optimization.individuals.InterfaceGAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Description("This mutation operator inverts n successive bits.")
|
||||
public class MutateGAInvertBits implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
private int numberOfMutations = 1;
|
||||
@ -126,15 +128,6 @@ public class MutateGAInvertBits implements InterfaceMutation, java.io.Serializab
|
||||
return "GA invert n bits mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This mutation operator inverts n successive bits.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set the number of mutations that occur in the
|
||||
* genotype.
|
||||
|
@ -5,12 +5,14 @@ import eva2.optimization.individuals.InterfaceGAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Description("Switch n bits of the GA genotype.")
|
||||
public class MutateGANBit implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
private int numberOfMutations = 1;
|
||||
@ -104,10 +106,6 @@ public class MutateGANBit implements InterfaceMutation, java.io.Serializable {
|
||||
return "GA n-Bit mutation (n=" + this.numberOfMutations + ")";
|
||||
}
|
||||
|
||||
/**
|
||||
* ********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the name to
|
||||
* the current object.
|
||||
@ -118,15 +116,6 @@ public class MutateGANBit implements InterfaceMutation, java.io.Serializable {
|
||||
return "GA n-Bit mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "Switch n bits of the GA genotype.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set the number of mutations that occur in the
|
||||
* genotype.
|
||||
|
@ -6,15 +6,15 @@ import eva2.optimization.individuals.InterfaceGAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
/**
|
||||
* Shift a certain substring within the individual. The length and shift distance
|
||||
* can be predefined or will be selected at random. The shift is performed cyclic.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("This mutation operator shifts n successive along the genotype (cyclic).")
|
||||
public class MutateGAShiftSubstring implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
private int subStringLength = 0;
|
||||
@ -145,9 +145,6 @@ public class MutateGAShiftSubstring implements InterfaceMutation, java.io.Serial
|
||||
return "GA inversion mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -158,15 +155,6 @@ public class MutateGAShiftSubstring implements InterfaceMutation, java.io.Serial
|
||||
return "GA shift bitstring mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This mutation operator shifts n successive along the genotype (cyclic).";
|
||||
}
|
||||
|
||||
public int getSubStringLength() {
|
||||
return subStringLength;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.EVAERROR;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
@ -19,12 +20,9 @@ import java.util.BitSet;
|
||||
* that further mutations are performed recursively with p_mut. Thus, the probability
|
||||
* to perform k mutations per segment is (p_mut)^k. However, more than s mutations per segment will
|
||||
* never be performed.
|
||||
* <p/>
|
||||
* User: mkron
|
||||
* Date: 05.08.2004
|
||||
* Time: 17:45:36
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("This mutation operator swaps bits in sub-segments of the genotype. Each segment is mutated" +
|
||||
" with a certain probability. Depending on the setting, multiple mutations per segment may occur.")
|
||||
public class MutateGASwapBitsSegmentwise implements InterfaceMutation, java.io.Serializable {
|
||||
private double mutationProbPerSegment = 0.7;
|
||||
private boolean multiplesPerSegment = false;
|
||||
@ -151,9 +149,9 @@ public class MutateGASwapBitsSegmentwise implements InterfaceMutation, java.io.S
|
||||
/**
|
||||
* Swap one pair of bits within an indicated segment.
|
||||
*
|
||||
* @param tmpBitSet
|
||||
* @param bs
|
||||
* @param i
|
||||
* @param segmentLength2
|
||||
* @param segLen
|
||||
*/
|
||||
private void swapBitsInSegmentAt(BitSet bs, int i, int segLen) {
|
||||
int indexOne = getRandomIndex(bs, i, segLen, true); // may prefer true bits
|
||||
@ -193,9 +191,6 @@ public class MutateGASwapBitsSegmentwise implements InterfaceMutation, java.io.S
|
||||
return "GA swap bits segment-wise mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -206,16 +201,6 @@ public class MutateGASwapBitsSegmentwise implements InterfaceMutation, java.io.S
|
||||
return "GA swap bits segment-wise mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This mutation operator swaps bits in subsegments of the genotype. Each segment is mutated" +
|
||||
" with a certain probability. Depending on the setting, multiple mutations per segment may occur.";
|
||||
}
|
||||
|
||||
public void setPreferTrueChange(boolean preferPairs) {
|
||||
this.preferPairs = preferPairs;
|
||||
}
|
||||
|
@ -7,14 +7,14 @@ import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.EVAERROR;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Uniform mutation mutates every GA bit with a fixed probability.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("Uniform mutation mutates every GA bit with a fixed probability.")
|
||||
public class MutateGAUniform implements InterfaceMutation, Serializable {
|
||||
double bitwiseProb = 0.1;
|
||||
private boolean useInvertedLength = true;
|
||||
@ -108,8 +108,4 @@ public class MutateGAUniform implements InterfaceMutation, Serializable {
|
||||
public String getName() {
|
||||
return "Uniform-GA-Mutation";
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "Uniform mutation mutates every GA bit with a fixed probability.";
|
||||
}
|
||||
}
|
||||
|
@ -5,14 +5,11 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 30.05.2005
|
||||
* Time: 17:33:46
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("This mutation operator inserts or adds elements to the array.")
|
||||
public class MutateGIInsertDelete implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
int maxLengthOfInsDel = 2;
|
||||
@ -153,9 +150,6 @@ public class MutateGIInsertDelete implements InterfaceMutation, java.io.Serializ
|
||||
return "GI insert/delete mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -166,15 +160,6 @@ public class MutateGIInsertDelete implements InterfaceMutation, java.io.Serializ
|
||||
return "GI insert/delete mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This mutation operator inserts or adds elements to the array.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set the max length of the insert or deletion.
|
||||
*
|
||||
|
@ -5,14 +5,11 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 19.05.2005
|
||||
* Time: 16:15:20
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("The invert mutation inverts a segment of the int[].")
|
||||
public class MutateGIInvert implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
int maxLengthOfInvert = 2;
|
||||
@ -123,9 +120,6 @@ public class MutateGIInvert implements InterfaceMutation, java.io.Serializable {
|
||||
return "GI invert mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -136,15 +130,6 @@ public class MutateGIInvert implements InterfaceMutation, java.io.Serializable {
|
||||
return "GI invert mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The invert mutation inverts a segment of the int[].";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set the max length of invert.
|
||||
*
|
||||
|
@ -5,14 +5,11 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 19.05.2005
|
||||
* Time: 16:02:32
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("The nominal mutation alters n element of the int attributes completely at random.")
|
||||
public class MutateGINominal implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
int numberOfMutations = 2;
|
||||
@ -109,9 +106,6 @@ public class MutateGINominal implements InterfaceMutation, java.io.Serializable
|
||||
return "GI nominal mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -122,15 +116,6 @@ public class MutateGINominal implements InterfaceMutation, java.io.Serializable
|
||||
return "GI nominal mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The nominal mutation alters n element of the int attributes completely at random.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set the number of mutations to occur.
|
||||
*
|
||||
|
@ -5,14 +5,11 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 19.05.2005
|
||||
* Time: 15:53:03
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("The ordinal mutation alters n element of the int attributes based on an ordinal ordering.")
|
||||
public class MutateGIOrdinal implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
double stepSize = 0.1;
|
||||
@ -128,9 +125,6 @@ public class MutateGIOrdinal implements InterfaceMutation, java.io.Serializable
|
||||
return "GI ordinal mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -141,15 +135,6 @@ public class MutateGIOrdinal implements InterfaceMutation, java.io.Serializable
|
||||
return "GI ordinal mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The ordinal mutation alters n element of the int attributes based on an ordinal ordering.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set the mean step size.
|
||||
*
|
||||
|
@ -7,14 +7,18 @@ import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.EVAERROR;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* An integer mutation operator which switches elements within a given subset only.
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
@Description("A mutation operator which switches positions within a given subset only. A random " +
|
||||
"position is chosen but mutated only if its allele is contained" +
|
||||
" in the mutable set. The new allele is chosen from this set as well." +
|
||||
" In case the random positions do not contain a mutable allele, the switching is skipped. " +
|
||||
"This means that fewer switches may occur than expected from the minimal bound.")
|
||||
public class MutateGISubset implements InterfaceMutation, Serializable {
|
||||
private int[] mutableSet = new int[]{0, 1};
|
||||
private int minNumMutations = 1;
|
||||
@ -124,14 +128,6 @@ public class MutateGISubset implements InterfaceMutation, Serializable {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "A mutation operator which switches positions within a given subset only. A random " +
|
||||
"position is chosen but mutated only if its allele is contained" +
|
||||
" in the mutable set. The new allele is chosen from this set as well." +
|
||||
" In case the random positions do not contain a mutable allele, the switching is skipped. " +
|
||||
"This means that fewer switches may occur than expected from the minimal bound.";
|
||||
}
|
||||
|
||||
public int[] getMutableSet() {
|
||||
return mutableSet;
|
||||
}
|
||||
|
@ -5,15 +5,15 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
|
||||
/**
|
||||
* Mutate an integer individual by shifting a connected subsequence within the genotype. The sequence
|
||||
* length is chosen uniformly randomly up to an upper limit. The destination position may either be
|
||||
* fully randomly or also limited to a maximal distance.
|
||||
* <p/>
|
||||
* User: mkron, streiche
|
||||
*/
|
||||
@Description("This mutation translocates a segment of the int[].")
|
||||
public class MutateGITranslocate implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
int maxLengthOfTranslocate = 4;
|
||||
@ -159,9 +159,6 @@ public class MutateGITranslocate implements InterfaceMutation, java.io.Serializa
|
||||
return "GI translocation mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -172,15 +169,6 @@ public class MutateGITranslocate implements InterfaceMutation, java.io.Serializa
|
||||
return "GI translocation mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This mutation translocates a segment of the int[].";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set the max length of invert.
|
||||
*
|
||||
|
@ -6,14 +6,11 @@ import eva2.optimization.individuals.InterfaceGPIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 11.06.2003
|
||||
* Time: 16:52:48
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
@Description("This mutation replaces a random node with a new random subtree.")
|
||||
public class MutateGPAdaptive implements InterfaceMutation, java.io.Serializable {
|
||||
protected double mutationStep = 1;
|
||||
protected double tau1 = 0.15;
|
||||
@ -124,9 +121,6 @@ public class MutateGPAdaptive implements InterfaceMutation, java.io.Serializable
|
||||
return "GP adaptive mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -137,15 +131,6 @@ public class MutateGPAdaptive implements InterfaceMutation, java.io.Serializable
|
||||
return "GP adaptive mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This mutation replaces a random node with a new random subtree.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the initial mutation step size with this method.
|
||||
*
|
||||
|
@ -8,16 +8,13 @@ import eva2.optimization.individuals.codings.gp.GPArea;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 09.09.2004
|
||||
* Time: 17:08:37
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("The node mutation replaces a random node but keeps the descendants.")
|
||||
public class MutateGPSingleNode implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
/**
|
||||
@ -115,9 +112,6 @@ public class MutateGPSingleNode implements InterfaceMutation, java.io.Serializab
|
||||
return "GP node mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -127,13 +121,4 @@ public class MutateGPSingleNode implements InterfaceMutation, java.io.Serializab
|
||||
public String getName() {
|
||||
return "GP node mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The node mutation replaces a random node but keeps the descendants.";
|
||||
}
|
||||
}
|
@ -5,21 +5,12 @@ import eva2.optimization.individuals.InterfaceOBGAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Title: EvA2</p>
|
||||
* <p/>
|
||||
* <p>Description: </p>
|
||||
* <p/>
|
||||
* <p>Copyright: Copyright (c) 2003</p>
|
||||
* <p/>
|
||||
* <p>Company: </p>
|
||||
* Mutates a permutation by flipping edges a given nubmer of times.
|
||||
*
|
||||
* @author planatsc
|
||||
* @version 1.0
|
||||
*/
|
||||
@Description("This mutation operators flips edges of the OBGA.")
|
||||
public class MutateOBGAFlip implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
/**
|
||||
@ -91,9 +82,6 @@ public class MutateOBGAFlip implements InterfaceMutation, java.io.Serializable {
|
||||
return "OBGA flip mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -104,15 +92,6 @@ public class MutateOBGAFlip implements InterfaceMutation, java.io.Serializable {
|
||||
return "OBGA flip mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This mutation operators flips edges of the OBGA.";
|
||||
}
|
||||
|
||||
public int getTimes() {
|
||||
return times;
|
||||
}
|
||||
|
@ -6,16 +6,10 @@ import eva2.optimization.individuals.InterfaceOBGAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Title: EvA2</p>
|
||||
* <p>Description: </p>
|
||||
* <p>Copyright: Copyright (c) 2003</p>
|
||||
* <p>Company: </p>
|
||||
*
|
||||
* @author planatsc
|
||||
* @version 1.0
|
||||
* <p/>
|
||||
* Mutates a permutation by inversion a part of the permutation.
|
||||
* <br><br>
|
||||
@ -25,8 +19,7 @@ import eva2.tools.math.RNG;
|
||||
* 1 2 | 5 4 3 | 6 7 8 9
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
@Description("This mutation operators inverts a certain section of the OBGA.")
|
||||
public class MutateOBGAInversion implements java.io.Serializable, InterfaceMutation {
|
||||
|
||||
public MutateOBGAInversion() {
|
||||
@ -84,10 +77,8 @@ public class MutateOBGAInversion implements java.io.Serializable, InterfaceMutat
|
||||
return "OBGA inversion mutation";
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/** This method allows the CommonJavaObjectEditorPanel to read the
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
* @return The name.
|
||||
*/
|
||||
@ -95,11 +86,4 @@ public class MutateOBGAInversion implements java.io.Serializable, InterfaceMutat
|
||||
return "OBGA inversion mutation";
|
||||
}
|
||||
|
||||
/** This method returns a global info string
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This mutation operators inverts a certain section of the OBGA.";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,14 +4,11 @@ package eva2.optimization.operator.mutation;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.problems.InterfaceOptimizationProblem;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 25.03.2003
|
||||
* Time: 11:42:42
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
@Description("This thing does nothing, really!")
|
||||
public class NoMutation implements InterfaceMutation, java.io.Serializable {
|
||||
|
||||
/**
|
||||
@ -87,13 +84,4 @@ public class NoMutation implements InterfaceMutation, java.io.Serializable {
|
||||
public String getName() {
|
||||
return "No mutation";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This thing does nothing, really!";
|
||||
}
|
||||
}
|
@ -2,10 +2,12 @@ package eva2.optimization.operator.postprocess;
|
||||
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.optimization.enums.PostProcessMethod;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
@Description("Combined clustering and local search post-processing of solutions. Additionally, accuracy checks can be performed on the " +
|
||||
"returned solutions with different thresholds.")
|
||||
public class PostProcessParams implements InterfacePostProcessParams, Serializable {
|
||||
|
||||
protected int postProcessSteps = 5000;
|
||||
@ -150,11 +152,6 @@ public class PostProcessParams implements InterfacePostProcessParams, Serializab
|
||||
return "PostProcessing " + (postProcess ? (postProcessSteps + "/" + postProcessClusterSigma) : "off");
|
||||
}
|
||||
|
||||
public static String globalInfo() {
|
||||
return "Combined clustering and local search post-processing of solutions. Additionally, accuracy checks can be performed on the " +
|
||||
"returned solutions with different thresholds.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public PostProcessMethod getPPMethod() {
|
||||
return method;
|
||||
|
@ -2,12 +2,14 @@ package eva2.optimization.operator.selection;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Simple method to select all.
|
||||
* In case of multiple fitness values the selection
|
||||
* criteria is selected randomly for each selection event. pff
|
||||
* criteria is selected randomly for each selection event.
|
||||
*/
|
||||
@Description("This method selects all individuals.")
|
||||
public class SelectAll implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private boolean obeyDebsConstViolationPrinciple = true;
|
||||
@ -86,9 +88,6 @@ public class SelectAll implements InterfaceSelection, java.io.Serializable {
|
||||
return this.selectFrom(availablePartners, size);
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -99,15 +98,6 @@ public class SelectAll implements InterfaceSelection, java.io.Serializable {
|
||||
return "All Selection";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This method selects all individuals.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
|
@ -4,6 +4,7 @@ package eva2.optimization.operator.selection;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -12,6 +13,8 @@ import java.util.ArrayList;
|
||||
* In case of multiple fitness values the selection
|
||||
* criteria is selected randomly for each selection event.
|
||||
*/
|
||||
@Description("This selection method will select the n-Best individuals." +
|
||||
"This is a single objective selecting method, it will select in respect to a random criterion.")
|
||||
public class SelectBestIndividuals implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private boolean obeyDebsConstViolationPrinciple = true;
|
||||
@ -169,16 +172,6 @@ public class SelectBestIndividuals implements InterfaceSelection, java.io.Serial
|
||||
return this.selectFrom(availablePartners, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This selection method will select the n-Best individuals." +
|
||||
"This is a single objective selecting method, it will select in respect to a random criterion.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -3,13 +3,16 @@ package eva2.optimization.operator.selection;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
|
||||
/**
|
||||
* Select best individual multiple times if necessary.
|
||||
* In case of multiple fitness values the selection
|
||||
* critria is selected randomly for each selection event.
|
||||
* criteria is selected randomly for each selection event.
|
||||
*/
|
||||
@Description("This selection method will select the single Best individual (n-times if necessary)." +
|
||||
"This is a single objective selecting method, it will select in respect to a random criterion.")
|
||||
public class SelectBestSingle implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private boolean obeyDebsConstViolationPrinciple = true;
|
||||
@ -126,18 +129,6 @@ public class SelectBestSingle implements InterfaceSelection, java.io.Serializabl
|
||||
return this.selectFrom(availablePartners, size);
|
||||
}
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This selection method will select the single Best individual (n-times if necessary)." +
|
||||
"This is a single objective selecting method, it will select in respect to a random criterion.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
|
@ -4,6 +4,7 @@ package eva2.optimization.operator.selection;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -11,8 +12,11 @@ import java.util.ArrayList;
|
||||
* This method implements the multiple tournament scheme
|
||||
* for EP.
|
||||
* In case of multiple fitness values the selection
|
||||
* critria is selected randomly for each selection event.
|
||||
* criteria is selected randomly for each selection event.
|
||||
*/
|
||||
@Description("The EP tournament selection performs a number of tournaments per individual, the winner is assigned a point." +
|
||||
" The individuals with the most points are selected." +
|
||||
" This is a single objective selecting method, it will select in respect to a random criterion.")
|
||||
public class SelectEPTournaments implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private int tournamentSize = 4;
|
||||
@ -180,17 +184,6 @@ public class SelectEPTournaments implements InterfaceSelection, java.io.Serializ
|
||||
return "EP Tournament Selection";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The EP tournament selection performs a number of tournaments per individual, the winner is assigned a point." +
|
||||
" The individuals with the most points are selected." +
|
||||
" This is a single objective selecting method, it will select in respect to a random criterion.";
|
||||
}
|
||||
|
||||
/**
|
||||
* You can choose the tournament size.
|
||||
*/
|
||||
|
@ -4,11 +4,14 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.operator.distancemetric.InterfaceDistanceMetric;
|
||||
import eva2.optimization.operator.distancemetric.ObjectiveSpaceMetric;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* An experimental implementation for mating restriction.
|
||||
* Possibly defunct.
|
||||
*/
|
||||
@Description("This selection will select n mates from all individuals within the mating distance (extends Tournament Selection)." +
|
||||
"This is a single objective selecting method, it will select in respect to a random criterion.")
|
||||
public class SelectHomologousMate extends SelectTournament implements java.io.Serializable {
|
||||
|
||||
private double matingRadius = 0.1;
|
||||
@ -67,9 +70,6 @@ public class SelectHomologousMate extends SelectTournament implements java.io.Se
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -81,16 +81,6 @@ public class SelectHomologousMate extends SelectTournament implements java.io.Se
|
||||
return "Homologous Mating Selection";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This selection will select n mates from all individuals within the mating distance (extends Tournament Selection)." +
|
||||
"This is a single objective selecting method, it will select in respect to a random criterion.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to set/get the mating radius.
|
||||
*
|
||||
|
@ -2,12 +2,14 @@ package eva2.optimization.operator.selection;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Experimental selection mechanism for MOMA II where
|
||||
* a single individual is a whole set of Pareto optimal
|
||||
* solution. Currently defunct.
|
||||
*/
|
||||
@Description("This selection method only works for MOMA-II, it selects an individual depending on the number of non-dominated solutions.")
|
||||
public class SelectMOMAIIDominanceCounter implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private InterfaceSelection selection = new SelectBestIndividuals();
|
||||
@ -114,18 +116,6 @@ public class SelectMOMAIIDominanceCounter implements InterfaceSelection, java.io
|
||||
return this.selectFrom(availablePartners, size);
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This selection method only works for MOMA-II, it selects an individual depending on the number of non-dominated solutions.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -3,11 +3,13 @@ package eva2.optimization.operator.selection;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.operator.moso.MOSOMaxiMin;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* A multi-objective selection criterion based on the maximin
|
||||
* method.
|
||||
*/
|
||||
@Description("This selection method will use the MaxiMin criteria to select individuals (use SelectBestIndividuals).")
|
||||
public class SelectMOMaxiMin implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private MOSOMaxiMin maxiMin = new MOSOMaxiMin();
|
||||
@ -82,18 +84,6 @@ public class SelectMOMaxiMin implements InterfaceSelection, java.io.Serializable
|
||||
return this.selectFrom(availablePartners, size);
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This selection method will use the MaxiMin criteria to select individuals (use SelectBestIndividuals).";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -4,11 +4,13 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.operator.archiving.ArchivingNSGAII;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* The infamous NSGA-II selection scheme for multi-objective
|
||||
* optimization based on Pareto ranks and hybergrids.
|
||||
*/
|
||||
@Description("The Crowded Tournament Selection first chooses the better Pareto Front and then the smaller Crowding Distance.")
|
||||
public class SelectMONSGAIICrowedTournament implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private int tournamentSize = 4;
|
||||
@ -152,9 +154,6 @@ public class SelectMONSGAIICrowedTournament implements InterfaceSelection, java.
|
||||
return this.selectFrom(availablePartners, size);
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||
* name to the current object.
|
||||
@ -165,15 +164,6 @@ public class SelectMONSGAIICrowedTournament implements InterfaceSelection, java.
|
||||
return "MO Crowded Tournament Selection";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The Crowded Tournament Selection first chooses the better Pareto Front and then the smaller Crowding Distance.";
|
||||
}
|
||||
|
||||
/**
|
||||
* You can choose the tournament size.
|
||||
*/
|
||||
|
@ -3,12 +3,14 @@ package eva2.optimization.operator.selection;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* This multi-objective selection method preferrs non-dominated
|
||||
* individuals over dominated ones. Actually, this fails in case
|
||||
* all individuals are Pareto optimal.
|
||||
*/
|
||||
@Description("This selection method will select all non-dominated individuals. Therefore the target size of the selection may be exceeded.")
|
||||
public class SelectMONonDominated implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private boolean obeyDebsConstViolationPrinciple = true;
|
||||
@ -131,18 +133,6 @@ public class SelectMONonDominated implements InterfaceSelection, java.io.Seriali
|
||||
return true;
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This selection method will select all non-dominated individuals. Therefore the target size of the selection may be exceeded.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -4,10 +4,12 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.operator.archiving.ArchivingPESAII;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* The multi-objective PESA selection method.
|
||||
*/
|
||||
@Description("Performs a binary tournament selection, preferring the individual with the smaller squeezing factor.")
|
||||
public class SelectMOPESA implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
ArchivingPESAII PESAII = new ArchivingPESAII();
|
||||
@ -99,18 +101,6 @@ public class SelectMOPESA implements InterfaceSelection, java.io.Serializable {
|
||||
return this.selectFrom(availablePartners, size);
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "Performs a binary tournament selection, preferring the individual with the smaller squeezing factor.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -5,6 +5,7 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.operator.archiving.ArchivingPESAII;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
@ -14,6 +15,7 @@ import java.util.Hashtable;
|
||||
* The multi-objective PESA II selection criteria based on an n-dimensional
|
||||
* grid using a squeezing factor.
|
||||
*/
|
||||
@Description("Performs a binary tournament selection, preferring the gridbox of smaller squeezing factor and selecting a random individual from the winner box.")
|
||||
public class SelectMOPESAII implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
ArchivingPESAII PESAII = new ArchivingPESAII();
|
||||
@ -135,18 +137,6 @@ public class SelectMOPESAII implements InterfaceSelection, java.io.Serializable
|
||||
return this.selectFrom(availablePartners, size);
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "Performs a binary tournament selection, preferring the gridbox of smaller squeezing factor and selecting a random individual from the winner box.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -8,11 +8,13 @@ import eva2.optimization.population.Population;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconText;
|
||||
import eva2.tools.chart2d.DPoint;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* The SPEA II selection criteria using strength and raw fitness to determine
|
||||
* good individuals.
|
||||
*/
|
||||
@Description("This selection method calucates the strength and selects using the strength.")
|
||||
public class SelectMOSPEAII implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private InterfaceSelection environmentSelection = new SelectTournament();
|
||||
@ -135,15 +137,6 @@ public class SelectMOSPEAII implements InterfaceSelection, java.io.Serializable
|
||||
return "MO SPEAII selection";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This selection method calucates the strength and selects using the strength.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will set the selection method that is to be used
|
||||
*
|
||||
|
@ -6,13 +6,16 @@ import eva2.optimization.operator.selection.probability.SelProbStandard;
|
||||
import eva2.optimization.operator.selection.probability.SelProbStandardScaling;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
|
||||
/**
|
||||
* This method implements the roulette wheel selection for
|
||||
* a partical filter. In case of multiple fitness values the selection
|
||||
* critria should be selected randomly for each selection event.
|
||||
* a particle filter. In case of multiple fitness values the selection
|
||||
* criteria should be selected randomly for each selection event.
|
||||
*/
|
||||
@Description("This method chooses individuals similar to the static roulette wheel. The chance for each individual to be selected depends on the selection probability. The selection probability is 1 for all Individuals with a fitness that is bigger than the midean fitness." +
|
||||
"This is a single objective selecting method, it will select in respect to a random criterion.")
|
||||
public class SelectParticleWheel implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private boolean obeyDebsConstViolationPrinciple = true;
|
||||
@ -155,16 +158,6 @@ public class SelectParticleWheel implements InterfaceSelection, java.io.Serializ
|
||||
return "Particle Wheel Selection";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This method chooses individuals similar to the static roulette wheel. The chance for each individual to be selected depends on the selection probability. The selection probability is 1 for all Individuals with a fitness that is bigger than the midean fitness." +
|
||||
"This is a single objective selecting method, it will select in respect to a random criterion.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
|
@ -3,11 +3,13 @@ package eva2.optimization.operator.selection;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
|
||||
/**
|
||||
* Random selection typically used for ES as mating selection.
|
||||
*/
|
||||
@Description("This method selects randomly. Therefore, it even works fine on Multiobjective fitness cases.")
|
||||
public class SelectRandom implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private boolean obeyDebsConstViolationPrinciple = false;
|
||||
@ -115,15 +117,6 @@ public class SelectRandom implements InterfaceSelection, java.io.Serializable {
|
||||
return "Random Selection";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This method selects randomly. Therefore, it even works fine on Multiobjective fitness cases.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
|
@ -3,13 +3,16 @@ package eva2.optimization.operator.selection;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.tools.math.RNG;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Tournament selection within a given tournament group size,
|
||||
* also scaling invariant.
|
||||
* In case of multiple fitness values the selection
|
||||
* critria is selected randomly for each selection event.
|
||||
* criteria is selected randomly for each selection event.
|
||||
*/
|
||||
@Description("The tournament selection compares the raw fitness of n individuals and takes the best." +
|
||||
"This is a single-objective method, it selects with respect to the first criterion in the multi-objective case.")
|
||||
public class SelectTournament implements InterfaceSelection, java.io.Serializable {
|
||||
|
||||
private int tournamentSize = 4;
|
||||
@ -126,16 +129,6 @@ public class SelectTournament implements InterfaceSelection, java.io.Serializabl
|
||||
return "Tournament Selection";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "The tournament selection compares the raw fitness of n individuals and takes the best." +
|
||||
"This is a single-objective method, it selects with respect to the first criterion in the multi-objective case.";
|
||||
}
|
||||
|
||||
/**
|
||||
* You can choose the tournament size.
|
||||
*/
|
||||
|
@ -2,12 +2,14 @@ package eva2.optimization.operator.selection.probability;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Boltzman selection, actually it is no a selection method
|
||||
* but a scaling method, but it is very good, because it is
|
||||
* invariant to any linear transition function.
|
||||
*/
|
||||
@Description("This is the Boltzman Normation.")
|
||||
public class SelProbBoltzman extends AbstractSelProb implements java.io.Serializable {
|
||||
|
||||
private double q = 1.0;
|
||||
@ -225,18 +227,6 @@ public class SelProbBoltzman extends AbstractSelProb implements java.io.Serializ
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is the Boltzman Normation.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -4,10 +4,12 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.operator.distancemetric.InterfaceDistanceMetric;
|
||||
import eva2.optimization.operator.distancemetric.PhenotypeMetric;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Here we have the infamous fitness sharing method.
|
||||
*/
|
||||
@Description("This is a fitness sharing based normation method.")
|
||||
public class SelProbFitnessSharing extends AbstractSelProb implements java.io.Serializable {
|
||||
|
||||
private InterfaceSelectionProbability basicNormationMethod = new SelProbStandard();
|
||||
@ -69,18 +71,6 @@ public class SelProbFitnessSharing extends AbstractSelProb implements java.io.Se
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is a fitness sharing based normation method.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -2,16 +2,15 @@ package eva2.optimization.operator.selection.probability;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Scale the fitness of a maximization problem by inverting it by the maximum fitness,
|
||||
* then normalize by fitness sum. This way, maximally bad individuals will receive a
|
||||
* selection probability of zero.
|
||||
*
|
||||
* @author mkron
|
||||
* <p/>
|
||||
* May 2, 2007
|
||||
*/
|
||||
@Description("This is a standard normation method inverted by maximum fitness.")
|
||||
public class SelProbInvertByMax extends AbstractSelProb {
|
||||
|
||||
private double maxFit = 1.;
|
||||
@ -94,18 +93,6 @@ public class SelProbInvertByMax extends AbstractSelProb {
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is a standard normation method inverted by maximum fitness.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -2,15 +2,12 @@ package eva2.optimization.operator.selection.probability;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* A linear ranking method with offsets.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 11.06.2004
|
||||
* Time: 10:30:47
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("This is linear ranking normation.")
|
||||
public class SelProbLinearRanking extends AbstractSelProb implements java.io.Serializable {
|
||||
|
||||
private double nappaPlus = 1.1;
|
||||
@ -171,17 +168,6 @@ public class SelProbLinearRanking extends AbstractSelProb implements java.io.Ser
|
||||
}
|
||||
}
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is linear ranking normation.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
|
@ -2,11 +2,13 @@ package eva2.optimization.operator.selection.probability;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* A non-linear ranking, which is difficult to tune to
|
||||
* the given optimization problem i guess.
|
||||
*/
|
||||
@Description("This is non-linear ranking normation.")
|
||||
public class SelProbNonLinearRanking extends AbstractSelProb implements java.io.Serializable {
|
||||
|
||||
private double c = 0.04;
|
||||
@ -182,17 +184,6 @@ public class SelProbNonLinearRanking extends AbstractSelProb implements java.io.
|
||||
}
|
||||
}
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is non-linear ranking normation.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
|
@ -2,16 +2,13 @@ package eva2.optimization.operator.selection.probability;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* Ranking for calculating the selection probability.
|
||||
* This truly scaling invariant.
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 30.03.2004
|
||||
* Time: 16:58:44
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
@Description("This is ranking normation.")
|
||||
public class SelProbRanking extends AbstractSelProb implements java.io.Serializable {
|
||||
|
||||
public SelProbRanking() {
|
||||
@ -104,17 +101,6 @@ public class SelProbRanking extends AbstractSelProb implements java.io.Serializa
|
||||
}
|
||||
}
|
||||
}
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is ranking normation.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
|
@ -2,12 +2,14 @@ package eva2.optimization.operator.selection.probability;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* A simple sum to calculate the selection probability.
|
||||
* <p/>
|
||||
* p(i is selected) = exp(-fitness(i))/sum_j(exp(-fitness(j)))
|
||||
*/
|
||||
@Description("This is a standard normation method using the exp function.")
|
||||
public class SelProbStandard extends AbstractSelProb implements java.io.Serializable {
|
||||
|
||||
public SelProbStandard() {
|
||||
@ -96,18 +98,6 @@ public class SelProbStandard extends AbstractSelProb implements java.io.Serializ
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is a standard normation method using the exp function.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
@ -2,10 +2,12 @@ package eva2.optimization.operator.selection.probability;
|
||||
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.util.annotation.Description;
|
||||
|
||||
/**
|
||||
* A simple sum with a scaling factor.
|
||||
*/
|
||||
@Description("This is a standard normation method with scaling.")
|
||||
public class SelProbStandardScaling extends AbstractSelProb implements java.io.Serializable {
|
||||
|
||||
private double Q = 0;
|
||||
@ -156,18 +158,6 @@ public class SelProbStandardScaling extends AbstractSelProb implements java.io.S
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* These are for GUI
|
||||
*/
|
||||
/**
|
||||
* This method returns a global info string
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This is a standard normation method with scaling.";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a naming String
|
||||
*
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user