Remove globalInfo completely

closes #9
- Remove all remaining globalInfo methods.
- Remove globalInfo handling.
- WIN.
This commit is contained in:
2014-11-02 19:04:17 +01:00
parent 551b14fe3d
commit 70dd824d13
78 changed files with 181 additions and 957 deletions

View File

@@ -601,8 +601,7 @@ public class BeanInspector {
Object args[] = {};
Object ret;
for (String meth : new String[]{"getName", "globalInfo"}) {
ret = callIfAvailable(obj, meth, args);
ret = callIfAvailable(obj, "getName", args);
if (ret != null) {
infoBf.append("\t");
infoBf.append((String) ret);
@@ -614,8 +613,6 @@ public class BeanInspector {
}
}
}
return infoBf.toString();
}

View File

@@ -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,22 +340,11 @@ 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();
}
}
if (tip != null) {
if (tip.length() <= maxLen) {

View File

@@ -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();

View File

@@ -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";
}
}

View File

@@ -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";
}
}

View File

@@ -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";
}
}

View File

@@ -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";
}
}

View File

@@ -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";
}
}

View File

@@ -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";
}
}

View File

@@ -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;

View File

@@ -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.";
}
}

View File

@@ -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.";
}
}

View File

@@ -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)).
* <p/>
* </p><p>
* 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.";
}
}

View File

@@ -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.";
}
}

View File

@@ -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.

View File

@@ -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.

View File

@@ -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;

View File

@@ -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.

View File

@@ -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;

View File

@@ -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;

View File

@@ -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.";
}
}

View File

@@ -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.";
}
}

View File

@@ -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.";
}
}

View File

@@ -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.

View File

@@ -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;
}

View File

@@ -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.";
}
}

View File

@@ -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.";
}
}

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.";
}
}

View File

@@ -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.";
}
}

View File

