diff --git a/src/eva2/gui/BeanInspector.java b/src/eva2/gui/BeanInspector.java index 43025a7d..8a7b85b6 100644 --- a/src/eva2/gui/BeanInspector.java +++ b/src/eva2/gui/BeanInspector.java @@ -601,19 +601,16 @@ public class BeanInspector { Object args[] = {}; Object ret; - for (String meth : new String[]{"getName", "globalInfo"}) { - ret = callIfAvailable(obj, meth, args); - if (ret != null) { + ret = callIfAvailable(obj, "getName", args); + if (ret != null) { + infoBf.append("\t"); + infoBf.append((String) ret); + } else { + Description description = obj.getClass().getAnnotation(Description.class); + if (description != null) { infoBf.append("\t"); - infoBf.append((String) ret); - } else { - Description description = obj.getClass().getAnnotation(Description.class); - if (description != null) { - infoBf.append("\t"); - infoBf.append(description.value()); - } + infoBf.append(description.value()); } - } return infoBf.toString(); diff --git a/src/eva2/gui/OptimizationEditorPanel.java b/src/eva2/gui/OptimizationEditorPanel.java index 7ea62dce..2fce9928 100644 --- a/src/eva2/gui/OptimizationEditorPanel.java +++ b/src/eva2/gui/OptimizationEditorPanel.java @@ -17,8 +17,6 @@ import java.awt.event.ItemListener; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.lang.reflect.Proxy; import java.util.ArrayList; import java.util.HashMap; @@ -342,21 +340,10 @@ public class OptimizationEditorPanel extends JPanel implements ItemListener { Class[] classParams = new Class[]{}; String tip = null; - try { - Method giMeth = instances.get(i).getDeclaredMethod("globalInfo", classParams); - if (Modifier.isStatic(giMeth.getModifiers())) { - tip = (String) giMeth.invoke(null, (Object[]) null); - } - } catch (Exception e) { - LOGGER.finer(e.getMessage()); - } - // If the globalInfo method doesn't exist try to use the Annotation - if (tip == null || tip.isEmpty()) { - Description description = instances.get(i).getAnnotation(Description.class); - if (description != null) { - tip = description.value(); - } + Description description = instances.get(i).getAnnotation(Description.class); + if (description != null) { + tip = description.value(); } if (tip != null) { diff --git a/src/eva2/gui/PropertySheetPanel.java b/src/eva2/gui/PropertySheetPanel.java index 7d891749..e371eec6 100644 --- a/src/eva2/gui/PropertySheetPanel.java +++ b/src/eva2/gui/PropertySheetPanel.java @@ -240,9 +240,7 @@ public final class PropertySheetPanel extends JPanel implements PropertyChangeLi } } - // Look for a globalInfo method that returns a string - // describing the target - int methsFound = 0; // dont loop too long, so count until all found + int methsFound = 0; // don't loop too long, so count until all found for (MethodDescriptor methodDescriptor : methodDescriptors) { String name = methodDescriptor.getDisplayName(); Method meth = methodDescriptor.getMethod(); diff --git a/src/eva2/optimization/operator/crossover/CM1.java b/src/eva2/optimization/operator/crossover/CM1.java index 7577fd38..128047b5 100644 --- a/src/eva2/optimization/operator/crossover/CM1.java +++ b/src/eva2/optimization/operator/crossover/CM1.java @@ -6,15 +6,15 @@ import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.optimization.strategies.BinaryScatterSearch; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; import java.util.BitSet; /** * This crossover-Method performs a \"union\" of the selected Individuals * It only mates 2 Individuals, not more - * - * @author Alex */ +@Description("This is a Crossover Method for Binary Individuals which just forms the \"union\" of the individuals") public class CM1 implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -66,17 +66,7 @@ public class CM1 implements InterfaceCrossover, java.io.Serializable { return getName(); } - /** - * ************************************************** - * GUI - */ - public String getName() { return "Combination Method 1"; } - - public static String globalInfo() { - return "This is a Crossover Method for Binary Individuals which just forms the \"union\" of the individuals"; - } - } diff --git a/src/eva2/optimization/operator/crossover/CM2.java b/src/eva2/optimization/operator/crossover/CM2.java index cb466b1e..95ef074b 100644 --- a/src/eva2/optimization/operator/crossover/CM2.java +++ b/src/eva2/optimization/operator/crossover/CM2.java @@ -5,15 +5,15 @@ import eva2.optimization.individuals.InterfaceDataTypeBinary; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; import java.util.BitSet; /** * This crossover-Method performs an \"intersection\" of the selected Individuals * It only mates 2 Individuals, not more - * - * @author Alex */ +@Description("This is a Crossover Method for Binary Individuals which just forms the \"intersection\" of the individuals") public class CM2 implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -66,16 +66,7 @@ public class CM2 implements InterfaceCrossover, java.io.Serializable { return getName(); } - /** - * ************************************************** - * GUI - */ - public String getName() { return "Combination Method 2"; } - - public static String globalInfo() { - return "This is a Crossover Method for Binary Individuals which just forms the \"intersection\" of the individuals"; - } } diff --git a/src/eva2/optimization/operator/crossover/CM3.java b/src/eva2/optimization/operator/crossover/CM3.java index f617dc8a..4f8a4820 100644 --- a/src/eva2/optimization/operator/crossover/CM3.java +++ b/src/eva2/optimization/operator/crossover/CM3.java @@ -5,15 +5,15 @@ import eva2.optimization.individuals.InterfaceDataTypeBinary; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; import java.util.BitSet; /** * calculates a weight based on the fitnessValues and the configuration of each bit from the two individuals and use it as a probability to set the bit * It only mates 2 Individuals, not more - * - * @author Alex */ +@Description("Weight driven crossover method") public class CM3 implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -77,17 +77,7 @@ public class CM3 implements InterfaceCrossover, java.io.Serializable { return this.getName(); } - /** - * ************************************************** - * GUI - */ - public String getName() { return "Combination Method 3"; } - - public static String globalInfo() { - return "Weight driven crossover method"; - } - } diff --git a/src/eva2/optimization/operator/crossover/CM4.java b/src/eva2/optimization/operator/crossover/CM4.java index e2c0dc40..f4e788f6 100644 --- a/src/eva2/optimization/operator/crossover/CM4.java +++ b/src/eva2/optimization/operator/crossover/CM4.java @@ -5,15 +5,15 @@ import eva2.optimization.individuals.InterfaceDataTypeBinary; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; import java.util.BitSet; /** * This crossover-Method performs an \"intersection\" of the selected Individuals and then tries to improve it through score (like in CM3) * It only mates 2 Individuals, not more - * - * @author Alex */ +@Description("Intersection with weight driven improvement") public class CM4 implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -79,17 +79,7 @@ public class CM4 implements InterfaceCrossover, java.io.Serializable { return this.getName(); } - /** - * ************************************************** - * GUI - */ - public String getName() { return "Combination Method 4"; } - - public static String globalInfo() { - return "Intersection with weight driven improvement"; - } - } diff --git a/src/eva2/optimization/operator/crossover/CM5.java b/src/eva2/optimization/operator/crossover/CM5.java index 2a7e5f0d..0c601cab 100644 --- a/src/eva2/optimization/operator/crossover/CM5.java +++ b/src/eva2/optimization/operator/crossover/CM5.java @@ -5,15 +5,15 @@ import eva2.optimization.individuals.InterfaceDataTypeBinary; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; import java.util.BitSet; /** * This crossover-Method performs an \"intersection\" of the selected Individuals and then tries to improve it by randomly setting Bits to 1 * It only mates 2 Individuals, not more - * - * @author Alex */ +@Description("Intersection with random change") public class CM5 implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -62,17 +62,7 @@ public class CM5 implements InterfaceCrossover, java.io.Serializable { return this.getName(); } - /** - * ************************************************** - * GUI - */ - public String getName() { return "Combination Method 5"; } - - public static String globalInfo() { - return "Intersection with random change"; - } - } diff --git a/src/eva2/optimization/operator/crossover/CM6.java b/src/eva2/optimization/operator/crossover/CM6.java index b88af9e4..eb938731 100644 --- a/src/eva2/optimization/operator/crossover/CM6.java +++ b/src/eva2/optimization/operator/crossover/CM6.java @@ -6,6 +6,7 @@ import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.optimization.strategies.BinaryScatterSearch; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; import java.util.BitSet; @@ -13,9 +14,8 @@ import java.util.BitSet; * Score driven Crossover-Method. It uses the same score as the BinaryScatterSearch. * Only the first individual of the given Population in the mate method is used. the rest is only for calculating the score * It only mates 2 Individuals, not more - * - * @author Alex */ +@Description("Score driven crossover method") public class CM6 implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -68,17 +68,7 @@ public class CM6 implements InterfaceCrossover, java.io.Serializable { return getName(); } - /** - * ************************************************** - * GUI - */ - public String getName() { return "Combination Method 6"; } - - public static String globalInfo() { - return "score driven crossover method"; - } - } diff --git a/src/eva2/optimization/operator/crossover/CM7.java b/src/eva2/optimization/operator/crossover/CM7.java index 7401fa62..25b872a5 100644 --- a/src/eva2/optimization/operator/crossover/CM7.java +++ b/src/eva2/optimization/operator/crossover/CM7.java @@ -10,8 +10,6 @@ import java.util.BitSet; /** * This crossover-Method tries to convert the first individual into the second. If a better Individual is found on the way, this individual is chosen. * If no better individual is found, one with the greatest distance from the both is chosen - * - * @author Alex */ public class CM7 implements InterfaceCrossover, java.io.Serializable, InterfaceEvaluatingCrossoverOperator { private InterfaceOptimizationProblem optimizationProblem; @@ -88,20 +86,10 @@ public class CM7 implements InterfaceCrossover, java.io.Serializable, InterfaceE return this.evaluations; } - /** - * ************************************************** - * GUI - */ - public String getName() { return "Combination Method 7"; } - public static String globalInfo() { - //TODO - return ""; - } - @Override public void resetEvaluations() { this.evaluations = 0; diff --git a/src/eva2/optimization/operator/crossover/CrossoverESArithmetical.java b/src/eva2/optimization/operator/crossover/CrossoverESArithmetical.java index 65505b5f..f7faa3d2 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESArithmetical.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESArithmetical.java @@ -5,6 +5,7 @@ import eva2.optimization.individuals.InterfaceESIndividual; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** * The children are randomized intermediate combinations of the parents, @@ -12,6 +13,7 @@ import eva2.tools.math.RNG; * where r_i are uniform random numbers normed to the sum of one and * p_ji is the i-th component of parent j. */ +@Description("This is an arithmetical crossover between m ES individuals.") public class CrossoverESArithmetical implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -124,9 +126,6 @@ public class CrossoverESArithmetical implements InterfaceCrossover, java.io.Seri return this.getName(); } - /********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -136,13 +135,4 @@ public class CrossoverESArithmetical implements InterfaceCrossover, java.io.Seri public String getName() { return "ES arithmetical crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is an arithmetical crossover between m ES individuals."; - } } diff --git a/src/eva2/optimization/operator/crossover/CrossoverESBLXAlpha.java b/src/eva2/optimization/operator/crossover/CrossoverESBLXAlpha.java index 790e3839..79b75ac9 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESBLXAlpha.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESBLXAlpha.java @@ -5,14 +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; +import eva2.util.annotation.Parameter; /** - * Created by IntelliJ IDEA. - * User: streiche - * Date: 02.12.2003 - * Time: 14:50:03 - * To change this template use Options | File Templates. */ +@Description("The BLX crossover inits the values within the extreme values plus an additional alpha range (BLX-0.0 equals flat crossover).") public class CrossoverESBLXAlpha implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -130,9 +128,6 @@ public class CrossoverESBLXAlpha implements InterfaceCrossover, java.io.Serializ return this.getName(); } - /********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -143,21 +138,13 @@ public class CrossoverESBLXAlpha implements InterfaceCrossover, java.io.Serializ return "ES BLX Alpha crossover"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "The BLX crossover inits the values within the extreme values plus an additional alpha range (BLX-0.0 equals flat crossover)."; - } - /** * This method allows you to set the number of crossovers that occur in the * genotype. * * @param a The number of crossovers. */ + @Parameter(description = "The alpha of BLX.") public void setAlpha(double a) { if (a < 0) { a = 0; @@ -168,8 +155,4 @@ public class CrossoverESBLXAlpha implements InterfaceCrossover, java.io.Serializ public double getAlpha() { return this.alpha; } - - public String alphaTipText() { - return "The alpha of BLX."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/crossover/CrossoverESFlat.java b/src/eva2/optimization/operator/crossover/CrossoverESFlat.java index f0eabacb..57064857 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESFlat.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESFlat.java @@ -6,15 +6,17 @@ import eva2.optimization.individuals.InterfaceESIndividual; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** * The flat crossover inits values randomly within the extreme values of * all parents, namely * c[i]=rand(min_j(p_ij), max_j(p_ij)). - *
+ ** where c[i] is the i-th child component and p_ij is the i-th component * of parent j. */ +@Description("The flat crossover initializes the values within the extreme values.") public class CrossoverESFlat implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -123,9 +125,6 @@ public class CrossoverESFlat implements InterfaceCrossover, java.io.Serializable return this.getName(); } - /********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -135,13 +134,4 @@ public class CrossoverESFlat implements InterfaceCrossover, java.io.Serializable public String getName() { return "ES flat crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "The flat crossover inits the values within the extreme values."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/crossover/CrossoverESIntermediate.java b/src/eva2/optimization/operator/crossover/CrossoverESIntermediate.java index bbe27bb6..2f01802c 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESIntermediate.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESIntermediate.java @@ -4,14 +4,12 @@ import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.individuals.InterfaceESIndividual; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; +import eva2.util.annotation.Description; /** - * Created by IntelliJ IDEA. - * User: streiche - * Date: 03.12.2003 - * Time: 14:27:59 - * To change this template use Options | File Templates. + * */ +@Description("This is an intermediate crossover between m ES individuals.") public class CrossoverESIntermediate implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -116,9 +114,6 @@ public class CrossoverESIntermediate implements InterfaceCrossover, java.io.Seri return this.getName(); } - /********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -128,13 +123,4 @@ public class CrossoverESIntermediate implements InterfaceCrossover, java.io.Seri public String getName() { return "ES intermediate crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is an intermediate crossover between m ES individuals."; - } } diff --git a/src/eva2/optimization/operator/crossover/CrossoverESNPointDiscrete.java b/src/eva2/optimization/operator/crossover/CrossoverESNPointDiscrete.java index 8a5d2871..dc744a87 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESNPointDiscrete.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESNPointDiscrete.java @@ -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("This is a discrete n-point crossover between m ES individuals.") public class CrossoverESNPointDiscrete implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; private int numberOfCrossovers = 3; @@ -126,9 +128,6 @@ public class CrossoverESNPointDiscrete implements InterfaceCrossover, java.io.Se return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -139,15 +138,6 @@ public class CrossoverESNPointDiscrete implements InterfaceCrossover, java.io.Se return "ES discrete n-point crossover"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a discrete n-point crossover between m ES individuals."; - } - /** * This method allows you to set the number of crossovers that occur in the * genotype. diff --git a/src/eva2/optimization/operator/crossover/CrossoverESNPointDiscreteDislocation.java b/src/eva2/optimization/operator/crossover/CrossoverESNPointDiscreteDislocation.java index add6bc9f..642c8900 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESNPointDiscreteDislocation.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESNPointDiscreteDislocation.java @@ -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("This is a discrete n-point crossover between m ES individuals with dislocation.") public class CrossoverESNPointDiscreteDislocation implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; private int numberOfCrossovers = 3; @@ -141,9 +143,6 @@ public class CrossoverESNPointDiscreteDislocation implements InterfaceCrossover, return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -154,15 +153,6 @@ public class CrossoverESNPointDiscreteDislocation implements InterfaceCrossover, return "ES discrete n-point crossover with dislocation"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a discrete n-point crossover between m ES individuals with dislocation."; - } - /** * This method allows you to set the number of crossovers that occur in the * genotype. diff --git a/src/eva2/optimization/operator/crossover/CrossoverESPCX.java b/src/eva2/optimization/operator/crossover/CrossoverESPCX.java index 6b3fbd4d..842c3a6f 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESPCX.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESPCX.java @@ -10,12 +10,14 @@ import eva2.problems.F1Problem; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.Mathematics; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; import java.util.ArrayList; /** * */ +@Description("This is the Parent Centric Crossover (PCX).") public class CrossoverESPCX implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -296,9 +298,6 @@ public class CrossoverESPCX implements InterfaceCrossover, java.io.Serializable return this.getName(); } - /********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -309,15 +308,6 @@ public class CrossoverESPCX implements InterfaceCrossover, java.io.Serializable return "ES PCX crossover"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is the Parent Centric Crossover (PCX)."; - } - public void setEta(double a) { if (a < 0) { a = 0; diff --git a/src/eva2/optimization/operator/crossover/CrossoverESSBX.java b/src/eva2/optimization/operator/crossover/CrossoverESSBX.java index 00e2862a..8454ad36 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESSBX.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESSBX.java @@ -8,10 +8,12 @@ import eva2.optimization.population.Population; import eva2.problems.F1Problem; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** * */ +@Description("The SBX crossover simulates a binary crossover (works only for two partners!).") public class CrossoverESSBX implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -193,9 +195,6 @@ public class CrossoverESSBX implements InterfaceCrossover, java.io.Serializable return this.getName(); } - /********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -206,15 +205,6 @@ public class CrossoverESSBX implements InterfaceCrossover, java.io.Serializable return "ES SBX crossover"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "The SBX crossover simulates a binary crossover (works only for two partners!)."; - } - /** * This method allows you to set the number of crossovers that occur in the * genotype. diff --git a/src/eva2/optimization/operator/crossover/CrossoverESSPX.java b/src/eva2/optimization/operator/crossover/CrossoverESSPX.java index 199c047d..6e233820 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESSPX.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESSPX.java @@ -9,10 +9,12 @@ import eva2.problems.F1Problem; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.Mathematics; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** * */ +@Description("This is the Simplex Crossover (SPX).") public class CrossoverESSPX implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -205,8 +207,6 @@ public class CrossoverESSPX implements InterfaceCrossover, java.io.Serializable if (plotFlag) { plot.setUnconnectedPoint(tmpD[0], tmpD[1], 1); } - //range = ((ESIndividualDoubleData)offsprings[j]).getDoubleRange(); - //System.out.println("["+range[0][0]+"/"+range[0][1]+";"+range[1][0]+"/"+range[1][1]+"]"); } } } @@ -216,9 +216,6 @@ public class CrossoverESSPX implements InterfaceCrossover, java.io.Serializable return this.getName(); } - /********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -229,15 +226,6 @@ public class CrossoverESSPX implements InterfaceCrossover, java.io.Serializable return "ES SPX crossover"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is the Simplex Crossover (SPX)."; - } - public void setEpsilon(double a) { if (a < 0) { a = 0; diff --git a/src/eva2/optimization/operator/crossover/CrossoverESUNDX.java b/src/eva2/optimization/operator/crossover/CrossoverESUNDX.java index 229c0abf..ecae3eb7 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESUNDX.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESUNDX.java @@ -10,6 +10,7 @@ import eva2.problems.F1Problem; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.Mathematics; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; import java.util.ArrayList; @@ -35,6 +36,7 @@ import java.util.ArrayList; * url = {http://garage.cse.msu.edu/icga97/Abstracts.html#092} * } */ +@Description("This is the Unimodal Normally Distributed crossover (UNDX) by Ono and Kobayashi, 1997, typically uses more than two parents.") public class CrossoverESUNDX implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -301,9 +303,6 @@ public class CrossoverESUNDX implements InterfaceCrossover, java.io.Serializable return this.getName(); } - /********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -314,15 +313,6 @@ public class CrossoverESUNDX implements InterfaceCrossover, java.io.Serializable return "ES UNDX crossover"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is the Unimodal Normally Distributed crossover (UNDX) by Ono and Kobayashi, 1997, typically uses more than two parents."; - } - public void setEta(double a) { if (a < 0) { a = 0; diff --git a/src/eva2/optimization/operator/crossover/CrossoverESUniformDiscrete.java b/src/eva2/optimization/operator/crossover/CrossoverESUniformDiscrete.java index facc5c44..03269989 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverESUniformDiscrete.java +++ b/src/eva2/optimization/operator/crossover/CrossoverESUniformDiscrete.java @@ -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("This is a discrete n-point crossover between m ES individuals.") public class CrossoverESUniformDiscrete implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -113,9 +115,6 @@ public class CrossoverESUniformDiscrete implements InterfaceCrossover, java.io.S return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -125,13 +124,4 @@ public class CrossoverESUniformDiscrete implements InterfaceCrossover, java.io.S public String getName() { return "ES discrete n-point crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a discrete n-point crossover between m ES individuals."; - } } diff --git a/src/eva2/optimization/operator/crossover/CrossoverGABitSimulated.java b/src/eva2/optimization/operator/crossover/CrossoverGABitSimulated.java index 58c77e43..032cae49 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverGABitSimulated.java +++ b/src/eva2/optimization/operator/crossover/CrossoverGABitSimulated.java @@ -6,12 +6,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 is a bit simulated crossover between m individuals.") public class CrossoverGABitSimulated implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -124,9 +126,6 @@ public class CrossoverGABitSimulated implements InterfaceCrossover, java.io.Seri return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -136,13 +135,4 @@ public class CrossoverGABitSimulated implements InterfaceCrossover, java.io.Seri public String getName() { return "GA bit simulated crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a bit simulated crossover between m individuals."; - } } diff --git a/src/eva2/optimization/operator/crossover/CrossoverGADefault.java b/src/eva2/optimization/operator/crossover/CrossoverGADefault.java index 3379a1e5..03010ad9 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverGADefault.java +++ b/src/eva2/optimization/operator/crossover/CrossoverGADefault.java @@ -6,12 +6,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; /** * This operator performs one-point crossover. */ +@Description("This is a one-point crossover between two individuals.") public class CrossoverGADefault implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -124,9 +126,6 @@ public class CrossoverGADefault implements InterfaceCrossover, return this.getName(); } - /***************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the name to the * current object. @@ -136,13 +135,4 @@ public class CrossoverGADefault implements InterfaceCrossover, public String getName() { return "GA default crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a one-point crossover between two individuals."; - } } diff --git a/src/eva2/optimization/operator/crossover/CrossoverGAGINPoint.java b/src/eva2/optimization/operator/crossover/CrossoverGAGINPoint.java index efd1da9d..58ba4f17 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverGAGINPoint.java +++ b/src/eva2/optimization/operator/crossover/CrossoverGAGINPoint.java @@ -7,6 +7,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,9 +16,8 @@ import java.util.BitSet; * parent individuals are recombined by exchanging sub-segments within randomly * selected points. Therefore, far-away alleles (larger GA schemas) are more likely to be split * between individuals. - * - * @author mkron, streiche */ +@Description("This is an n-point crossover between m individuals which may be binary or integer based.") public class CrossoverGAGINPoint implements InterfaceCrossover, java.io.Serializable { private int numberOfCrossovers = 3; @@ -242,9 +242,6 @@ public class CrossoverGAGINPoint implements InterfaceCrossover, java.io.Serializ return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -255,15 +252,6 @@ public class CrossoverGAGINPoint implements InterfaceCrossover, java.io.Serializ return "GA-GI N-Point Crossover"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is an n-point crossover between m individuals which may be binary or integer based."; - } - /** * This method allows you to set the number of crossovers that occur in the * genotype. diff --git a/src/eva2/optimization/operator/crossover/CrossoverGAGINPointSegmentwise.java b/src/eva2/optimization/operator/crossover/CrossoverGAGINPointSegmentwise.java index 56111d3a..2b1f0594 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverGAGINPointSegmentwise.java +++ b/src/eva2/optimization/operator/crossover/CrossoverGAGINPointSegmentwise.java @@ -1,14 +1,14 @@ package eva2.optimization.operator.crossover; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** * A variation of the GA n-point crossover. Restricts crossover to segment bounds * of fixed length, so crossings occur at multiples of the segment length only. Segments * will not be destroyed. - * - * @author mkron */ +@Description("This is an n-point crossover between m individuals which also splits at certain segment limits. Crossover points are selected from multiples of the segment length.") public class CrossoverGAGINPointSegmentwise extends CrossoverGAGINPoint { int segmentLength = 8; @@ -56,10 +56,6 @@ public class CrossoverGAGINPointSegmentwise extends CrossoverGAGINPoint { return "GA-GI N-Point segment-wise crossover"; } - public static String globalInfo() { - return "This is an n-point crossover between m individuals which also splits at certain segment limits. Crossover points are selected from multiples of the segment length."; - } - public int getSegmentLength() { return segmentLength; } diff --git a/src/eva2/optimization/operator/crossover/CrossoverGAUniform.java b/src/eva2/optimization/operator/crossover/CrossoverGAUniform.java index e23bfaad..d2e64e74 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverGAUniform.java +++ b/src/eva2/optimization/operator/crossover/CrossoverGAUniform.java @@ -6,16 +6,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; /** - * Created by IntelliJ IDEA. - * User: streiche - * Date: 03.04.2003 - * Time: 13:58:59 - * To change this template use Options | File Templates. + * */ +@Description("This is a uniform crossover between m individuals.") public class CrossoverGAUniform implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -122,9 +120,6 @@ public class CrossoverGAUniform implements InterfaceCrossover, java.io.Serializa return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -134,13 +129,4 @@ public class CrossoverGAUniform implements InterfaceCrossover, java.io.Serializa public String getName() { return "GA uniform crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a uniform crossover between m individuals."; - } } diff --git a/src/eva2/optimization/operator/crossover/CrossoverGIDefault.java b/src/eva2/optimization/operator/crossover/CrossoverGIDefault.java index b06fde5c..36f8f8dc 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverGIDefault.java +++ b/src/eva2/optimization/operator/crossover/CrossoverGIDefault.java @@ -5,10 +5,12 @@ import eva2.optimization.individuals.InterfaceGIIndividual; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** * One-point crossover on integer individuals. */ +@Description("This is a discrete one-point crossover between m GI individuals.") public class CrossoverGIDefault implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -124,9 +126,6 @@ public class CrossoverGIDefault implements InterfaceCrossover, java.io.Serializa return this.getName(); } - /********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -136,13 +135,4 @@ public class CrossoverGIDefault implements InterfaceCrossover, java.io.Serializa public String getName() { return "GI discrete one-point crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a discrete one-point crossover between m GI individuals."; - } } diff --git a/src/eva2/optimization/operator/crossover/CrossoverGINPoint.java b/src/eva2/optimization/operator/crossover/CrossoverGINPoint.java index bc25678a..14543e5e 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverGINPoint.java +++ b/src/eva2/optimization/operator/crossover/CrossoverGINPoint.java @@ -5,14 +5,12 @@ 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: 01.06.2005 - * Time: 14:38:54 - * To change this template use File | Settings | File Templates. + * */ +@Description("This is an n-point crossover between m individuals.") public class CrossoverGINPoint implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; private int numberOfCrossovers = 3; @@ -135,9 +133,6 @@ public class CrossoverGINPoint implements InterfaceCrossover, java.io.Serializab return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -148,15 +143,6 @@ public class CrossoverGINPoint implements InterfaceCrossover, java.io.Serializab return "GI N-Point Crossover"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is an n-point crossover between m individuals."; - } - /** * This method allows you to set the number of crossovers that occur in the * genotype. diff --git a/src/eva2/optimization/operator/crossover/CrossoverGINPointVL.java b/src/eva2/optimization/operator/crossover/CrossoverGINPointVL.java index 49417c0b..58b10863 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverGINPointVL.java +++ b/src/eva2/optimization/operator/crossover/CrossoverGINPointVL.java @@ -5,16 +5,14 @@ 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; /** - * Created by IntelliJ IDEA. - * User: streiche - * Date: 01.06.2005 - * Time: 14:37:43 - * To change this template use File | Settings | File Templates. + * */ +@Description("This is a variable length n-point crossover between m individuals.") public class CrossoverGINPointVL implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; private int numberOfCrossovers = 3; @@ -190,9 +188,6 @@ public class CrossoverGINPointVL implements InterfaceCrossover, java.io.Serializ return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -203,15 +198,6 @@ public class CrossoverGINPointVL implements InterfaceCrossover, java.io.Serializ return "GI var. length N-Point Crossover"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a variable length n-point crossover between m individuals."; - } - /** * This method allows you to set the number of crossovers that occur in the * genotype. diff --git a/src/eva2/optimization/operator/crossover/CrossoverGIUniform.java b/src/eva2/optimization/operator/crossover/CrossoverGIUniform.java index 1c462ba9..76576c4c 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverGIUniform.java +++ b/src/eva2/optimization/operator/crossover/CrossoverGIUniform.java @@ -6,14 +6,12 @@ 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: 01.06.2005 - * Time: 14:38:23 - * To change this template use File | Settings | File Templates. + * */ +@Description("This is a uniform crossover between m individuals.") public class CrossoverGIUniform implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -121,9 +119,6 @@ public class CrossoverGIUniform implements InterfaceCrossover, java.io.Serializa return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -133,13 +128,4 @@ public class CrossoverGIUniform implements InterfaceCrossover, java.io.Serializa public String getName() { return "GI uniform crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a uniform crossover between m individuals."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/crossover/CrossoverGPDefault.java b/src/eva2/optimization/operator/crossover/CrossoverGPDefault.java index 275e488e..4ca0b785 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverGPDefault.java +++ b/src/eva2/optimization/operator/crossover/CrossoverGPDefault.java @@ -8,9 +8,11 @@ import eva2.optimization.individuals.codings.gp.AbstractGPNode; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** */ +@Description("This is a one-point crossover between two programs.") public class CrossoverGPDefault implements InterfaceCrossover, java.io.Serializable { /** * @@ -141,9 +143,6 @@ public class CrossoverGPDefault implements InterfaceCrossover, java.io.Serializa return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -153,13 +152,4 @@ public class CrossoverGPDefault implements InterfaceCrossover, java.io.Serializa public String getName() { return "GP default crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a one-point crossover between two programs."; - } } diff --git a/src/eva2/optimization/operator/crossover/CrossoverOBGAPMX.java b/src/eva2/optimization/operator/crossover/CrossoverOBGAPMX.java index f61a6263..73e3c019 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverOBGAPMX.java +++ b/src/eva2/optimization/operator/crossover/CrossoverOBGAPMX.java @@ -5,17 +5,11 @@ import eva2.optimization.individuals.InterfaceOBGAIndividual; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** - *
Title: EvA2
- *Description: PMX-Crossover as defined in http://www.cs.rit.edu/usr/local/pub/pga/Genetic/Slides_etc/ga_5_og.pdf
- *Copyright: Copyright (c) 2003
- *Company:
- * - * @author planatsc - * @version 1.0 */ - +@Description("The infamous PMX crossover for Permutations.") public class CrossoverOBGAPMX implements InterfaceCrossover, java.io.Serializable { public CrossoverOBGAPMX() { @@ -111,9 +105,6 @@ public class CrossoverOBGAPMX implements InterfaceCrossover, java.io.Serializabl return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -123,14 +114,4 @@ public class CrossoverOBGAPMX implements InterfaceCrossover, java.io.Serializabl public String getName() { return "OBGA PMX crossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "The infamous PMX crossover for Permutations."; - } - } diff --git a/src/eva2/optimization/operator/crossover/CrossoverOBGAPMXUniform.java b/src/eva2/optimization/operator/crossover/CrossoverOBGAPMXUniform.java index 07a9d616..02d304c7 100644 --- a/src/eva2/optimization/operator/crossover/CrossoverOBGAPMXUniform.java +++ b/src/eva2/optimization/operator/crossover/CrossoverOBGAPMXUniform.java @@ -5,17 +5,11 @@ import eva2.optimization.individuals.InterfaceOBGAIndividual; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** - *Title: EvA2
- *Description: PMX-Crossover as defined in http://www.cs.rit.edu/usr/local/pub/pga/Genetic/Slides_etc/ga_5_og.pdf
- *Copyright: Copyright (c) 2003
- *Company:
- * - * @author planatsc - * @version 1.0 */ - +@Description("The infamous PMX uniform crossover for Permutations.") public class CrossoverOBGAPMXUniform implements InterfaceCrossover, java.io.Serializable { public CrossoverOBGAPMXUniform() { @@ -108,9 +102,6 @@ public class CrossoverOBGAPMXUniform implements InterfaceCrossover, java.io.Seri return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -121,13 +112,4 @@ public class CrossoverOBGAPMXUniform implements InterfaceCrossover, java.io.Seri return "OBGA PMX uniform crossover"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "The infamous PMX uniform crossover for Permutations."; - } - } diff --git a/src/eva2/optimization/operator/crossover/NoCrossover.java b/src/eva2/optimization/operator/crossover/NoCrossover.java index f662f5a5..5216d9a3 100644 --- a/src/eva2/optimization/operator/crossover/NoCrossover.java +++ b/src/eva2/optimization/operator/crossover/NoCrossover.java @@ -3,10 +3,12 @@ package eva2.optimization.operator.crossover; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; import eva2.problems.InterfaceOptimizationProblem; +import eva2.util.annotation.Description; /** * */ +@Description("No crossover at all, even for occasional strategy parameters.") public class NoCrossover implements InterfaceCrossover, java.io.Serializable { private InterfaceOptimizationProblem optimizationProblem; @@ -79,9 +81,6 @@ public class NoCrossover implements InterfaceCrossover, java.io.Serializable { return this.getName(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -91,13 +90,4 @@ public class NoCrossover implements InterfaceCrossover, java.io.Serializable { public String getName() { return "Nocrossover"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "No crossover at all, even for occasional strategy paramters."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/distancemetric/EuclideanMetric.java b/src/eva2/optimization/operator/distancemetric/EuclideanMetric.java index 6a05f893..2ed6c48a 100644 --- a/src/eva2/optimization/operator/distancemetric/EuclideanMetric.java +++ b/src/eva2/optimization/operator/distancemetric/EuclideanMetric.java @@ -10,10 +10,9 @@ import java.io.Serializable; * The Euclidean metric just measures the Euclidean distance based on the default double representation * as given by AbstractEAIndividual.getDoublePosition(AbstractEAIndividual). * - * @author mkron * @see AbstractEAIndividual#getDoublePosition(AbstractEAIndividual) */ -@Description("Set to true to norm the distance by the double range - only possible with InterfaceDataTypeDouble individuals.") +@Description("The euclidean metric calculates euclidean distances for individuals which have a real valued interpretation.") public class EuclideanMetric implements InterfaceDistanceMetric, Serializable { private boolean normedByDblRange = false; @@ -89,15 +88,6 @@ public class EuclideanMetric implements InterfaceDistanceMetric, Serializable { return Math.sqrt(result); } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "The euclidean metric calculates euclidean distances for individuals which have a real valued interpretation."; - } - /** * This method will return a naming String * diff --git a/src/eva2/optimization/operator/migration/MOBestMigration.java b/src/eva2/optimization/operator/migration/MOBestMigration.java index 04c4c0b2..6fb5660b 100644 --- a/src/eva2/optimization/operator/migration/MOBestMigration.java +++ b/src/eva2/optimization/operator/migration/MOBestMigration.java @@ -4,11 +4,13 @@ import eva2.optimization.operator.selection.InterfaceSelection; import eva2.optimization.operator.selection.SelectMOMaxiMin; import eva2.optimization.population.Population; import eva2.optimization.strategies.InterfaceOptimizer; +import eva2.util.annotation.Description; /** * Migration based on a Multi-criterial selection mechanism * migrating the n best individuals between all populations. */ +@Description("This is multi-objective migration scheme.") public class MOBestMigration implements InterfaceMigration, java.io.Serializable { private InterfaceSelection selection = new SelectMOMaxiMin(); @@ -75,18 +77,6 @@ public class MOBestMigration implements InterfaceMigration, java.io.Serializable } } -/********************************************************************************************************************** - * These are for GUI - */ - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is multi-objective migration scheme."; - } - /** * This method will return a naming String * diff --git a/src/eva2/optimization/operator/migration/MOClusteringSeparation.java b/src/eva2/optimization/operator/migration/MOClusteringSeparation.java index 8acfc4a4..e63f6f23 100644 --- a/src/eva2/optimization/operator/migration/MOClusteringSeparation.java +++ b/src/eva2/optimization/operator/migration/MOClusteringSeparation.java @@ -15,16 +15,18 @@ import eva2.optimization.strategies.InterfaceOptimizer; import eva2.tools.chart2d.Chart2DDPointIconCircle; import eva2.tools.chart2d.Chart2DDPointIconText; import eva2.tools.chart2d.DPoint; +import eva2.util.annotation.Description; import java.io.BufferedWriter; import java.io.IOException; /** * This method implements the clustering based subdivision - * scheme, this method rearanges the populations and may + * scheme, this method rearranges the populations and may * impose area constraints on the subpopulations. This method * is suited for K-means only. */ +@Description("This is migration scheme, which implements a clustering based partitioning.") public class MOClusteringSeparation implements InterfaceMigration, java.io.Serializable { public boolean debug = false; @@ -351,18 +353,6 @@ public class MOClusteringSeparation implements InterfaceMigration, java.io.Seria } } -/********************************************************************************************************************** - * These are for GUI - */ - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is migration scheme, which implements a clustering based partitioning."; - } - /** * This method will return a naming String * diff --git a/src/eva2/optimization/operator/migration/MOConeSeparation.java b/src/eva2/optimization/operator/migration/MOConeSeparation.java index 8432add8..1a3a225e 100644 --- a/src/eva2/optimization/operator/migration/MOConeSeparation.java +++ b/src/eva2/optimization/operator/migration/MOConeSeparation.java @@ -18,15 +18,17 @@ import eva2.optimization.strategies.InterfaceOptimizer; import eva2.tools.chart2d.Chart2DDPointIconCircle; import eva2.tools.chart2d.Chart2DDPointIconText; import eva2.tools.chart2d.DPoint; +import eva2.util.annotation.Description; import java.io.BufferedWriter; import java.io.IOException; /** * This method implements the cone separation subdivision - * scheme, this method rearanges the populations and may + * scheme, this method rearranges the populations and may * impose area constraints on the subpopulations. */ +@Description("This is migration scheme, which implements a cone separation based partitioning.") public class MOConeSeparation implements InterfaceMigration, java.io.Serializable { public boolean debug = false; @@ -742,18 +744,6 @@ public class MOConeSeparation implements InterfaceMigration, java.io.Serializabl } } -/********************************************************************************************************************** - * These are for GUI - */ - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is migration scheme, which implements a cone separation based partitioning."; - } - /** * This method will return a naming String * diff --git a/src/eva2/optimization/operator/migration/MOXMeansSeparation.java b/src/eva2/optimization/operator/migration/MOXMeansSeparation.java index 1d518d4f..3cb5f7a9 100644 --- a/src/eva2/optimization/operator/migration/MOXMeansSeparation.java +++ b/src/eva2/optimization/operator/migration/MOXMeansSeparation.java @@ -16,6 +16,7 @@ import eva2.optimization.strategies.InterfaceOptimizer; import eva2.tools.chart2d.Chart2DDPointIconCircle; import eva2.tools.chart2d.Chart2DDPointIconText; import eva2.tools.chart2d.DPoint; +import eva2.util.annotation.Description; import java.io.BufferedWriter; import java.io.IOException; @@ -25,6 +26,7 @@ import java.io.IOException; * scheme suited to identify uni- and multi-modal search spaces * under development and currently defunct. */ +@Description("This is migration scheme, which implements a clustering based partitioning.") public class MOXMeansSeparation implements InterfaceMigration, java.io.Serializable { public boolean debug = false; @@ -355,18 +357,6 @@ public class MOXMeansSeparation implements InterfaceMigration, java.io.Serializa } } -/********************************************************************************************************************** - * These are for GUI - */ - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is migration scheme, which implements a clustering based partitioning."; - } - /** * This method will return a naming String * diff --git a/src/eva2/optimization/operator/migration/SOBestMigration.java b/src/eva2/optimization/operator/migration/SOBestMigration.java index 8d071665..92ff5db2 100644 --- a/src/eva2/optimization/operator/migration/SOBestMigration.java +++ b/src/eva2/optimization/operator/migration/SOBestMigration.java @@ -5,10 +5,12 @@ import eva2.optimization.operator.selection.InterfaceSelection; import eva2.optimization.operator.selection.SelectBestIndividuals; import eva2.optimization.population.Population; import eva2.optimization.strategies.InterfaceOptimizer; +import eva2.util.annotation.Description; /** * Simple single-objective migration scheme. */ +@Description("This is a single-objective migration scheme.") public class SOBestMigration implements InterfaceMigration, java.io.Serializable { private InterfaceSelection selection = new SelectBestIndividuals(); @@ -32,11 +34,11 @@ public class SOBestMigration implements InterfaceMigration, java.io.Serializable } /** - * The migrate method can be called asychnronously or - * sychronously. Basically it allows migration of individuals + * The migrate method can be called asynchronously or + * synchronously. Basically it allows migration of individuals * between multiple EA islands and since there are so many * different possible strategies i've introduced this - * interface which is mostlikely subject to numerous changes.. + * interface which is most likely subject to numerous changes.. * Note: Since i use the RMIRemoteThreadProxy everything done * to the islands will use the serialization method, so if * you call getPopulation() on an island it is not a reference @@ -74,17 +76,6 @@ public class SOBestMigration implements InterfaceMigration, java.io.Serializable islands[i].setPopulation(newIPOP[i]); } } -/********************************************************************************************************************** - * These are for GUI - */ - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is a single-objective migration scheme."; - } /** * This method will return a naming String diff --git a/src/eva2/optimization/operator/migration/SOMONoMigration.java b/src/eva2/optimization/operator/migration/SOMONoMigration.java index 7ebd6a0b..809094fc 100644 --- a/src/eva2/optimization/operator/migration/SOMONoMigration.java +++ b/src/eva2/optimization/operator/migration/SOMONoMigration.java @@ -1,10 +1,12 @@ package eva2.optimization.operator.migration; import eva2.optimization.strategies.InterfaceOptimizer; +import eva2.util.annotation.Description; /** * Implements no migration as reference. */ +@Description("This is actually no mirgation scheme, because no individuals are exchanged.") public class SOMONoMigration implements InterfaceMigration, java.io.Serializable { /** @@ -40,18 +42,6 @@ public class SOMONoMigration implements InterfaceMigration, java.io.Serializable } -/********************************************************************************************************************** - * These are for GUI - */ - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This is actually no mirgation scheme, because no individuals are exchanged."; - } - /** * This method will return a naming String * diff --git a/src/eva2/optimization/operator/moso/MOSODynamicallyWeightedFitness.java b/src/eva2/optimization/operator/moso/MOSODynamicallyWeightedFitness.java index 07453857..c45e4001 100644 --- a/src/eva2/optimization/operator/moso/MOSODynamicallyWeightedFitness.java +++ b/src/eva2/optimization/operator/moso/MOSODynamicallyWeightedFitness.java @@ -2,10 +2,12 @@ package eva2.optimization.operator.moso; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** * */ +@Description("This method calcuates a dynamic weighted sum over TWO fitness values depending on the current generation.") public class MOSODynamicallyWeightedFitness implements InterfaceMOSOConverter, java.io.Serializable { private double f = 50; @@ -92,9 +94,6 @@ public class MOSODynamicallyWeightedFitness implements InterfaceMOSOConverter, j return this.getName() + "\n"; } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -106,15 +105,6 @@ public class MOSODynamicallyWeightedFitness implements InterfaceMOSOConverter, j return "Dynamic Weighted Sum"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method calcuates a dynamic weighted sum over TWO fitness values depending on the current generation."; - } - /** * This method allows you to choose the frequency for the change of the weights. * diff --git a/src/eva2/optimization/operator/moso/MOSOEpsilonConstraint.java b/src/eva2/optimization/operator/moso/MOSOEpsilonConstraint.java index b5177636..84872210 100644 --- a/src/eva2/optimization/operator/moso/MOSOEpsilonConstraint.java +++ b/src/eva2/optimization/operator/moso/MOSOEpsilonConstraint.java @@ -3,14 +3,12 @@ package eva2.optimization.operator.moso; import eva2.gui.PropertyEpsilonConstraint; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** - * Created by IntelliJ IDEA. - * User: streiche - * Date: 14.07.2005 - * Time: 16:13:17 - * To change this template use File | Settings | File Templates. + * */ +@Description("This method uses n-1 objected as hard constraints.") public class MOSOEpsilonConstraint implements InterfaceMOSOConverter, java.io.Serializable { private PropertyEpsilonConstraint epsilonConstraint = null; @@ -107,10 +105,6 @@ public class MOSOEpsilonConstraint implements InterfaceMOSOConverter, java.io.Se return this.getName() + "\n"; } - -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -122,15 +116,6 @@ public class MOSOEpsilonConstraint implements InterfaceMOSOConverter, java.io.Se return "Epsilon Constraint"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method uses n-1 objected as hard constraints."; - } - /** * This method allows you to choose the EpsilonThreshold * diff --git a/src/eva2/optimization/operator/moso/MOSOEpsilonThreshold.java b/src/eva2/optimization/operator/moso/MOSOEpsilonThreshold.java index 7bc75a61..31766a78 100644 --- a/src/eva2/optimization/operator/moso/MOSOEpsilonThreshold.java +++ b/src/eva2/optimization/operator/moso/MOSOEpsilonThreshold.java @@ -3,10 +3,12 @@ package eva2.optimization.operator.moso; import eva2.gui.PropertyEpsilonThreshold; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** * */ +@Description("This method uses n-1 objected as soft constraints.") public class MOSOEpsilonThreshold implements InterfaceMOSOConverter, java.io.Serializable { private PropertyEpsilonThreshold epsilonThreshold = null; @@ -135,10 +137,6 @@ public class MOSOEpsilonThreshold implements InterfaceMOSOConverter, java.io.Ser return this.getName() + "\n"; } - -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -150,15 +148,6 @@ public class MOSOEpsilonThreshold implements InterfaceMOSOConverter, java.io.Ser return "Epsilon Threshold"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method uses n-1 objected as soft constraints."; - } - /** * This method allows you to choose the EpsilonThreshold * diff --git a/src/eva2/optimization/operator/moso/MOSOGoalProgramming.java b/src/eva2/optimization/operator/moso/MOSOGoalProgramming.java index c1093878..fb3a0757 100644 --- a/src/eva2/optimization/operator/moso/MOSOGoalProgramming.java +++ b/src/eva2/optimization/operator/moso/MOSOGoalProgramming.java @@ -3,10 +3,12 @@ package eva2.optimization.operator.moso; import eva2.gui.PropertyDoubleArray; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** * */ +@Description("This method minimizes the delta to a given target fitness values.") public class MOSOGoalProgramming implements InterfaceMOSOConverter, java.io.Serializable { private PropertyDoubleArray goals = null; @@ -96,10 +98,6 @@ public class MOSOGoalProgramming implements InterfaceMOSOConverter, java.io.Seri return this.getName() + "\n"; } - -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -111,15 +109,6 @@ public class MOSOGoalProgramming implements InterfaceMOSOConverter, java.io.Seri return "Goal Programming"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method minimizes the delta to a given target fitness values."; - } - /** * This method allows you to choose the goals for goal programming * diff --git a/src/eva2/optimization/operator/moso/MOSOLpMetric.java b/src/eva2/optimization/operator/moso/MOSOLpMetric.java index ce1fe48f..f1e7721e 100644 --- a/src/eva2/optimization/operator/moso/MOSOLpMetric.java +++ b/src/eva2/optimization/operator/moso/MOSOLpMetric.java @@ -3,10 +3,12 @@ package eva2.optimization.operator.moso; import eva2.gui.PropertyDoubleArray; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** * */ +@Description("This method minimizes the Lp metric to a given target fitness values, for (p<1) this equals the Tchebycheff metric.") public class MOSOLpMetric implements InterfaceMOSOConverter, java.io.Serializable { private PropertyDoubleArray reference = null; @@ -119,9 +121,6 @@ public class MOSOLpMetric implements InterfaceMOSOConverter, java.io.Serializabl return result; } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -133,15 +132,6 @@ public class MOSOLpMetric implements InterfaceMOSOConverter, java.io.Serializabl return "Lp Metric"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method minimizes the Lp metric to a given target fitness values, for (p<1) this equals the Tchebycheff metric."; - } - /** * This method allows you to choose the reference for the Lp Metric * diff --git a/src/eva2/optimization/operator/moso/MOSOMOGARankBased.java b/src/eva2/optimization/operator/moso/MOSOMOGARankBased.java index d0fcd964..6b7f15fe 100644 --- a/src/eva2/optimization/operator/moso/MOSOMOGARankBased.java +++ b/src/eva2/optimization/operator/moso/MOSOMOGARankBased.java @@ -2,14 +2,11 @@ package eva2.optimization.operator.moso; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** - * Created by IntelliJ IDEA. - * User: streiche - * Date: 14.06.2005 - * Time: 17:05:11 - * To change this template use File | Settings | File Templates. */ +@Description("This method calculates the MOGA rank of each individual and uses the rank as fitness [Fonseca93Genetic].") public class MOSOMOGARankBased implements InterfaceMOSOConverter, java.io.Serializable { public MOSOMOGARankBased() { @@ -93,10 +90,6 @@ public class MOSOMOGARankBased implements InterfaceMOSOConverter, java.io.Serial return this.getName() + "\n"; } - -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -107,13 +100,4 @@ public class MOSOMOGARankBased implements InterfaceMOSOConverter, java.io.Serial public String getName() { return "MOGA Rank Based"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method calcuates the MOGA rank of each individual and uses the rank as fitness [Fonseca93Genetic]."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/moso/MOSOMaxiMin.java b/src/eva2/optimization/operator/moso/MOSOMaxiMin.java index 2e917769..66362382 100644 --- a/src/eva2/optimization/operator/moso/MOSOMaxiMin.java +++ b/src/eva2/optimization/operator/moso/MOSOMaxiMin.java @@ -3,10 +3,12 @@ package eva2.optimization.operator.moso; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** * */ +@Description("This method calculate the maximum of minimum distance over all criterias over all individuals.") public class MOSOMaxiMin implements InterfaceMOSOConverter, java.io.Serializable { private int outputDimension = 2; @@ -118,13 +120,4 @@ public class MOSOMaxiMin implements InterfaceMOSOConverter, java.io.Serializable public String getName() { return "MaxiMin Criterium"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method calculate the maximum of minimum distance over all criterias over all individuals."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/moso/MOSONoConvert.java b/src/eva2/optimization/operator/moso/MOSONoConvert.java index e85108df..0b92f16f 100644 --- a/src/eva2/optimization/operator/moso/MOSONoConvert.java +++ b/src/eva2/optimization/operator/moso/MOSONoConvert.java @@ -2,14 +2,12 @@ package eva2.optimization.operator.moso; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** - * Created by IntelliJ IDEA. - * User: streiche - * Date: 05.03.2004 - * Time: 11:02:21 - * To change this template use File | Settings | File Templates. + * */ +@Description("This method leaves everything the same.") public class MOSONoConvert implements InterfaceMOSOConverter, java.io.Serializable { public MOSONoConvert() { @@ -50,8 +48,6 @@ public class MOSONoConvert implements InterfaceMOSOConverter, java.io.Serializab tmpFit = indy.getFitness(); indy.putData("MOFitness", tmpFit); -// resultFit[0] = tmpFit[RNG.randomInt(0, tmpFit.length)]; -// indy.SetFitness(resultFit); } /** @@ -76,10 +72,6 @@ public class MOSONoConvert implements InterfaceMOSOConverter, java.io.Serializab return this.getName() + "\n"; } - -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -90,14 +82,4 @@ public class MOSONoConvert implements InterfaceMOSOConverter, java.io.Serializab public String getName() { return "No Convert"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method leaves everything the same."; - } - } diff --git a/src/eva2/optimization/operator/moso/MOSORandomChoice.java b/src/eva2/optimization/operator/moso/MOSORandomChoice.java index 6fb313b5..787adfdb 100644 --- a/src/eva2/optimization/operator/moso/MOSORandomChoice.java +++ b/src/eva2/optimization/operator/moso/MOSORandomChoice.java @@ -3,10 +3,12 @@ package eva2.optimization.operator.moso; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** * */ +@Description("This method selects a random fitness value, actually this implements VEGA [Schaffer84Experiments].") public class MOSORandomChoice implements InterfaceMOSOConverter, java.io.Serializable { private int outputDimension = 2; @@ -79,10 +81,6 @@ public class MOSORandomChoice implements InterfaceMOSOConverter, java.io.Seriali return this.getName() + "\n"; } - -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -93,13 +91,4 @@ public class MOSORandomChoice implements InterfaceMOSOConverter, java.io.Seriali public String getName() { return "Random Choice"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method selects a random fitness value, actually this implements VEGA [Schaffer84Experiments]."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/moso/MOSORandomWeight.java b/src/eva2/optimization/operator/moso/MOSORandomWeight.java index 4fd1fc20..83a942b7 100644 --- a/src/eva2/optimization/operator/moso/MOSORandomWeight.java +++ b/src/eva2/optimization/operator/moso/MOSORandomWeight.java @@ -3,14 +3,11 @@ package eva2.optimization.operator.moso; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; import eva2.tools.math.RNG; +import eva2.util.annotation.Description; /** - * Created by IntelliJ IDEA. - * User: streiche - * Date: 14.06.2005 - * Time: 13:44:20 - * To change this template use File | Settings | File Templates. */ +@Description("This method calcuates a randomly weighted sum over all fitness values [Murata95MOGA].") public class MOSORandomWeight implements InterfaceMOSOConverter, java.io.Serializable { public MOSORandomWeight() { @@ -95,10 +92,6 @@ public class MOSORandomWeight implements InterfaceMOSOConverter, java.io.Seriali return this.getName() + "\n"; } - -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -109,13 +102,4 @@ public class MOSORandomWeight implements InterfaceMOSOConverter, java.io.Seriali public String getName() { return "Randomly Weighted Sum"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method calcuates a randomly weighted sum over all fitness values [Murata95MOGA]."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/moso/MOSORankbased.java b/src/eva2/optimization/operator/moso/MOSORankbased.java index e67037f2..2751d458 100644 --- a/src/eva2/optimization/operator/moso/MOSORankbased.java +++ b/src/eva2/optimization/operator/moso/MOSORankbased.java @@ -3,14 +3,11 @@ package eva2.optimization.operator.moso; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.operator.archiving.ArchivingNSGAII; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** - * Created by IntelliJ IDEA. - * User: streiche - * Date: 14.06.2005 - * Time: 14:18:58 - * To change this template use File | Settings | File Templates. */ +@Description("This method calcuates the Pareto rank of each individual and uses the rank as fitness.") public class MOSORankbased implements InterfaceMOSOConverter, java.io.Serializable { public MOSORankbased() { @@ -80,10 +77,6 @@ public class MOSORankbased implements InterfaceMOSOConverter, java.io.Serializab return this.getName() + "\n"; } - -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -94,13 +87,4 @@ public class MOSORankbased implements InterfaceMOSOConverter, java.io.Serializab public String getName() { return "Rank Based"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method calcuates the Pareto rank of each individual and uses the rank as fitness."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/moso/MOSOUtilityFunction.java b/src/eva2/optimization/operator/moso/MOSOUtilityFunction.java index db689065..20cb82eb 100644 --- a/src/eva2/optimization/operator/moso/MOSOUtilityFunction.java +++ b/src/eva2/optimization/operator/moso/MOSOUtilityFunction.java @@ -3,10 +3,12 @@ package eva2.optimization.operator.moso; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** * */ +@Description("This method allows you to progamm an individual utility function.") public class MOSOUtilityFunction implements InterfaceMOSOConverter, java.io.Serializable { private int outputDimension = 2; @@ -98,14 +100,4 @@ public class MOSOUtilityFunction implements InterfaceMOSOConverter, java.io.Seri public String getName() { return "Utility Function"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method allows you to progamm an individual utility function."; - } - } diff --git a/src/eva2/optimization/operator/moso/MOSOWeightedFitness.java b/src/eva2/optimization/operator/moso/MOSOWeightedFitness.java index 11ed86bf..46defdf0 100644 --- a/src/eva2/optimization/operator/moso/MOSOWeightedFitness.java +++ b/src/eva2/optimization/operator/moso/MOSOWeightedFitness.java @@ -3,10 +3,12 @@ package eva2.optimization.operator.moso; import eva2.gui.PropertyDoubleArray; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** * */ +@Description("This method calcuates the weighted sum over all fitness values.") public class MOSOWeightedFitness implements InterfaceMOSOConverter, java.io.Serializable { private PropertyDoubleArray weights = null; @@ -114,10 +116,6 @@ public class MOSOWeightedFitness implements InterfaceMOSOConverter, java.io.Seri return this.getName() + "\n"; } - -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -129,15 +127,6 @@ public class MOSOWeightedFitness implements InterfaceMOSOConverter, java.io.Seri return "Weighted Sum"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method calcuates the weighted sum over all fitness values."; - } - /** * This method allows you to choose the weights for the weighted * fitness sum. diff --git a/src/eva2/optimization/operator/moso/MOSOWeightedLPTchebycheff.java b/src/eva2/optimization/operator/moso/MOSOWeightedLPTchebycheff.java index 627f4462..c4ab4877 100644 --- a/src/eva2/optimization/operator/moso/MOSOWeightedLPTchebycheff.java +++ b/src/eva2/optimization/operator/moso/MOSOWeightedLPTchebycheff.java @@ -3,10 +3,12 @@ package eva2.optimization.operator.moso; import eva2.gui.PropertyWeightedLPTchebycheff; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; /** * */ +@Description("This method implements the Lp-problem and the Tchebycheff metric, the weighted version is also known as compromise programming.") public class MOSOWeightedLPTchebycheff implements InterfaceMOSOConverter, java.io.Serializable { private PropertyWeightedLPTchebycheff weightedLPTchebycheff = null; @@ -133,10 +135,6 @@ public class MOSOWeightedLPTchebycheff implements InterfaceMOSOConverter, java.i return result; } - -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -148,15 +146,6 @@ public class MOSOWeightedLPTchebycheff implements InterfaceMOSOConverter, java.i return "Lp/Tchebycheff"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method implements the Lp-problem and the Tchebycheff metric, the weighted version is also known as compromise programming."; - } - /** * This method allows you to choose the EpsilonThreshold * diff --git a/src/eva2/optimization/operator/nichepso/absorption/StandardAbsorptionStrategy.java b/src/eva2/optimization/operator/nichepso/absorption/StandardAbsorptionStrategy.java index b03d1c91..9d8dcc83 100644 --- a/src/eva2/optimization/operator/nichepso/absorption/StandardAbsorptionStrategy.java +++ b/src/eva2/optimization/operator/nichepso/absorption/StandardAbsorptionStrategy.java @@ -2,6 +2,7 @@ package eva2.optimization.operator.nichepso.absorption; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.strategies.ParticleSubSwarmOptimization; +import eva2.util.annotation.Description; /** * Particles are absorbed into a subswarm when they move into an area @@ -12,25 +13,14 @@ import eva2.optimization.strategies.ParticleSubSwarmOptimization; * In Proceedings of the 4th Asia-Pacific Conference on Simulated Evolution and Learning (SEAL'02), * 2002, 2, 692-696 */ +@Description("Strategy to absorb main swarm particles into a subswarm") public class StandardAbsorptionStrategy implements InterfaceAbsorptionStrategy, java.io.Serializable { - /** - * ******************************************************************************************************************* - * ctors, initialize, clone - */ @Override public Object clone() { return new StandardAbsorptionStrategy(); } - public String globalInfo() { - return "Strategy to absorb main swarm particles into a subswarm"; - } - -/********************************************************************************************************************** - * shouldAbsorbParticleIntoSubswarm - */ - /** * @tested true if * the subswarm is active and diff --git a/src/eva2/optimization/operator/nichepso/deactivation/ImprovementDeactivationStrategy.java b/src/eva2/optimization/operator/nichepso/deactivation/ImprovementDeactivationStrategy.java index 64665606..b58dfb61 100644 --- a/src/eva2/optimization/operator/nichepso/deactivation/ImprovementDeactivationStrategy.java +++ b/src/eva2/optimization/operator/nichepso/deactivation/ImprovementDeactivationStrategy.java @@ -5,6 +5,7 @@ import eva2.optimization.population.Population; import eva2.optimization.strategies.NichePSO; import eva2.optimization.strategies.ParticleSubSwarmOptimization; import eva2.tools.EVAERROR; +import eva2.util.annotation.Description; import java.util.List; import java.util.Vector; @@ -15,6 +16,7 @@ import java.util.Vector; * over the last 3 iterations is less or equal a given threshold epsilon * Experiments showed good results using epsilon = 0.0001. */ +@Description("Strategy to deactivate subswarms") public class ImprovementDeactivationStrategy implements InterfaceDeactivationStrategy, java.io.Serializable { private double epsilon = 0.0001; @@ -46,18 +48,7 @@ public class ImprovementDeactivationStrategy implements InterfaceDeactivationStr return new ImprovementDeactivationStrategy(this); } - public String globalInfo() { - return "Strategy to deactivate subswarms"; - } - - /** - * ******************************************************************************************************************* - * shouldDeactivateSubswarm - */ - public boolean isConverged(Population pop) { -// Vector* The authors advise to select betaInc != 1./betaDec to avoid cycling. - * - * @author mkron */ +@Description("Adapt a constraint's penalty factor (esp. fitness based) if the population contained only valid or only invalid individuals for some generations.") public class ConstraintBasedAdaption implements ParamAdaption, Serializable { private double betaInc = 1.5; private double betaDec = 0.7; @@ -139,10 +139,6 @@ public class ConstraintBasedAdaption implements ParamAdaption, Serializable { return "The number of generations regarded."; } - public static String globalInfo() { - return "Adapt a constraint's penalty factor (esp. fitness based) if the population contained only valid or only invalid individuals for some generations."; - } - @Override public void finish(Object obj, Population pop) { lastBestSatisfactionState.clear(); diff --git a/src/eva2/optimization/operator/paramcontrol/ExponentialDecayAdaption.java b/src/eva2/optimization/operator/paramcontrol/ExponentialDecayAdaption.java index 55c7b01f..cd94cf32 100644 --- a/src/eva2/optimization/operator/paramcontrol/ExponentialDecayAdaption.java +++ b/src/eva2/optimization/operator/paramcontrol/ExponentialDecayAdaption.java @@ -1,14 +1,14 @@ package eva2.optimization.operator.paramcontrol; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; import java.io.Serializable; /** * Adapt a generic parameter using exponential decay. - * - * @author mkron */ +@Description("Exponential decay with a percental halving time.") public class ExponentialDecayAdaption implements ParamAdaption, GenericParamAdaption, Serializable { private double startValue = 0.2, halvingTimePerCent = 50; private double saturation = 0.; @@ -85,10 +85,6 @@ public class ExponentialDecayAdaption implements ParamAdaption, GenericParamAdap return "Exp. adapt. " + target + " (" + startValue + "/" + halvingTimePerCent + ")"; } - public static String globalInfo() { - return "Exponential decay with a percentual halving time."; - } - @Override public void finish(Object obj, Population pop) { } diff --git a/src/eva2/optimization/operator/paramcontrol/LinearParamAdaption.java b/src/eva2/optimization/operator/paramcontrol/LinearParamAdaption.java index 8f11ddd1..8d1bf104 100644 --- a/src/eva2/optimization/operator/paramcontrol/LinearParamAdaption.java +++ b/src/eva2/optimization/operator/paramcontrol/LinearParamAdaption.java @@ -1,13 +1,14 @@ package eva2.optimization.operator.paramcontrol; +import eva2.util.annotation.Description; + import java.io.Serializable; /** * Linearly adapt a specific target String parameter. - * - * @author mkron */ +@Description("Simple linear parameter adaption.") public class LinearParamAdaption extends AbstractLinearParamAdaption implements InterfaceHasUpperDoubleBound, GenericParamAdaption, Serializable { String target = "undefinedParameter"; @@ -42,10 +43,6 @@ public class LinearParamAdaption extends AbstractLinearParamAdaption this.target = target; } - public static String globalInfo() { - return "Simple linear parameter adaption."; - } - public String[] customPropertyOrder() { return new String[]{"startV", "endV"}; } diff --git a/src/eva2/optimization/operator/paramcontrol/NoParamAdaption.java b/src/eva2/optimization/operator/paramcontrol/NoParamAdaption.java index 815e6ffe..fe496f13 100644 --- a/src/eva2/optimization/operator/paramcontrol/NoParamAdaption.java +++ b/src/eva2/optimization/operator/paramcontrol/NoParamAdaption.java @@ -1,14 +1,14 @@ package eva2.optimization.operator.paramcontrol; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; import java.io.Serializable; /** * A dummy implementation which does not do any adaption. - * - * @author mkron */ +@Description("A dummy implementation which will not change parameters.") public class NoParamAdaption implements ParamAdaption, Serializable { @Override @@ -26,10 +26,6 @@ public class NoParamAdaption implements ParamAdaption, Serializable { return null; } - public static String globalInfo() { - return "A dummy implementation which will not change parameters."; - } - @Override public void finish(Object obj, Population pop) { } diff --git a/src/eva2/optimization/operator/paramcontrol/PSOActivityFeedbackControl.java b/src/eva2/optimization/operator/paramcontrol/PSOActivityFeedbackControl.java index 4edac604..59b68ecc 100644 --- a/src/eva2/optimization/operator/paramcontrol/PSOActivityFeedbackControl.java +++ b/src/eva2/optimization/operator/paramcontrol/PSOActivityFeedbackControl.java @@ -3,6 +3,7 @@ package eva2.optimization.operator.paramcontrol; import eva2.optimization.population.Population; import eva2.optimization.strategies.ParticleSwarmOptimization; import eva2.tools.math.Mathematics; +import eva2.util.annotation.Description; import java.io.Serializable; @@ -18,9 +19,8 @@ import java.io.Serializable; * to work ok, although it depends on the defined target activity. I am not convinced that in general it is * easier to define than a constant constriction factor for the standard constricted PSO. * Still, the possibility to control the convergence behaviour based on time is nice, and it works quite good on F6, for example. - * - * @author mkron */ +@Description("Controls the inertness factor based on the average velocity.") public class PSOActivityFeedbackControl implements ParamAdaption, Serializable { private double minInert = 0.5; private double maxInert = 1; @@ -155,10 +155,6 @@ public class PSOActivityFeedbackControl implements ParamAdaption, Serializable { return "The additive change of the inertness in each adaption step."; } - public static String globalInfo() { - return "Controls the inertness factor based on the average velocity."; - } - @Override public void finish(Object obj, Population pop) { } diff --git a/src/eva2/optimization/operator/paramcontrol/PSOInertnessAdaption.java b/src/eva2/optimization/operator/paramcontrol/PSOInertnessAdaption.java index 8e9f6927..75b8fc20 100644 --- a/src/eva2/optimization/operator/paramcontrol/PSOInertnessAdaption.java +++ b/src/eva2/optimization/operator/paramcontrol/PSOInertnessAdaption.java @@ -1,6 +1,7 @@ package eva2.optimization.operator.paramcontrol; import eva2.gui.editor.GenericObjectEditor; +import eva2.util.annotation.Description; import java.io.Serializable; @@ -9,9 +10,8 @@ import java.io.Serializable; * This only works if iterations are known. The new variant allows exponential adaption, * where the second parameter (endV) is interpreted as halfing time in percent of the * full run. - * - * @author mkron */ +@Description("Adapt the inertnessOrChi value of PSO.") public class PSOInertnessAdaption extends LinearParamAdaption implements Serializable { public PSOInertnessAdaption() { @@ -31,8 +31,4 @@ public class PSOInertnessAdaption extends LinearParamAdaption implements Seriali public String endVTipText() { return "End value for the inertness"; } - - public static String globalInfo() { - return "Adapt the inertnessOrChi value of PSO."; - } } diff --git a/src/eva2/optimization/operator/paramcontrol/ParameterControlManager.java b/src/eva2/optimization/operator/paramcontrol/ParameterControlManager.java index 57027111..1f468861 100644 --- a/src/eva2/optimization/operator/paramcontrol/ParameterControlManager.java +++ b/src/eva2/optimization/operator/paramcontrol/ParameterControlManager.java @@ -4,6 +4,7 @@ import eva2.gui.BeanInspector; import eva2.optimization.modules.Processor; import eva2.optimization.population.Population; import eva2.tools.Pair; +import eva2.util.annotation.Description; import java.io.Serializable; import java.util.ArrayList; @@ -19,11 +20,11 @@ import java.util.Vector; * one fewer window layer) but there must be an additional method getParamControl implemented * which returns the ParameterControlManager to make it available to the Processor. * - * @author mkron * @see ParamAdaption * @see Processor * @see AbstractParameterControl */ +@Description("Define a list of dynamically adapted parameters.") public class ParameterControlManager implements InterfaceParameterControl, Serializable { public Object[] initialValues = null; private ParamAdaption[] singleAdapters = new ParamAdaption[]{}; @@ -189,10 +190,6 @@ public class ParameterControlManager implements InterfaceParameterControl, Seria } } - public static String globalInfo() { - return "Define a list of dynamically adapted parameters."; - } - public String getName() { return "ParameterControlManager"; } diff --git a/src/eva2/optimization/operator/paramcontrol/SingleParamAdaption.java b/src/eva2/optimization/operator/paramcontrol/SingleParamAdaption.java index 5023a933..ce0d072e 100644 --- a/src/eva2/optimization/operator/paramcontrol/SingleParamAdaption.java +++ b/src/eva2/optimization/operator/paramcontrol/SingleParamAdaption.java @@ -4,6 +4,7 @@ package eva2.optimization.operator.paramcontrol; // //import java.io.Serializable; // +//import eva2.util.annotation.Description; //import eva2.tools.Mathematics; // ///** @@ -15,6 +16,7 @@ package eva2.optimization.operator.paramcontrol; // * @author mkron // * // */ +//@Description("A single parameter may be adapted using linear interpolation or exponential decrease.") //public class SingleParamAdaption extends AbstractAdaptiveParameters implements Serializable { // protected String[] params = null; // private double startV; @@ -87,10 +89,6 @@ package eva2.optimization.operator.paramcontrol; // return "Select type of adaption."; // } // -// public static String globalInfo() { -// return "A single parameter may be adapted using linear interpolation or exponential decrease."; -// } -// // @Override // public double getAdaptionParameter(int controlledIndex, int paramIndex) { // if (paramIndex==0) return startV; diff --git a/src/eva2/optimization/operator/paramcontrol/SinusoidalParamAdaption.java b/src/eva2/optimization/operator/paramcontrol/SinusoidalParamAdaption.java index 4d4a2fe1..b647d602 100644 --- a/src/eva2/optimization/operator/paramcontrol/SinusoidalParamAdaption.java +++ b/src/eva2/optimization/operator/paramcontrol/SinusoidalParamAdaption.java @@ -1,6 +1,7 @@ package eva2.optimization.operator.paramcontrol; import eva2.optimization.population.Population; +import eva2.util.annotation.Description; import java.io.Serializable; @@ -9,9 +10,10 @@ import java.io.Serializable; * value with a given iteration period. The dampening is integrated as a sub-linear reduction of the * frequency, turning sin(t) into sin(((t+1)^d)-1) which is linear for d=1. For slightly smaller values, * the frequency slowly decreases, while for slightly larger values, it slowly increases. - * - * @author mkron */ +@Description("Sinusoidally oscillating value, the frequency may be varyied with time. E.g. use dampening 0.9 " + + "for a slightly decreasing frequency, dampening 1.1 for a slight increase. The frequency is modified " + + "in the form sin(t) -> sin(-1+(t+1)^d)") public class SinusoidalParamAdaption implements InterfaceHasUpperDoubleBound, ParamAdaption, GenericParamAdaption, Serializable { private double upperBnd = 1; private double lowerBnd = 0; @@ -62,8 +64,6 @@ public class SinusoidalParamAdaption implements InterfaceHasUpperDoubleBound, Pa } res = medVal + (upperBnd - lowerBnd) * 0.5 * Math.sin(t); -// System.out.println("In " + this + " at " + iteration + ": " + res); - return res; } @@ -71,12 +71,6 @@ public class SinusoidalParamAdaption implements InterfaceHasUpperDoubleBound, Pa return "SinAdapt(" + getControlledParam() + "_" + lowerBnd + "_" + upperBnd + "_" + iterationPeriod + ((dampening != 1) ? ("_dmp-" + dampening) : "") + ")"; } - public String globalInfo() { - return "Sinusoidally oscillating value, the frequency may be varyied with time. E.g. use dampening 0.9 " + - "for a slightly decreasing frequency, dampening 1.1 for a slight increase. The frequency is modified " + - "in the form sin(t) -> sin(-1+(t+1)^d)"; - } - /** * Calculate sub-linear t as -1+(t+1)^dampeningExp * diff --git a/src/eva2/optimization/operator/paretofrontmetrics/MetricD1ApproxParetoFront.java b/src/eva2/optimization/operator/paretofrontmetrics/MetricD1ApproxParetoFront.java index 3e344359..2fbbb16b 100644 --- a/src/eva2/optimization/operator/paretofrontmetrics/MetricD1ApproxParetoFront.java +++ b/src/eva2/optimization/operator/paretofrontmetrics/MetricD1ApproxParetoFront.java @@ -7,14 +7,16 @@ import eva2.optimization.operator.archiving.ArchivingAllDominating; import eva2.optimization.population.Population; import eva2.problems.AbstractMultiObjectiveOptimizationProblem; import eva2.optimization.tools.FileTools; +import eva2.util.annotation.Description; import java.util.ArrayList; /** - * The D1* Pareto front metric requires a refrence Pareto front + * The D1* Pareto front metric requires a reference Pareto front * and calculate the distance between the true Pareto front and * the current solution. */ +@Description("This method calculates the mean distance of the approximated set to the true Pareto front.") public class MetricD1ApproxParetoFront implements eva2.optimization.operator.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable { private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt"); private String[] titles; @@ -127,9 +129,6 @@ public class MetricD1ApproxParetoFront implements eva2.optimization.operator.par return result; } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -140,15 +139,6 @@ public class MetricD1ApproxParetoFront implements eva2.optimization.operator.par return "D1 P"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method calculates the mean distance of the approximated set to the true Pareto front."; - } - /** * This method allows you to set the path to the data file. * diff --git a/src/eva2/optimization/operator/paretofrontmetrics/MetricD1TrueParetoFront.java b/src/eva2/optimization/operator/paretofrontmetrics/MetricD1TrueParetoFront.java index 9193b80d..e59f187b 100644 --- a/src/eva2/optimization/operator/paretofrontmetrics/MetricD1TrueParetoFront.java +++ b/src/eva2/optimization/operator/paretofrontmetrics/MetricD1TrueParetoFront.java @@ -7,14 +7,16 @@ import eva2.optimization.operator.archiving.ArchivingAllDominating; import eva2.optimization.population.Population; import eva2.problems.AbstractMultiObjectiveOptimizationProblem; import eva2.optimization.tools.FileTools; +import eva2.util.annotation.Description; import java.util.ArrayList; /** - * The D1 Pareto front metric requires a refrence Pareto front + * The D1 Pareto front metric requires a reference Pareto front * and calculate the distance between the current solution and * the true Pareto front. */ +@Description("This method calculates the mean distance of the true Pareto front to the approximated set.") public class MetricD1TrueParetoFront implements eva2.optimization.operator.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable { private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt"); @@ -128,9 +130,6 @@ public class MetricD1TrueParetoFront implements eva2.optimization.operator.paret return result; } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -141,15 +140,6 @@ public class MetricD1TrueParetoFront implements eva2.optimization.operator.paret return "D1 P*"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method calculates the mean distance of the true Pareto front to the approximated set."; - } - /** * This method allows you to set the path to the data file. * diff --git a/src/eva2/optimization/operator/paretofrontmetrics/MetricErrorRatio.java b/src/eva2/optimization/operator/paretofrontmetrics/MetricErrorRatio.java index 983647e9..be690430 100644 --- a/src/eva2/optimization/operator/paretofrontmetrics/MetricErrorRatio.java +++ b/src/eva2/optimization/operator/paretofrontmetrics/MetricErrorRatio.java @@ -1,21 +1,21 @@ package eva2.optimization.operator.paretofrontmetrics; - import eva2.gui.PropertyFilePath; import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.operator.archiving.ArchivingAllDominating; import eva2.optimization.population.Population; import eva2.problems.AbstractMultiObjectiveOptimizationProblem; import eva2.optimization.tools.FileTools; +import eva2.util.annotation.Description; import java.util.ArrayList; - /** * The error ratio metric only suited for small discrete * Pareto fronts, since it calculates the intersection between * the reference and the current solution. */ +@Description("This method calculates how many solutions are contained in the reference solution.") public class MetricErrorRatio implements eva2.optimization.operator.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable { private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt"); private double epsilon = 0.0001; @@ -135,9 +135,6 @@ public class MetricErrorRatio implements eva2.optimization.operator.paretofrontm return false; } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -148,15 +145,6 @@ public class MetricErrorRatio implements eva2.optimization.operator.paretofrontm return "Error ratio"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method calculates how many solutions are contained in the reference solution."; - } - /** * This method allows you to set the path to the data file. * diff --git a/src/eva2/optimization/operator/paretofrontmetrics/MetricMaximumParetoFrontError.java b/src/eva2/optimization/operator/paretofrontmetrics/MetricMaximumParetoFrontError.java index 21bcb3e2..a13d194e 100644 --- a/src/eva2/optimization/operator/paretofrontmetrics/MetricMaximumParetoFrontError.java +++ b/src/eva2/optimization/operator/paretofrontmetrics/MetricMaximumParetoFrontError.java @@ -7,6 +7,7 @@ import eva2.optimization.operator.archiving.ArchivingAllDominating; import eva2.optimization.population.Population; import eva2.problems.AbstractMultiObjectiveOptimizationProblem; import eva2.optimization.tools.FileTools; +import eva2.util.annotation.Description; import java.util.ArrayList; @@ -14,6 +15,7 @@ import java.util.ArrayList; * Maximum Pareto Front Error gives the maximum distance of all minimum distances of each * element in the current solution to the true Pareto front. */ +@Description("This method calculates the maximum distance to the reference.") public class MetricMaximumParetoFrontError implements eva2.optimization.operator.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable { private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt"); private String[] titles; @@ -126,9 +128,6 @@ public class MetricMaximumParetoFrontError implements eva2.optimization.operator return result; } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -139,15 +138,6 @@ public class MetricMaximumParetoFrontError implements eva2.optimization.operator return "Maximum Pareto Front Error"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "This method calculates the maximum distance to the reference."; - } - /** * This method allows you to set the path to the data file. * diff --git a/src/eva2/optimization/operator/paretofrontmetrics/MetricOverallNonDominatedVectors.java b/src/eva2/optimization/operator/paretofrontmetrics/MetricOverallNonDominatedVectors.java index c1c66bfe..ad622341 100644 --- a/src/eva2/optimization/operator/paretofrontmetrics/MetricOverallNonDominatedVectors.java +++ b/src/eva2/optimization/operator/paretofrontmetrics/MetricOverallNonDominatedVectors.java @@ -4,11 +4,13 @@ import eva2.optimization.individuals.AbstractEAIndividual; import eva2.optimization.operator.archiving.ArchivingAllDominating; import eva2.optimization.population.Population; import eva2.problems.AbstractMultiObjectiveOptimizationProblem; +import eva2.util.annotation.Description; /** * Overall Non-Dom. Vector Generation calculates simply the number of - * non-dominated solutions in the current soltuion set. + * non-dominated solutions in the current solution set. */ +@Description("Calculating the number of non dominated individuals.") public class MetricOverallNonDominatedVectors implements InterfaceParetoFrontMetric, java.io.Serializable { private ArchivingAllDominating dominating = new ArchivingAllDominating(); @@ -57,9 +59,6 @@ public class MetricOverallNonDominatedVectors implements InterfaceParetoFrontMet return tmpPop.size(); } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -69,13 +68,4 @@ public class MetricOverallNonDominatedVectors implements InterfaceParetoFrontMet public String getName() { return "Overall Non-Dominated Vectors"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "Calculating the number of non dominated individuals."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/paretofrontmetrics/MetricS.java b/src/eva2/optimization/operator/paretofrontmetrics/MetricS.java index e4c09a37..d8bdd16f 100644 --- a/src/eva2/optimization/operator/paretofrontmetrics/MetricS.java +++ b/src/eva2/optimization/operator/paretofrontmetrics/MetricS.java @@ -5,10 +5,12 @@ import eva2.optimization.individuals.ESIndividualDoubleData; import eva2.optimization.operator.archiving.ArchivingAllDominating; import eva2.optimization.population.Population; import eva2.problems.AbstractMultiObjectiveOptimizationProblem; +import eva2.util.annotation.Description; /** * S-Metric calculates the hyper-volume covered between the current solutions and a reference point. */ +@Description("Calculating the hypervolume UNDER the given Pareto-front.") public class MetricS implements InterfaceParetoFrontMetric, java.io.Serializable { private double[][] objectiveSpaceRange; @@ -200,9 +202,6 @@ public class MetricS implements InterfaceParetoFrontMetric, java.io.Serializable return result; } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -212,13 +211,4 @@ public class MetricS implements InterfaceParetoFrontMetric, java.io.Serializable public String getName() { return "S-Metric"; } - - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "Calculating the hypervolume UNDER the given Pareto-front."; - } } \ No newline at end of file diff --git a/src/eva2/optimization/operator/paretofrontmetrics/MetricSWithReference.java b/src/eva2/optimization/operator/paretofrontmetrics/MetricSWithReference.java index d2faa094..ac006041 100644 --- a/src/eva2/optimization/operator/paretofrontmetrics/MetricSWithReference.java +++ b/src/eva2/optimization/operator/paretofrontmetrics/MetricSWithReference.java @@ -8,6 +8,7 @@ import eva2.optimization.operator.archiving.ArchivingAllDominating; import eva2.optimization.population.Population; import eva2.problems.AbstractMultiObjectiveOptimizationProblem; import eva2.optimization.tools.FileTools; +import eva2.util.annotation.Description; import java.util.ArrayList; @@ -15,6 +16,7 @@ import java.util.ArrayList; * S-Metric calculates the hyper-volume covered between the current solutions and a reference point. * But here the difference to a given hybervolume is to be minimized. */ +@Description("Difference between the current SMetric and the reference SMetric (curSM - refSM).") public class MetricSWithReference implements InterfaceParetoFrontMetric, java.io.Serializable { private double[][] objectiveSpaceRange; private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt"); @@ -249,9 +251,6 @@ public class MetricSWithReference implements InterfaceParetoFrontMetric, java.io return result; } -/********************************************************************************************************************** - * These are for GUI - */ /** * This method allows the CommonJavaObjectEditorPanel to read the * name to the current object. @@ -262,15 +261,6 @@ public class MetricSWithReference implements InterfaceParetoFrontMetric, java.io return "S-Metric"; } - /** - * This method returns a global info string - * - * @return description - */ - public static String globalInfo() { - return "Difference between the current SMetric and the reference SMetric (curSM - refSM)."; - } - /** * This method allows you to set the path to the data file. *