@@ -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;
/**
* <p>Title: EvA2</p>
* <p>Description: PMX-Crossover as defined in http://www.cs.rit.edu/usr/local/pub/pga/Genetic/Slides_etc/ga_5_og.pdf</p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
*
* @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.";
}
}

View File

@@ -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;
/**
* <p>Title: EvA2</p>
* <p>Description: PMX-Crossover as defined in http://www.cs.rit.edu/usr/local/pub/pga/Genetic/Slides_etc/ga_5_og.pdf</p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
*
* @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.";
}
}

View File

@@ -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.";
}
}

View File

@@ -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
*

View File

@@ -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
*

View File

@@ -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
*

View File

@@ -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
*

View File

@@ -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
*

View File

@@ -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

View File

@@ -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
*

View File

@@ -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.
*

View File

@@ -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
*

View File

@@ -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
*

View File

@@ -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
*

View File

@@ -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
*

View File

@@ -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].";
}
}

View File

@@ -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.";
}
}

View File

@@ -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.";
}
}

View File

@@ -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].";
}
}

View File

@@ -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].";
}
}

View File

@@ -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.";
}
}

View File

@@ -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.";
}
}

View File

@@ -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.

View File

@@ -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
*

View File

@@ -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

View File

@@ -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<AbstractEAIndividual> bests = new Vector<AbstractEAIndividual>(pop.size());
Vector<Double> bests = (Vector<Double>) pop.getEAIndividual(0).getData(NichePSO.fitArchiveKey);
if (bests.size() < haltingWindow) {
return false;

View File

@@ -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.Vector;
@@ -14,6 +15,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 StandardDeactivationStrategy implements InterfaceDeactivationStrategy, java.io.Serializable {
private double epsilon = 0.0001;
@@ -46,28 +48,11 @@ public class StandardDeactivationStrategy implements InterfaceDeactivationStrate
return new StandardDeactivationStrategy(this);
}
public String globalInfo() {
return "Strategy to deactivate subswarms";
}
/**********************************************************************************************************************
* shouldDeactivateSubswarm
*/
/**
* @param pop
* @return
* @tested
*/
// public boolean areAllConverged(Population pop){
// for (int i = 0; i < pop.size(); ++i){
// AbstractEAIndividual currentindy = pop.getEAIndividual(i);
// Double sd = (Double)currentindy.getData(NichePSO.stdDevKey);
// if (sd.doubleValue() > getEpsilon()){
// return false; // particle not converged...
// }
// }
// return true;
// }
public boolean areAllConverged(Population pop) {
for (int i = 0; i < pop.size(); ++i) {
AbstractEAIndividual currentindy = pop.getEAIndividual(i);

View File

@@ -1,6 +1,7 @@
package eva2.optimization.operator.nichepso.merging;
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
import eva2.util.annotation.Description;
import java.util.Vector;
@@ -16,6 +17,7 @@ import java.util.Vector;
* In IEEE Congress on Evolutionary Computation,
* 2007.
*/
@Description("Strategy to merge subswarms")
public class ScatterMergingStrategy extends StandardMergingStrategy {
public ScatterMergingStrategy() {
@@ -26,15 +28,6 @@ public class ScatterMergingStrategy extends StandardMergingStrategy {
super(theMu);
}
@Override
public String globalInfo() {
return "Strategy to merge subswarms";
}
/**********************************************************************************************************************
* mergeSubswarms
*/
/**
* @param i
* @param j

View File

@@ -5,6 +5,7 @@ import eva2.optimization.individuals.InterfaceESIndividual;
import eva2.optimization.operator.distancemetric.EuclideanMetric;
import eva2.optimization.operator.distancemetric.PhenotypeMetric;
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
import eva2.util.annotation.Description;
import java.util.Vector;
@@ -17,18 +18,11 @@ import java.util.Vector;
* In Proceedings of the 4th Asia-Pacific Conference on Simulated Evolution and Learning (SEAL'02),
* 2002, 2, 692-696
*/
@Description("Strategy to merge subswarms")
public class StandardMergingStrategy implements InterfaceMergingStrategy, java.io.Serializable {
private double mu = 0.001; // "experimentally found to be effective" according to "a niching particle swarm optimizer" by Brits et al.
public String globalInfo() {
return "Strategy to merge subswarms";
}
/**
* *******************************************************************************************************************
* ctors
*/
public StandardMergingStrategy() {
}
@@ -46,9 +40,6 @@ public class StandardMergingStrategy implements InterfaceMergingStrategy, java.i
return new StandardMergingStrategy(this);
}
/**********************************************************************************************************************
* shouldMergeSubswarms
*/
/**
* @tested the subswarms are merged, if they overlap (or are very close) and if they are of equal state
* (non-Javadoc) @see javaeva.server.oa.go.Operators.NichePSO.InterfaceMergingStrategie#shouldMergeSubswarms(javaeva.server.oa.go.Strategies.ParticleSubSwarmOptimization, javaeva.server.oa.go.Strategies.ParticleSubSwarmOptimization)

View File

@@ -4,6 +4,7 @@ import eva2.optimization.individuals.AbstractEAIndividual;
import eva2.optimization.population.Population;
import eva2.optimization.strategies.NichePSO;
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
import eva2.util.annotation.Description;
/**
* The standard deviation in the fitness of each main swarm particle over the last 3 iterations is calculated.
@@ -15,6 +16,7 @@ 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 create subswarms from the main swarm")
public class StandardSubswarmCreationStrategy implements InterfaceSubswarmCreationStrategy, java.io.Serializable {
protected double delta = 0.0001; // "experimentally found to be effective" according to "a niching particle swarm optimizer" by Brits et al.
@@ -32,13 +34,6 @@ public class StandardSubswarmCreationStrategy implements InterfaceSubswarmCreati
return new StandardSubswarmCreationStrategy(delta);
}
public String globalInfo() {
return "Strategy to create subswarms from the main swarm";
}
/**********************************************************************************************************************
* shouldCreateSubswarm
*/
/**
* @param indy main swarm particle
* @return

View File

@@ -1,14 +1,14 @@
package eva2.optimization.operator.paramcontrol;
import eva2.optimization.population.Population;
import eva2.util.annotation.Description;
import java.io.Serializable;
/**
* Dummy implementation. This class is ignored by the Processor. Parameters will not be changed.
*
* @author mkron
*/
@Description("Parameters will not be changed.")
public class ConstantParameters extends AbstractParameterControl implements Serializable {
public ConstantParameters() {
}
@@ -35,8 +35,4 @@ public class ConstantParameters extends AbstractParameterControl implements Seri
@Override
public void updateParameters(Object obj) {
}
public static String globalInfo() {
return "Parameters will not be changed.";
}
}

View File

@@ -4,6 +4,7 @@ import eva2.optimization.individuals.InterfaceDataTypeDouble;
import eva2.optimization.operator.constraint.AbstractConstraint;
import eva2.optimization.population.Population;
import eva2.tools.math.Mathematics;
import eva2.util.annotation.Description;
import java.io.Serializable;
import java.util.LinkedList;
@@ -14,11 +15,10 @@ import java.util.LinkedList;
* if it was always infeasible, the penalty factor is increased. For other cases, the penalty remains the same.
* This is plausible for the typical case that the optimum lies near the constraint boundary, however it makes
* the fitness function change dynamically based only on the positions of last best indidivuals.
* <p/>
* </p><p>
* 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();

View File

@@ -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) {
}

View File

@@ -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"};
}

View File

@@ -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) {
}

View File

@@ -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) {
}

View File

@@ -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.";
}
}

View File

@@ -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";
}

View File

@@ -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;

View File

@@ -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
*

View File

@@ -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.
*

View File

@@ -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.
*

View File

@@ -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.
*

View File

@@ -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.
*

View File

@@ -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.";
}
}

View File

@@ -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.";
}
}

View File

@@ -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.
*