Remove globalInfo completely
closes #9 - Remove all remaining globalInfo methods. - Remove globalInfo handling. - WIN.
This commit is contained in:
@@ -601,8 +601,7 @@ public class BeanInspector {
|
|||||||
Object args[] = {};
|
Object args[] = {};
|
||||||
Object ret;
|
Object ret;
|
||||||
|
|
||||||
for (String meth : new String[]{"getName", "globalInfo"}) {
|
ret = callIfAvailable(obj, "getName", args);
|
||||||
ret = callIfAvailable(obj, meth, args);
|
|
||||||
if (ret != null) {
|
if (ret != null) {
|
||||||
infoBf.append("\t");
|
infoBf.append("\t");
|
||||||
infoBf.append((String) ret);
|
infoBf.append((String) ret);
|
||||||
@@ -614,8 +613,6 @@ public class BeanInspector {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return infoBf.toString();
|
return infoBf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,8 +17,6 @@ import java.awt.event.ItemListener;
|
|||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.beans.PropertyChangeSupport;
|
import java.beans.PropertyChangeSupport;
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.lang.reflect.Modifier;
|
|
||||||
import java.lang.reflect.Proxy;
|
import java.lang.reflect.Proxy;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -342,22 +340,11 @@ public class OptimizationEditorPanel extends JPanel implements ItemListener {
|
|||||||
Class[] classParams = new Class[]{};
|
Class[] classParams = new Class[]{};
|
||||||
|
|
||||||
String tip = null;
|
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);
|
Description description = instances.get(i).getAnnotation(Description.class);
|
||||||
if (description != null) {
|
if (description != null) {
|
||||||
tip = description.value();
|
tip = description.value();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (tip != null) {
|
if (tip != null) {
|
||||||
if (tip.length() <= maxLen) {
|
if (tip.length() <= maxLen) {
|
||||||
|
@@ -240,9 +240,7 @@ public final class PropertySheetPanel extends JPanel implements PropertyChangeLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for a globalInfo method that returns a string
|
int methsFound = 0; // don't loop too long, so count until all found
|
||||||
// describing the target
|
|
||||||
int methsFound = 0; // dont loop too long, so count until all found
|
|
||||||
for (MethodDescriptor methodDescriptor : methodDescriptors) {
|
for (MethodDescriptor methodDescriptor : methodDescriptors) {
|
||||||
String name = methodDescriptor.getDisplayName();
|
String name = methodDescriptor.getDisplayName();
|
||||||
Method meth = methodDescriptor.getMethod();
|
Method meth = methodDescriptor.getMethod();
|
||||||
|
@@ -6,15 +6,15 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.optimization.strategies.BinaryScatterSearch;
|
import eva2.optimization.strategies.BinaryScatterSearch;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This crossover-Method performs a \"union\" of the selected Individuals
|
* This crossover-Method performs a \"union\" of the selected Individuals
|
||||||
* It only mates 2 Individuals, not more
|
* 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 {
|
public class CM1 implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -66,17 +66,7 @@ public class CM1 implements InterfaceCrossover, java.io.Serializable {
|
|||||||
return getName();
|
return getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* **************************************************
|
|
||||||
* GUI
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Combination Method 1";
|
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";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -5,15 +5,15 @@ import eva2.optimization.individuals.InterfaceDataTypeBinary;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This crossover-Method performs an \"intersection\" of the selected Individuals
|
* This crossover-Method performs an \"intersection\" of the selected Individuals
|
||||||
* It only mates 2 Individuals, not more
|
* 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 {
|
public class CM2 implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -66,16 +66,7 @@ public class CM2 implements InterfaceCrossover, java.io.Serializable {
|
|||||||
return getName();
|
return getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* **************************************************
|
|
||||||
* GUI
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Combination Method 2";
|
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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -5,15 +5,15 @@ import eva2.optimization.individuals.InterfaceDataTypeBinary;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
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
|
* 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
|
* It only mates 2 Individuals, not more
|
||||||
*
|
|
||||||
* @author Alex
|
|
||||||
*/
|
*/
|
||||||
|
@Description("Weight driven crossover method")
|
||||||
public class CM3 implements InterfaceCrossover, java.io.Serializable {
|
public class CM3 implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -77,17 +77,7 @@ public class CM3 implements InterfaceCrossover, java.io.Serializable {
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* **************************************************
|
|
||||||
* GUI
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Combination Method 3";
|
return "Combination Method 3";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Weight driven crossover method";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -5,15 +5,15 @@ import eva2.optimization.individuals.InterfaceDataTypeBinary;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
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)
|
* 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
|
* It only mates 2 Individuals, not more
|
||||||
*
|
|
||||||
* @author Alex
|
|
||||||
*/
|
*/
|
||||||
|
@Description("Intersection with weight driven improvement")
|
||||||
public class CM4 implements InterfaceCrossover, java.io.Serializable {
|
public class CM4 implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -79,17 +79,7 @@ public class CM4 implements InterfaceCrossover, java.io.Serializable {
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* **************************************************
|
|
||||||
* GUI
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Combination Method 4";
|
return "Combination Method 4";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Intersection with weight driven improvement";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -5,15 +5,15 @@ import eva2.optimization.individuals.InterfaceDataTypeBinary;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
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
|
* 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
|
* It only mates 2 Individuals, not more
|
||||||
*
|
|
||||||
* @author Alex
|
|
||||||
*/
|
*/
|
||||||
|
@Description("Intersection with random change")
|
||||||
public class CM5 implements InterfaceCrossover, java.io.Serializable {
|
public class CM5 implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -62,17 +62,7 @@ public class CM5 implements InterfaceCrossover, java.io.Serializable {
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* **************************************************
|
|
||||||
* GUI
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Combination Method 5";
|
return "Combination Method 5";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Intersection with random change";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,7 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.optimization.strategies.BinaryScatterSearch;
|
import eva2.optimization.strategies.BinaryScatterSearch;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
|
|
||||||
@@ -13,9 +14,8 @@ import java.util.BitSet;
|
|||||||
* Score driven Crossover-Method. It uses the same score as the BinaryScatterSearch.
|
* 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
|
* 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
|
* It only mates 2 Individuals, not more
|
||||||
*
|
|
||||||
* @author Alex
|
|
||||||
*/
|
*/
|
||||||
|
@Description("Score driven crossover method")
|
||||||
public class CM6 implements InterfaceCrossover, java.io.Serializable {
|
public class CM6 implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -68,17 +68,7 @@ public class CM6 implements InterfaceCrossover, java.io.Serializable {
|
|||||||
return getName();
|
return getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* **************************************************
|
|
||||||
* GUI
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Combination Method 6";
|
return "Combination Method 6";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "score driven crossover method";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -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.
|
* 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
|
* 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 {
|
public class CM7 implements InterfaceCrossover, java.io.Serializable, InterfaceEvaluatingCrossoverOperator {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -88,20 +86,10 @@ public class CM7 implements InterfaceCrossover, java.io.Serializable, InterfaceE
|
|||||||
return this.evaluations;
|
return this.evaluations;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* **************************************************
|
|
||||||
* GUI
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Combination Method 7";
|
return "Combination Method 7";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
//TODO
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetEvaluations() {
|
public void resetEvaluations() {
|
||||||
this.evaluations = 0;
|
this.evaluations = 0;
|
||||||
|
@@ -5,6 +5,7 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The children are randomized intermediate combinations of the parents,
|
* 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
|
* where r_i are uniform random numbers normed to the sum of one and
|
||||||
* p_ji is the i-th component of parent j.
|
* 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 {
|
public class CrossoverESArithmetical implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -124,9 +126,6 @@ public class CrossoverESArithmetical implements InterfaceCrossover, java.io.Seri
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -136,13 +135,4 @@ public class CrossoverESArithmetical implements InterfaceCrossover, java.io.Seri
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "ES arithmetical crossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -5,14 +5,12 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
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 {
|
public class CrossoverESBLXAlpha implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -130,9 +128,6 @@ public class CrossoverESBLXAlpha implements InterfaceCrossover, java.io.Serializ
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -143,21 +138,13 @@ public class CrossoverESBLXAlpha implements InterfaceCrossover, java.io.Serializ
|
|||||||
return "ES BLX Alpha crossover";
|
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
|
* This method allows you to set the number of crossovers that occur in the
|
||||||
* genotype.
|
* genotype.
|
||||||
*
|
*
|
||||||
* @param a The number of crossovers.
|
* @param a The number of crossovers.
|
||||||
*/
|
*/
|
||||||
|
@Parameter(description = "The alpha of BLX.")
|
||||||
public void setAlpha(double a) {
|
public void setAlpha(double a) {
|
||||||
if (a < 0) {
|
if (a < 0) {
|
||||||
a = 0;
|
a = 0;
|
||||||
@@ -168,8 +155,4 @@ public class CrossoverESBLXAlpha implements InterfaceCrossover, java.io.Serializ
|
|||||||
public double getAlpha() {
|
public double getAlpha() {
|
||||||
return this.alpha;
|
return this.alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String alphaTipText() {
|
|
||||||
return "The alpha of BLX.";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -6,15 +6,17 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The flat crossover inits values randomly within the extreme values of
|
* The flat crossover inits values randomly within the extreme values of
|
||||||
* all parents, namely
|
* all parents, namely
|
||||||
* c[i]=rand(min_j(p_ij), max_j(p_ij)).
|
* 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
|
* where c[i] is the i-th child component and p_ij is the i-th component
|
||||||
* of parent j.
|
* of parent j.
|
||||||
*/
|
*/
|
||||||
|
@Description("The flat crossover initializes the values within the extreme values.")
|
||||||
public class CrossoverESFlat implements InterfaceCrossover, java.io.Serializable {
|
public class CrossoverESFlat implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -123,9 +125,6 @@ public class CrossoverESFlat implements InterfaceCrossover, java.io.Serializable
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -135,13 +134,4 @@ public class CrossoverESFlat implements InterfaceCrossover, java.io.Serializable
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "ES flat crossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -4,14 +4,12 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
|||||||
import eva2.optimization.individuals.InterfaceESIndividual;
|
import eva2.optimization.individuals.InterfaceESIndividual;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
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 {
|
public class CrossoverESIntermediate implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -116,9 +114,6 @@ public class CrossoverESIntermediate implements InterfaceCrossover, java.io.Seri
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -128,13 +123,4 @@ public class CrossoverESIntermediate implements InterfaceCrossover, java.io.Seri
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "ES intermediate crossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -5,10 +5,12 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
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 {
|
public class CrossoverESNPointDiscrete implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
private int numberOfCrossovers = 3;
|
private int numberOfCrossovers = 3;
|
||||||
@@ -126,9 +128,6 @@ public class CrossoverESNPointDiscrete implements InterfaceCrossover, java.io.Se
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -139,15 +138,6 @@ public class CrossoverESNPointDiscrete implements InterfaceCrossover, java.io.Se
|
|||||||
return "ES discrete n-point crossover";
|
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
|
* This method allows you to set the number of crossovers that occur in the
|
||||||
* genotype.
|
* genotype.
|
||||||
|
@@ -5,10 +5,12 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
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 {
|
public class CrossoverESNPointDiscreteDislocation implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
private int numberOfCrossovers = 3;
|
private int numberOfCrossovers = 3;
|
||||||
@@ -141,9 +143,6 @@ public class CrossoverESNPointDiscreteDislocation implements InterfaceCrossover,
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -154,15 +153,6 @@ public class CrossoverESNPointDiscreteDislocation implements InterfaceCrossover,
|
|||||||
return "ES discrete n-point crossover with dislocation";
|
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
|
* This method allows you to set the number of crossovers that occur in the
|
||||||
* genotype.
|
* genotype.
|
||||||
|
@@ -10,12 +10,14 @@ import eva2.problems.F1Problem;
|
|||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.Mathematics;
|
import eva2.tools.math.Mathematics;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Description("This is the Parent Centric Crossover (PCX).")
|
||||||
public class CrossoverESPCX implements InterfaceCrossover, java.io.Serializable {
|
public class CrossoverESPCX implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -296,9 +298,6 @@ public class CrossoverESPCX implements InterfaceCrossover, java.io.Serializable
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -309,15 +308,6 @@ public class CrossoverESPCX implements InterfaceCrossover, java.io.Serializable
|
|||||||
return "ES PCX crossover";
|
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) {
|
public void setEta(double a) {
|
||||||
if (a < 0) {
|
if (a < 0) {
|
||||||
a = 0;
|
a = 0;
|
||||||
|
@@ -8,10 +8,12 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.problems.F1Problem;
|
import eva2.problems.F1Problem;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
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 {
|
public class CrossoverESSBX implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -193,9 +195,6 @@ public class CrossoverESSBX implements InterfaceCrossover, java.io.Serializable
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -206,15 +205,6 @@ public class CrossoverESSBX implements InterfaceCrossover, java.io.Serializable
|
|||||||
return "ES SBX crossover";
|
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
|
* This method allows you to set the number of crossovers that occur in the
|
||||||
* genotype.
|
* genotype.
|
||||||
|
@@ -9,10 +9,12 @@ import eva2.problems.F1Problem;
|
|||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.Mathematics;
|
import eva2.tools.math.Mathematics;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Description("This is the Simplex Crossover (SPX).")
|
||||||
public class CrossoverESSPX implements InterfaceCrossover, java.io.Serializable {
|
public class CrossoverESSPX implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -205,8 +207,6 @@ public class CrossoverESSPX implements InterfaceCrossover, java.io.Serializable
|
|||||||
if (plotFlag) {
|
if (plotFlag) {
|
||||||
plot.setUnconnectedPoint(tmpD[0], tmpD[1], 1);
|
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();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -229,15 +226,6 @@ public class CrossoverESSPX implements InterfaceCrossover, java.io.Serializable
|
|||||||
return "ES SPX crossover";
|
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) {
|
public void setEpsilon(double a) {
|
||||||
if (a < 0) {
|
if (a < 0) {
|
||||||
a = 0;
|
a = 0;
|
||||||
|
@@ -10,6 +10,7 @@ import eva2.problems.F1Problem;
|
|||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.Mathematics;
|
import eva2.tools.math.Mathematics;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -35,6 +36,7 @@ import java.util.ArrayList;
|
|||||||
* url = {http://garage.cse.msu.edu/icga97/Abstracts.html#092}
|
* 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 {
|
public class CrossoverESUNDX implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -301,9 +303,6 @@ public class CrossoverESUNDX implements InterfaceCrossover, java.io.Serializable
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -314,15 +313,6 @@ public class CrossoverESUNDX implements InterfaceCrossover, java.io.Serializable
|
|||||||
return "ES UNDX crossover";
|
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) {
|
public void setEta(double a) {
|
||||||
if (a < 0) {
|
if (a < 0) {
|
||||||
a = 0;
|
a = 0;
|
||||||
|
@@ -5,10 +5,12 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
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 {
|
public class CrossoverESUniformDiscrete implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -113,9 +115,6 @@ public class CrossoverESUniformDiscrete implements InterfaceCrossover, java.io.S
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -125,13 +124,4 @@ public class CrossoverESUniformDiscrete implements InterfaceCrossover, java.io.S
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "ES discrete n-point crossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -6,12 +6,14 @@ import eva2.optimization.individuals.InterfaceGAIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Description("This is a bit simulated crossover between m individuals.")
|
||||||
public class CrossoverGABitSimulated implements InterfaceCrossover, java.io.Serializable {
|
public class CrossoverGABitSimulated implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -124,9 +126,6 @@ public class CrossoverGABitSimulated implements InterfaceCrossover, java.io.Seri
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -136,13 +135,4 @@ public class CrossoverGABitSimulated implements InterfaceCrossover, java.io.Seri
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "GA bit simulated crossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -6,12 +6,14 @@ import eva2.optimization.individuals.InterfaceGAIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This operator performs one-point crossover.
|
* This operator performs one-point crossover.
|
||||||
*/
|
*/
|
||||||
|
@Description("This is a one-point crossover between two individuals.")
|
||||||
public class CrossoverGADefault implements InterfaceCrossover,
|
public class CrossoverGADefault implements InterfaceCrossover,
|
||||||
java.io.Serializable {
|
java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -124,9 +126,6 @@ public class CrossoverGADefault implements InterfaceCrossover,
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the name to the
|
* This method allows the CommonJavaObjectEditorPanel to read the name to the
|
||||||
* current object.
|
* current object.
|
||||||
@@ -136,13 +135,4 @@ public class CrossoverGADefault implements InterfaceCrossover,
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "GA default crossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -7,6 +7,7 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
|
|
||||||
@@ -15,9 +16,8 @@ import java.util.BitSet;
|
|||||||
* parent individuals are recombined by exchanging sub-segments within randomly
|
* 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
|
* selected points. Therefore, far-away alleles (larger GA schemas) are more likely to be split
|
||||||
* between individuals.
|
* 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 {
|
public class CrossoverGAGINPoint implements InterfaceCrossover, java.io.Serializable {
|
||||||
private int numberOfCrossovers = 3;
|
private int numberOfCrossovers = 3;
|
||||||
|
|
||||||
@@ -242,9 +242,6 @@ public class CrossoverGAGINPoint implements InterfaceCrossover, java.io.Serializ
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -255,15 +252,6 @@ public class CrossoverGAGINPoint implements InterfaceCrossover, java.io.Serializ
|
|||||||
return "GA-GI N-Point Crossover";
|
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
|
* This method allows you to set the number of crossovers that occur in the
|
||||||
* genotype.
|
* genotype.
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
package eva2.optimization.operator.crossover;
|
package eva2.optimization.operator.crossover;
|
||||||
|
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A variation of the GA n-point crossover. Restricts crossover to segment bounds
|
* 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
|
* of fixed length, so crossings occur at multiples of the segment length only. Segments
|
||||||
* will not be destroyed.
|
* 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 {
|
public class CrossoverGAGINPointSegmentwise extends CrossoverGAGINPoint {
|
||||||
int segmentLength = 8;
|
int segmentLength = 8;
|
||||||
|
|
||||||
@@ -56,10 +56,6 @@ public class CrossoverGAGINPointSegmentwise extends CrossoverGAGINPoint {
|
|||||||
return "GA-GI N-Point segment-wise crossover";
|
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() {
|
public int getSegmentLength() {
|
||||||
return segmentLength;
|
return segmentLength;
|
||||||
}
|
}
|
||||||
|
@@ -6,16 +6,14 @@ import eva2.optimization.individuals.InterfaceGAIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
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 {
|
public class CrossoverGAUniform implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -122,9 +120,6 @@ public class CrossoverGAUniform implements InterfaceCrossover, java.io.Serializa
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -134,13 +129,4 @@ public class CrossoverGAUniform implements InterfaceCrossover, java.io.Serializa
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "GA uniform crossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -5,10 +5,12 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* One-point crossover on integer individuals.
|
* 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 {
|
public class CrossoverGIDefault implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -124,9 +126,6 @@ public class CrossoverGIDefault implements InterfaceCrossover, java.io.Serializa
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -136,13 +135,4 @@ public class CrossoverGIDefault implements InterfaceCrossover, java.io.Serializa
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "GI discrete one-point crossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -5,14 +5,12 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
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 {
|
public class CrossoverGINPoint implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
private int numberOfCrossovers = 3;
|
private int numberOfCrossovers = 3;
|
||||||
@@ -135,9 +133,6 @@ public class CrossoverGINPoint implements InterfaceCrossover, java.io.Serializab
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -148,15 +143,6 @@ public class CrossoverGINPoint implements InterfaceCrossover, java.io.Serializab
|
|||||||
return "GI N-Point Crossover";
|
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
|
* This method allows you to set the number of crossovers that occur in the
|
||||||
* genotype.
|
* genotype.
|
||||||
|
@@ -5,16 +5,14 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
import eva2.tools.math.RNG;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.BitSet;
|
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 {
|
public class CrossoverGINPointVL implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
private int numberOfCrossovers = 3;
|
private int numberOfCrossovers = 3;
|
||||||
@@ -190,9 +188,6 @@ public class CrossoverGINPointVL implements InterfaceCrossover, java.io.Serializ
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -203,15 +198,6 @@ public class CrossoverGINPointVL implements InterfaceCrossover, java.io.Serializ
|
|||||||
return "GI var. length N-Point Crossover";
|
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
|
* This method allows you to set the number of crossovers that occur in the
|
||||||
* genotype.
|
* genotype.
|
||||||
|
@@ -6,14 +6,12 @@ import eva2.optimization.individuals.InterfaceGIIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
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 {
|
public class CrossoverGIUniform implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
@@ -121,9 +119,6 @@ public class CrossoverGIUniform implements InterfaceCrossover, java.io.Serializa
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -133,13 +128,4 @@ public class CrossoverGIUniform implements InterfaceCrossover, java.io.Serializa
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "GI uniform crossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -8,9 +8,11 @@ import eva2.optimization.individuals.codings.gp.AbstractGPNode;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
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 {
|
public class CrossoverGPDefault implements InterfaceCrossover, java.io.Serializable {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -141,9 +143,6 @@ public class CrossoverGPDefault implements InterfaceCrossover, java.io.Serializa
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -153,13 +152,4 @@ public class CrossoverGPDefault implements InterfaceCrossover, java.io.Serializa
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "GP default crossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -5,17 +5,11 @@ import eva2.optimization.individuals.InterfaceOBGAIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
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 class CrossoverOBGAPMX implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
public CrossoverOBGAPMX() {
|
public CrossoverOBGAPMX() {
|
||||||
@@ -111,9 +105,6 @@ public class CrossoverOBGAPMX implements InterfaceCrossover, java.io.Serializabl
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -123,14 +114,4 @@ public class CrossoverOBGAPMX implements InterfaceCrossover, java.io.Serializabl
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "OBGA PMX crossover";
|
return "OBGA PMX crossover";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "The infamous PMX crossover for Permutations.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -5,17 +5,11 @@ import eva2.optimization.individuals.InterfaceOBGAIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.tools.math.RNG;
|
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 class CrossoverOBGAPMXUniform implements InterfaceCrossover, java.io.Serializable {
|
||||||
|
|
||||||
public CrossoverOBGAPMXUniform() {
|
public CrossoverOBGAPMXUniform() {
|
||||||
@@ -108,9 +102,6 @@ public class CrossoverOBGAPMXUniform implements InterfaceCrossover, java.io.Seri
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -121,13 +112,4 @@ public class CrossoverOBGAPMXUniform implements InterfaceCrossover, java.io.Seri
|
|||||||
return "OBGA PMX uniform crossover";
|
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.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -3,10 +3,12 @@ package eva2.optimization.operator.crossover;
|
|||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
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 {
|
public class NoCrossover implements InterfaceCrossover, java.io.Serializable {
|
||||||
private InterfaceOptimizationProblem optimizationProblem;
|
private InterfaceOptimizationProblem optimizationProblem;
|
||||||
|
|
||||||
@@ -79,9 +81,6 @@ public class NoCrossover implements InterfaceCrossover, java.io.Serializable {
|
|||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -91,13 +90,4 @@ public class NoCrossover implements InterfaceCrossover, java.io.Serializable {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "Nocrossover";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -10,10 +10,9 @@ import java.io.Serializable;
|
|||||||
* The Euclidean metric just measures the Euclidean distance based on the default double representation
|
* The Euclidean metric just measures the Euclidean distance based on the default double representation
|
||||||
* as given by AbstractEAIndividual.getDoublePosition(AbstractEAIndividual).
|
* as given by AbstractEAIndividual.getDoublePosition(AbstractEAIndividual).
|
||||||
*
|
*
|
||||||
* @author mkron
|
|
||||||
* @see AbstractEAIndividual#getDoublePosition(AbstractEAIndividual)
|
* @see AbstractEAIndividual#getDoublePosition(AbstractEAIndividual)
|
||||||
*/
|
*/
|
||||||
@Description("Set to true to norm the distance by the double range - only possible with InterfaceDataTypeDouble individuals.")
|
@Description("The euclidean metric calculates euclidean distances for individuals which have a real valued interpretation.")
|
||||||
public class EuclideanMetric implements InterfaceDistanceMetric, Serializable {
|
public class EuclideanMetric implements InterfaceDistanceMetric, Serializable {
|
||||||
private boolean normedByDblRange = false;
|
private boolean normedByDblRange = false;
|
||||||
|
|
||||||
@@ -89,15 +88,6 @@ public class EuclideanMetric implements InterfaceDistanceMetric, Serializable {
|
|||||||
return Math.sqrt(result);
|
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
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@@ -4,11 +4,13 @@ import eva2.optimization.operator.selection.InterfaceSelection;
|
|||||||
import eva2.optimization.operator.selection.SelectMOMaxiMin;
|
import eva2.optimization.operator.selection.SelectMOMaxiMin;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.optimization.strategies.InterfaceOptimizer;
|
import eva2.optimization.strategies.InterfaceOptimizer;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Migration based on a Multi-criterial selection mechanism
|
* Migration based on a Multi-criterial selection mechanism
|
||||||
* migrating the n best individuals between all populations.
|
* migrating the n best individuals between all populations.
|
||||||
*/
|
*/
|
||||||
|
@Description("This is multi-objective migration scheme.")
|
||||||
public class MOBestMigration implements InterfaceMigration, java.io.Serializable {
|
public class MOBestMigration implements InterfaceMigration, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceSelection selection = new SelectMOMaxiMin();
|
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
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@@ -15,16 +15,18 @@ import eva2.optimization.strategies.InterfaceOptimizer;
|
|||||||
import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
||||||
import eva2.tools.chart2d.Chart2DDPointIconText;
|
import eva2.tools.chart2d.Chart2DDPointIconText;
|
||||||
import eva2.tools.chart2d.DPoint;
|
import eva2.tools.chart2d.DPoint;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method implements the clustering based subdivision
|
* 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
|
* impose area constraints on the subpopulations. This method
|
||||||
* is suited for K-means only.
|
* 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 class MOClusteringSeparation implements InterfaceMigration, java.io.Serializable {
|
||||||
|
|
||||||
public boolean debug = false;
|
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
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@@ -18,15 +18,17 @@ import eva2.optimization.strategies.InterfaceOptimizer;
|
|||||||
import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
||||||
import eva2.tools.chart2d.Chart2DDPointIconText;
|
import eva2.tools.chart2d.Chart2DDPointIconText;
|
||||||
import eva2.tools.chart2d.DPoint;
|
import eva2.tools.chart2d.DPoint;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method implements the cone separation subdivision
|
* 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.
|
* 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 class MOConeSeparation implements InterfaceMigration, java.io.Serializable {
|
||||||
|
|
||||||
public boolean debug = false;
|
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
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@@ -16,6 +16,7 @@ import eva2.optimization.strategies.InterfaceOptimizer;
|
|||||||
import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
||||||
import eva2.tools.chart2d.Chart2DDPointIconText;
|
import eva2.tools.chart2d.Chart2DDPointIconText;
|
||||||
import eva2.tools.chart2d.DPoint;
|
import eva2.tools.chart2d.DPoint;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -25,6 +26,7 @@ import java.io.IOException;
|
|||||||
* scheme suited to identify uni- and multi-modal search spaces
|
* scheme suited to identify uni- and multi-modal search spaces
|
||||||
* under development and currently defunct.
|
* 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 class MOXMeansSeparation implements InterfaceMigration, java.io.Serializable {
|
||||||
|
|
||||||
public boolean debug = false;
|
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
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@@ -5,10 +5,12 @@ import eva2.optimization.operator.selection.InterfaceSelection;
|
|||||||
import eva2.optimization.operator.selection.SelectBestIndividuals;
|
import eva2.optimization.operator.selection.SelectBestIndividuals;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.optimization.strategies.InterfaceOptimizer;
|
import eva2.optimization.strategies.InterfaceOptimizer;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple single-objective migration scheme.
|
* Simple single-objective migration scheme.
|
||||||
*/
|
*/
|
||||||
|
@Description("This is a single-objective migration scheme.")
|
||||||
public class SOBestMigration implements InterfaceMigration, java.io.Serializable {
|
public class SOBestMigration implements InterfaceMigration, java.io.Serializable {
|
||||||
|
|
||||||
private InterfaceSelection selection = new SelectBestIndividuals();
|
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
|
* The migrate method can be called asynchronously or
|
||||||
* sychronously. Basically it allows migration of individuals
|
* synchronously. Basically it allows migration of individuals
|
||||||
* between multiple EA islands and since there are so many
|
* between multiple EA islands and since there are so many
|
||||||
* different possible strategies i've introduced this
|
* 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
|
* Note: Since i use the RMIRemoteThreadProxy everything done
|
||||||
* to the islands will use the serialization method, so if
|
* to the islands will use the serialization method, so if
|
||||||
* you call getPopulation() on an island it is not a reference
|
* 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]);
|
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
|
* This method will return a naming String
|
||||||
|
@@ -1,10 +1,12 @@
|
|||||||
package eva2.optimization.operator.migration;
|
package eva2.optimization.operator.migration;
|
||||||
|
|
||||||
import eva2.optimization.strategies.InterfaceOptimizer;
|
import eva2.optimization.strategies.InterfaceOptimizer;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements no migration as reference.
|
* 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 {
|
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
|
* This method will return a naming String
|
||||||
*
|
*
|
||||||
|
@@ -2,10 +2,12 @@ package eva2.optimization.operator.moso;
|
|||||||
|
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
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 {
|
public class MOSODynamicallyWeightedFitness implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
private double f = 50;
|
private double f = 50;
|
||||||
@@ -92,9 +94,6 @@ public class MOSODynamicallyWeightedFitness implements InterfaceMOSOConverter, j
|
|||||||
return this.getName() + "\n";
|
return this.getName() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -106,15 +105,6 @@ public class MOSODynamicallyWeightedFitness implements InterfaceMOSOConverter, j
|
|||||||
return "Dynamic Weighted Sum";
|
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.
|
* This method allows you to choose the frequency for the change of the weights.
|
||||||
*
|
*
|
||||||
|
@@ -3,14 +3,12 @@ package eva2.optimization.operator.moso;
|
|||||||
import eva2.gui.PropertyEpsilonConstraint;
|
import eva2.gui.PropertyEpsilonConstraint;
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
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 {
|
public class MOSOEpsilonConstraint implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
private PropertyEpsilonConstraint epsilonConstraint = null;
|
private PropertyEpsilonConstraint epsilonConstraint = null;
|
||||||
@@ -107,10 +105,6 @@ public class MOSOEpsilonConstraint implements InterfaceMOSOConverter, java.io.Se
|
|||||||
return this.getName() + "\n";
|
return this.getName() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -122,15 +116,6 @@ public class MOSOEpsilonConstraint implements InterfaceMOSOConverter, java.io.Se
|
|||||||
return "Epsilon Constraint";
|
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
|
* This method allows you to choose the EpsilonThreshold
|
||||||
*
|
*
|
||||||
|
@@ -3,10 +3,12 @@ package eva2.optimization.operator.moso;
|
|||||||
import eva2.gui.PropertyEpsilonThreshold;
|
import eva2.gui.PropertyEpsilonThreshold;
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
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 {
|
public class MOSOEpsilonThreshold implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
private PropertyEpsilonThreshold epsilonThreshold = null;
|
private PropertyEpsilonThreshold epsilonThreshold = null;
|
||||||
@@ -135,10 +137,6 @@ public class MOSOEpsilonThreshold implements InterfaceMOSOConverter, java.io.Ser
|
|||||||
return this.getName() + "\n";
|
return this.getName() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -150,15 +148,6 @@ public class MOSOEpsilonThreshold implements InterfaceMOSOConverter, java.io.Ser
|
|||||||
return "Epsilon Threshold";
|
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
|
* This method allows you to choose the EpsilonThreshold
|
||||||
*
|
*
|
||||||
|
@@ -3,10 +3,12 @@ package eva2.optimization.operator.moso;
|
|||||||
import eva2.gui.PropertyDoubleArray;
|
import eva2.gui.PropertyDoubleArray;
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
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 {
|
public class MOSOGoalProgramming implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
private PropertyDoubleArray goals = null;
|
private PropertyDoubleArray goals = null;
|
||||||
@@ -96,10 +98,6 @@ public class MOSOGoalProgramming implements InterfaceMOSOConverter, java.io.Seri
|
|||||||
return this.getName() + "\n";
|
return this.getName() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -111,15 +109,6 @@ public class MOSOGoalProgramming implements InterfaceMOSOConverter, java.io.Seri
|
|||||||
return "Goal Programming";
|
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
|
* This method allows you to choose the goals for goal programming
|
||||||
*
|
*
|
||||||
|
@@ -3,10 +3,12 @@ package eva2.optimization.operator.moso;
|
|||||||
import eva2.gui.PropertyDoubleArray;
|
import eva2.gui.PropertyDoubleArray;
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
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 {
|
public class MOSOLpMetric implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
private PropertyDoubleArray reference = null;
|
private PropertyDoubleArray reference = null;
|
||||||
@@ -119,9 +121,6 @@ public class MOSOLpMetric implements InterfaceMOSOConverter, java.io.Serializabl
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -133,15 +132,6 @@ public class MOSOLpMetric implements InterfaceMOSOConverter, java.io.Serializabl
|
|||||||
return "Lp Metric";
|
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
|
* This method allows you to choose the reference for the Lp Metric
|
||||||
*
|
*
|
||||||
|
@@ -2,14 +2,11 @@ package eva2.optimization.operator.moso;
|
|||||||
|
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
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 class MOSOMOGARankBased implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
public MOSOMOGARankBased() {
|
public MOSOMOGARankBased() {
|
||||||
@@ -93,10 +90,6 @@ public class MOSOMOGARankBased implements InterfaceMOSOConverter, java.io.Serial
|
|||||||
return this.getName() + "\n";
|
return this.getName() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -107,13 +100,4 @@ public class MOSOMOGARankBased implements InterfaceMOSOConverter, java.io.Serial
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "MOGA Rank Based";
|
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].";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -3,10 +3,12 @@ package eva2.optimization.operator.moso;
|
|||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.tools.math.RNG;
|
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 {
|
public class MOSOMaxiMin implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
private int outputDimension = 2;
|
private int outputDimension = 2;
|
||||||
@@ -118,13 +120,4 @@ public class MOSOMaxiMin implements InterfaceMOSOConverter, java.io.Serializable
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "MaxiMin Criterium";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -2,14 +2,12 @@ package eva2.optimization.operator.moso;
|
|||||||
|
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
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 class MOSONoConvert implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
public MOSONoConvert() {
|
public MOSONoConvert() {
|
||||||
@@ -50,8 +48,6 @@ public class MOSONoConvert implements InterfaceMOSOConverter, java.io.Serializab
|
|||||||
|
|
||||||
tmpFit = indy.getFitness();
|
tmpFit = indy.getFitness();
|
||||||
indy.putData("MOFitness", tmpFit);
|
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";
|
return this.getName() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -90,14 +82,4 @@ public class MOSONoConvert implements InterfaceMOSOConverter, java.io.Serializab
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "No Convert";
|
return "No Convert";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns a global info string
|
|
||||||
*
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "This method leaves everything the same.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -3,10 +3,12 @@ package eva2.optimization.operator.moso;
|
|||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.tools.math.RNG;
|
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 {
|
public class MOSORandomChoice implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
private int outputDimension = 2;
|
private int outputDimension = 2;
|
||||||
@@ -79,10 +81,6 @@ public class MOSORandomChoice implements InterfaceMOSOConverter, java.io.Seriali
|
|||||||
return this.getName() + "\n";
|
return this.getName() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -93,13 +91,4 @@ public class MOSORandomChoice implements InterfaceMOSOConverter, java.io.Seriali
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "Random Choice";
|
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].";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -3,14 +3,11 @@ package eva2.optimization.operator.moso;
|
|||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.tools.math.RNG;
|
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 class MOSORandomWeight implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
public MOSORandomWeight() {
|
public MOSORandomWeight() {
|
||||||
@@ -95,10 +92,6 @@ public class MOSORandomWeight implements InterfaceMOSOConverter, java.io.Seriali
|
|||||||
return this.getName() + "\n";
|
return this.getName() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -109,13 +102,4 @@ public class MOSORandomWeight implements InterfaceMOSOConverter, java.io.Seriali
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "Randomly Weighted Sum";
|
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].";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -3,14 +3,11 @@ package eva2.optimization.operator.moso;
|
|||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.operator.archiving.ArchivingNSGAII;
|
import eva2.optimization.operator.archiving.ArchivingNSGAII;
|
||||||
import eva2.optimization.population.Population;
|
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 class MOSORankbased implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
public MOSORankbased() {
|
public MOSORankbased() {
|
||||||
@@ -80,10 +77,6 @@ public class MOSORankbased implements InterfaceMOSOConverter, java.io.Serializab
|
|||||||
return this.getName() + "\n";
|
return this.getName() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -94,13 +87,4 @@ public class MOSORankbased implements InterfaceMOSOConverter, java.io.Serializab
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "Rank Based";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -3,10 +3,12 @@ package eva2.optimization.operator.moso;
|
|||||||
|
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
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 {
|
public class MOSOUtilityFunction implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
private int outputDimension = 2;
|
private int outputDimension = 2;
|
||||||
@@ -98,14 +100,4 @@ public class MOSOUtilityFunction implements InterfaceMOSOConverter, java.io.Seri
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "Utility Function";
|
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.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -3,10 +3,12 @@ package eva2.optimization.operator.moso;
|
|||||||
import eva2.gui.PropertyDoubleArray;
|
import eva2.gui.PropertyDoubleArray;
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
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 {
|
public class MOSOWeightedFitness implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
private PropertyDoubleArray weights = null;
|
private PropertyDoubleArray weights = null;
|
||||||
@@ -114,10 +116,6 @@ public class MOSOWeightedFitness implements InterfaceMOSOConverter, java.io.Seri
|
|||||||
return this.getName() + "\n";
|
return this.getName() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -129,15 +127,6 @@ public class MOSOWeightedFitness implements InterfaceMOSOConverter, java.io.Seri
|
|||||||
return "Weighted Sum";
|
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
|
* This method allows you to choose the weights for the weighted
|
||||||
* fitness sum.
|
* fitness sum.
|
||||||
|
@@ -3,10 +3,12 @@ package eva2.optimization.operator.moso;
|
|||||||
import eva2.gui.PropertyWeightedLPTchebycheff;
|
import eva2.gui.PropertyWeightedLPTchebycheff;
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.population.Population;
|
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 {
|
public class MOSOWeightedLPTchebycheff implements InterfaceMOSOConverter, java.io.Serializable {
|
||||||
|
|
||||||
private PropertyWeightedLPTchebycheff weightedLPTchebycheff = null;
|
private PropertyWeightedLPTchebycheff weightedLPTchebycheff = null;
|
||||||
@@ -133,10 +135,6 @@ public class MOSOWeightedLPTchebycheff implements InterfaceMOSOConverter, java.i
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -148,15 +146,6 @@ public class MOSOWeightedLPTchebycheff implements InterfaceMOSOConverter, java.i
|
|||||||
return "Lp/Tchebycheff";
|
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
|
* This method allows you to choose the EpsilonThreshold
|
||||||
*
|
*
|
||||||
|
@@ -2,6 +2,7 @@ package eva2.optimization.operator.nichepso.absorption;
|
|||||||
|
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Particles are absorbed into a subswarm when they move into an area
|
* 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),
|
* In Proceedings of the 4th Asia-Pacific Conference on Simulated Evolution and Learning (SEAL'02),
|
||||||
* 2002, 2, 692-696
|
* 2002, 2, 692-696
|
||||||
*/
|
*/
|
||||||
|
@Description("Strategy to absorb main swarm particles into a subswarm")
|
||||||
public class StandardAbsorptionStrategy implements InterfaceAbsorptionStrategy, java.io.Serializable {
|
public class StandardAbsorptionStrategy implements InterfaceAbsorptionStrategy, java.io.Serializable {
|
||||||
|
|
||||||
/**
|
|
||||||
* *******************************************************************************************************************
|
|
||||||
* ctors, initialize, clone
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Object clone() {
|
public Object clone() {
|
||||||
return new StandardAbsorptionStrategy();
|
return new StandardAbsorptionStrategy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String globalInfo() {
|
|
||||||
return "Strategy to absorb main swarm particles into a subswarm";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* shouldAbsorbParticleIntoSubswarm
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @tested true if
|
* @tested true if
|
||||||
* the subswarm is active and
|
* the subswarm is active and
|
||||||
|
@@ -5,6 +5,7 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.optimization.strategies.NichePSO;
|
import eva2.optimization.strategies.NichePSO;
|
||||||
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
||||||
import eva2.tools.EVAERROR;
|
import eva2.tools.EVAERROR;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Vector;
|
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
|
* over the last 3 iterations is less or equal a given threshold epsilon
|
||||||
* Experiments showed good results using epsilon = 0.0001.
|
* Experiments showed good results using epsilon = 0.0001.
|
||||||
*/
|
*/
|
||||||
|
@Description("Strategy to deactivate subswarms")
|
||||||
public class ImprovementDeactivationStrategy implements InterfaceDeactivationStrategy, java.io.Serializable {
|
public class ImprovementDeactivationStrategy implements InterfaceDeactivationStrategy, java.io.Serializable {
|
||||||
|
|
||||||
private double epsilon = 0.0001;
|
private double epsilon = 0.0001;
|
||||||
@@ -46,18 +48,7 @@ public class ImprovementDeactivationStrategy implements InterfaceDeactivationStr
|
|||||||
return new ImprovementDeactivationStrategy(this);
|
return new ImprovementDeactivationStrategy(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String globalInfo() {
|
|
||||||
return "Strategy to deactivate subswarms";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* *******************************************************************************************************************
|
|
||||||
* shouldDeactivateSubswarm
|
|
||||||
*/
|
|
||||||
|
|
||||||
public boolean isConverged(Population pop) {
|
public boolean isConverged(Population pop) {
|
||||||
// Vector<AbstractEAIndividual> bests = new Vector<AbstractEAIndividual>(pop.size());
|
|
||||||
|
|
||||||
Vector<Double> bests = (Vector<Double>) pop.getEAIndividual(0).getData(NichePSO.fitArchiveKey);
|
Vector<Double> bests = (Vector<Double>) pop.getEAIndividual(0).getData(NichePSO.fitArchiveKey);
|
||||||
if (bests.size() < haltingWindow) {
|
if (bests.size() < haltingWindow) {
|
||||||
return false;
|
return false;
|
||||||
|
@@ -5,6 +5,7 @@ import eva2.optimization.population.Population;
|
|||||||
import eva2.optimization.strategies.NichePSO;
|
import eva2.optimization.strategies.NichePSO;
|
||||||
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
||||||
import eva2.tools.EVAERROR;
|
import eva2.tools.EVAERROR;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.Vector;
|
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
|
* over the last 3 iterations is less or equal a given threshold epsilon
|
||||||
* Experiments showed good results using epsilon = 0.0001.
|
* Experiments showed good results using epsilon = 0.0001.
|
||||||
*/
|
*/
|
||||||
|
@Description("Strategy to deactivate subswarms")
|
||||||
public class StandardDeactivationStrategy implements InterfaceDeactivationStrategy, java.io.Serializable {
|
public class StandardDeactivationStrategy implements InterfaceDeactivationStrategy, java.io.Serializable {
|
||||||
|
|
||||||
private double epsilon = 0.0001;
|
private double epsilon = 0.0001;
|
||||||
@@ -46,28 +48,11 @@ public class StandardDeactivationStrategy implements InterfaceDeactivationStrate
|
|||||||
return new StandardDeactivationStrategy(this);
|
return new StandardDeactivationStrategy(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String globalInfo() {
|
|
||||||
return "Strategy to deactivate subswarms";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* shouldDeactivateSubswarm
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* @param pop
|
* @param pop
|
||||||
* @return
|
* @return
|
||||||
* @tested
|
* @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) {
|
public boolean areAllConverged(Population pop) {
|
||||||
for (int i = 0; i < pop.size(); ++i) {
|
for (int i = 0; i < pop.size(); ++i) {
|
||||||
AbstractEAIndividual currentindy = pop.getEAIndividual(i);
|
AbstractEAIndividual currentindy = pop.getEAIndividual(i);
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
package eva2.optimization.operator.nichepso.merging;
|
package eva2.optimization.operator.nichepso.merging;
|
||||||
|
|
||||||
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ import java.util.Vector;
|
|||||||
* In IEEE Congress on Evolutionary Computation,
|
* In IEEE Congress on Evolutionary Computation,
|
||||||
* 2007.
|
* 2007.
|
||||||
*/
|
*/
|
||||||
|
@Description("Strategy to merge subswarms")
|
||||||
public class ScatterMergingStrategy extends StandardMergingStrategy {
|
public class ScatterMergingStrategy extends StandardMergingStrategy {
|
||||||
|
|
||||||
public ScatterMergingStrategy() {
|
public ScatterMergingStrategy() {
|
||||||
@@ -26,15 +28,6 @@ public class ScatterMergingStrategy extends StandardMergingStrategy {
|
|||||||
super(theMu);
|
super(theMu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String globalInfo() {
|
|
||||||
return "Strategy to merge subswarms";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* mergeSubswarms
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param i
|
* @param i
|
||||||
* @param j
|
* @param j
|
||||||
|
@@ -5,6 +5,7 @@ import eva2.optimization.individuals.InterfaceESIndividual;
|
|||||||
import eva2.optimization.operator.distancemetric.EuclideanMetric;
|
import eva2.optimization.operator.distancemetric.EuclideanMetric;
|
||||||
import eva2.optimization.operator.distancemetric.PhenotypeMetric;
|
import eva2.optimization.operator.distancemetric.PhenotypeMetric;
|
||||||
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.Vector;
|
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),
|
* In Proceedings of the 4th Asia-Pacific Conference on Simulated Evolution and Learning (SEAL'02),
|
||||||
* 2002, 2, 692-696
|
* 2002, 2, 692-696
|
||||||
*/
|
*/
|
||||||
|
@Description("Strategy to merge subswarms")
|
||||||
public class StandardMergingStrategy implements InterfaceMergingStrategy, java.io.Serializable {
|
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.
|
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() {
|
public StandardMergingStrategy() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -46,9 +40,6 @@ public class StandardMergingStrategy implements InterfaceMergingStrategy, java.i
|
|||||||
return new StandardMergingStrategy(this);
|
return new StandardMergingStrategy(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* shouldMergeSubswarms
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* @tested the subswarms are merged, if they overlap (or are very close) and if they are of equal state
|
* @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)
|
* (non-Javadoc) @see javaeva.server.oa.go.Operators.NichePSO.InterfaceMergingStrategie#shouldMergeSubswarms(javaeva.server.oa.go.Strategies.ParticleSubSwarmOptimization, javaeva.server.oa.go.Strategies.ParticleSubSwarmOptimization)
|
||||||
|
@@ -4,6 +4,7 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.optimization.strategies.NichePSO;
|
import eva2.optimization.strategies.NichePSO;
|
||||||
import eva2.optimization.strategies.ParticleSubSwarmOptimization;
|
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.
|
* 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),
|
* In Proceedings of the 4th Asia-Pacific Conference on Simulated Evolution and Learning (SEAL'02),
|
||||||
* 2002, 2, 692-696
|
* 2002, 2, 692-696
|
||||||
*/
|
*/
|
||||||
|
@Description("Strategy to create subswarms from the main swarm")
|
||||||
public class StandardSubswarmCreationStrategy implements InterfaceSubswarmCreationStrategy, java.io.Serializable {
|
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.
|
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);
|
return new StandardSubswarmCreationStrategy(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String globalInfo() {
|
|
||||||
return "Strategy to create subswarms from the main swarm";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* shouldCreateSubswarm
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* @param indy main swarm particle
|
* @param indy main swarm particle
|
||||||
* @return
|
* @return
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
package eva2.optimization.operator.paramcontrol;
|
package eva2.optimization.operator.paramcontrol;
|
||||||
|
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dummy implementation. This class is ignored by the Processor. Parameters will not be changed.
|
* 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 class ConstantParameters extends AbstractParameterControl implements Serializable {
|
||||||
public ConstantParameters() {
|
public ConstantParameters() {
|
||||||
}
|
}
|
||||||
@@ -35,8 +35,4 @@ public class ConstantParameters extends AbstractParameterControl implements Seri
|
|||||||
@Override
|
@Override
|
||||||
public void updateParameters(Object obj) {
|
public void updateParameters(Object obj) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Parameters will not be changed.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@ import eva2.optimization.individuals.InterfaceDataTypeDouble;
|
|||||||
import eva2.optimization.operator.constraint.AbstractConstraint;
|
import eva2.optimization.operator.constraint.AbstractConstraint;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.tools.math.Mathematics;
|
import eva2.tools.math.Mathematics;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.LinkedList;
|
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.
|
* 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
|
* 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.
|
* 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.
|
* 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 {
|
public class ConstraintBasedAdaption implements ParamAdaption, Serializable {
|
||||||
private double betaInc = 1.5;
|
private double betaInc = 1.5;
|
||||||
private double betaDec = 0.7;
|
private double betaDec = 0.7;
|
||||||
@@ -139,10 +139,6 @@ public class ConstraintBasedAdaption implements ParamAdaption, Serializable {
|
|||||||
return "The number of generations regarded.";
|
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
|
@Override
|
||||||
public void finish(Object obj, Population pop) {
|
public void finish(Object obj, Population pop) {
|
||||||
lastBestSatisfactionState.clear();
|
lastBestSatisfactionState.clear();
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
package eva2.optimization.operator.paramcontrol;
|
package eva2.optimization.operator.paramcontrol;
|
||||||
|
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adapt a generic parameter using exponential decay.
|
* Adapt a generic parameter using exponential decay.
|
||||||
*
|
|
||||||
* @author mkron
|
|
||||||
*/
|
*/
|
||||||
|
@Description("Exponential decay with a percental halving time.")
|
||||||
public class ExponentialDecayAdaption implements ParamAdaption, GenericParamAdaption, Serializable {
|
public class ExponentialDecayAdaption implements ParamAdaption, GenericParamAdaption, Serializable {
|
||||||
private double startValue = 0.2, halvingTimePerCent = 50;
|
private double startValue = 0.2, halvingTimePerCent = 50;
|
||||||
private double saturation = 0.;
|
private double saturation = 0.;
|
||||||
@@ -85,10 +85,6 @@ public class ExponentialDecayAdaption implements ParamAdaption, GenericParamAdap
|
|||||||
return "Exp. adapt. " + target + " (" + startValue + "/" + halvingTimePerCent + ")";
|
return "Exp. adapt. " + target + " (" + startValue + "/" + halvingTimePerCent + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Exponential decay with a percentual halving time.";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void finish(Object obj, Population pop) {
|
public void finish(Object obj, Population pop) {
|
||||||
}
|
}
|
||||||
|
@@ -1,13 +1,14 @@
|
|||||||
package eva2.optimization.operator.paramcontrol;
|
package eva2.optimization.operator.paramcontrol;
|
||||||
|
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Linearly adapt a specific target String parameter.
|
* Linearly adapt a specific target String parameter.
|
||||||
*
|
|
||||||
* @author mkron
|
|
||||||
*/
|
*/
|
||||||
|
@Description("Simple linear parameter adaption.")
|
||||||
public class LinearParamAdaption extends AbstractLinearParamAdaption
|
public class LinearParamAdaption extends AbstractLinearParamAdaption
|
||||||
implements InterfaceHasUpperDoubleBound, GenericParamAdaption, Serializable {
|
implements InterfaceHasUpperDoubleBound, GenericParamAdaption, Serializable {
|
||||||
String target = "undefinedParameter";
|
String target = "undefinedParameter";
|
||||||
@@ -42,10 +43,6 @@ public class LinearParamAdaption extends AbstractLinearParamAdaption
|
|||||||
this.target = target;
|
this.target = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Simple linear parameter adaption.";
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] customPropertyOrder() {
|
public String[] customPropertyOrder() {
|
||||||
return new String[]{"startV", "endV"};
|
return new String[]{"startV", "endV"};
|
||||||
}
|
}
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
package eva2.optimization.operator.paramcontrol;
|
package eva2.optimization.operator.paramcontrol;
|
||||||
|
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A dummy implementation which does not do any adaption.
|
* 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 {
|
public class NoParamAdaption implements ParamAdaption, Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -26,10 +26,6 @@ public class NoParamAdaption implements ParamAdaption, Serializable {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "A dummy implementation which will not change parameters.";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void finish(Object obj, Population pop) {
|
public void finish(Object obj, Population pop) {
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,7 @@ package eva2.optimization.operator.paramcontrol;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.optimization.strategies.ParticleSwarmOptimization;
|
import eva2.optimization.strategies.ParticleSwarmOptimization;
|
||||||
import eva2.tools.math.Mathematics;
|
import eva2.tools.math.Mathematics;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
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
|
* 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.
|
* 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.
|
* 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 {
|
public class PSOActivityFeedbackControl implements ParamAdaption, Serializable {
|
||||||
private double minInert = 0.5;
|
private double minInert = 0.5;
|
||||||
private double maxInert = 1;
|
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.";
|
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
|
@Override
|
||||||
public void finish(Object obj, Population pop) {
|
public void finish(Object obj, Population pop) {
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
package eva2.optimization.operator.paramcontrol;
|
package eva2.optimization.operator.paramcontrol;
|
||||||
|
|
||||||
import eva2.gui.editor.GenericObjectEditor;
|
import eva2.gui.editor.GenericObjectEditor;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
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,
|
* 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
|
* where the second parameter (endV) is interpreted as halfing time in percent of the
|
||||||
* full run.
|
* full run.
|
||||||
*
|
|
||||||
* @author mkron
|
|
||||||
*/
|
*/
|
||||||
|
@Description("Adapt the inertnessOrChi value of PSO.")
|
||||||
public class PSOInertnessAdaption extends LinearParamAdaption implements Serializable {
|
public class PSOInertnessAdaption extends LinearParamAdaption implements Serializable {
|
||||||
|
|
||||||
public PSOInertnessAdaption() {
|
public PSOInertnessAdaption() {
|
||||||
@@ -31,8 +31,4 @@ public class PSOInertnessAdaption extends LinearParamAdaption implements Seriali
|
|||||||
public String endVTipText() {
|
public String endVTipText() {
|
||||||
return "End value for the inertness";
|
return "End value for the inertness";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String globalInfo() {
|
|
||||||
return "Adapt the inertnessOrChi value of PSO.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@ import eva2.gui.BeanInspector;
|
|||||||
import eva2.optimization.modules.Processor;
|
import eva2.optimization.modules.Processor;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.tools.Pair;
|
import eva2.tools.Pair;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
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
|
* one fewer window layer) but there must be an additional method getParamControl implemented
|
||||||
* which returns the ParameterControlManager to make it available to the Processor.
|
* which returns the ParameterControlManager to make it available to the Processor.
|
||||||
*
|
*
|
||||||
* @author mkron
|
|
||||||
* @see ParamAdaption
|
* @see ParamAdaption
|
||||||
* @see Processor
|
* @see Processor
|
||||||
* @see AbstractParameterControl
|
* @see AbstractParameterControl
|
||||||
*/
|
*/
|
||||||
|
@Description("Define a list of dynamically adapted parameters.")
|
||||||
public class ParameterControlManager implements InterfaceParameterControl, Serializable {
|
public class ParameterControlManager implements InterfaceParameterControl, Serializable {
|
||||||
public Object[] initialValues = null;
|
public Object[] initialValues = null;
|
||||||
private ParamAdaption[] singleAdapters = new ParamAdaption[]{};
|
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() {
|
public String getName() {
|
||||||
return "ParameterControlManager";
|
return "ParameterControlManager";
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@ package eva2.optimization.operator.paramcontrol;
|
|||||||
//
|
//
|
||||||
//import java.io.Serializable;
|
//import java.io.Serializable;
|
||||||
//
|
//
|
||||||
|
//import eva2.util.annotation.Description;
|
||||||
//import eva2.tools.Mathematics;
|
//import eva2.tools.Mathematics;
|
||||||
//
|
//
|
||||||
///**
|
///**
|
||||||
@@ -15,6 +16,7 @@ package eva2.optimization.operator.paramcontrol;
|
|||||||
// * @author mkron
|
// * @author mkron
|
||||||
// *
|
// *
|
||||||
// */
|
// */
|
||||||
|
//@Description("A single parameter may be adapted using linear interpolation or exponential decrease.")
|
||||||
//public class SingleParamAdaption extends AbstractAdaptiveParameters implements Serializable {
|
//public class SingleParamAdaption extends AbstractAdaptiveParameters implements Serializable {
|
||||||
// protected String[] params = null;
|
// protected String[] params = null;
|
||||||
// private double startV;
|
// private double startV;
|
||||||
@@ -87,10 +89,6 @@ package eva2.optimization.operator.paramcontrol;
|
|||||||
// return "Select type of adaption.";
|
// return "Select type of adaption.";
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// public static String globalInfo() {
|
|
||||||
// return "A single parameter may be adapted using linear interpolation or exponential decrease.";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
// @Override
|
||||||
// public double getAdaptionParameter(int controlledIndex, int paramIndex) {
|
// public double getAdaptionParameter(int controlledIndex, int paramIndex) {
|
||||||
// if (paramIndex==0) return startV;
|
// if (paramIndex==0) return startV;
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
package eva2.optimization.operator.paramcontrol;
|
package eva2.optimization.operator.paramcontrol;
|
||||||
|
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.io.Serializable;
|
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
|
* 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,
|
* 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.
|
* 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 {
|
public class SinusoidalParamAdaption implements InterfaceHasUpperDoubleBound, ParamAdaption, GenericParamAdaption, Serializable {
|
||||||
private double upperBnd = 1;
|
private double upperBnd = 1;
|
||||||
private double lowerBnd = 0;
|
private double lowerBnd = 0;
|
||||||
@@ -62,8 +64,6 @@ public class SinusoidalParamAdaption implements InterfaceHasUpperDoubleBound, Pa
|
|||||||
}
|
}
|
||||||
|
|
||||||
res = medVal + (upperBnd - lowerBnd) * 0.5 * Math.sin(t);
|
res = medVal + (upperBnd - lowerBnd) * 0.5 * Math.sin(t);
|
||||||
// System.out.println("In " + this + " at " + iteration + ": " + res);
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,12 +71,6 @@ public class SinusoidalParamAdaption implements InterfaceHasUpperDoubleBound, Pa
|
|||||||
return "SinAdapt(" + getControlledParam() + "_" + lowerBnd + "_" + upperBnd + "_" + iterationPeriod + ((dampening != 1) ? ("_dmp-" + dampening) : "") + ")";
|
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
|
* Calculate sub-linear t as -1+(t+1)^dampeningExp
|
||||||
*
|
*
|
||||||
|
@@ -7,14 +7,16 @@ import eva2.optimization.operator.archiving.ArchivingAllDominating;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
||||||
import eva2.optimization.tools.FileTools;
|
import eva2.optimization.tools.FileTools;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
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
|
* and calculate the distance between the true Pareto front and
|
||||||
* the current solution.
|
* 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 {
|
public class MetricD1ApproxParetoFront implements eva2.optimization.operator.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable {
|
||||||
private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
||||||
private String[] titles;
|
private String[] titles;
|
||||||
@@ -127,9 +129,6 @@ public class MetricD1ApproxParetoFront implements eva2.optimization.operator.par
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -140,15 +139,6 @@ public class MetricD1ApproxParetoFront implements eva2.optimization.operator.par
|
|||||||
return "D1 P";
|
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.
|
* This method allows you to set the path to the data file.
|
||||||
*
|
*
|
||||||
|
@@ -7,14 +7,16 @@ import eva2.optimization.operator.archiving.ArchivingAllDominating;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
||||||
import eva2.optimization.tools.FileTools;
|
import eva2.optimization.tools.FileTools;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
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
|
* and calculate the distance between the current solution and
|
||||||
* the true Pareto front.
|
* 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 {
|
public class MetricD1TrueParetoFront implements eva2.optimization.operator.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable {
|
||||||
|
|
||||||
private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
||||||
@@ -128,9 +130,6 @@ public class MetricD1TrueParetoFront implements eva2.optimization.operator.paret
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -141,15 +140,6 @@ public class MetricD1TrueParetoFront implements eva2.optimization.operator.paret
|
|||||||
return "D1 P*";
|
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.
|
* This method allows you to set the path to the data file.
|
||||||
*
|
*
|
||||||
|
@@ -1,21 +1,21 @@
|
|||||||
package eva2.optimization.operator.paretofrontmetrics;
|
package eva2.optimization.operator.paretofrontmetrics;
|
||||||
|
|
||||||
|
|
||||||
import eva2.gui.PropertyFilePath;
|
import eva2.gui.PropertyFilePath;
|
||||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||||
import eva2.optimization.operator.archiving.ArchivingAllDominating;
|
import eva2.optimization.operator.archiving.ArchivingAllDominating;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
||||||
import eva2.optimization.tools.FileTools;
|
import eva2.optimization.tools.FileTools;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The error ratio metric only suited for small discrete
|
* The error ratio metric only suited for small discrete
|
||||||
* Pareto fronts, since it calculates the intersection between
|
* Pareto fronts, since it calculates the intersection between
|
||||||
* the reference and the current solution.
|
* 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 {
|
public class MetricErrorRatio implements eva2.optimization.operator.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable {
|
||||||
private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
||||||
private double epsilon = 0.0001;
|
private double epsilon = 0.0001;
|
||||||
@@ -135,9 +135,6 @@ public class MetricErrorRatio implements eva2.optimization.operator.paretofrontm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -148,15 +145,6 @@ public class MetricErrorRatio implements eva2.optimization.operator.paretofrontm
|
|||||||
return "Error ratio";
|
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.
|
* This method allows you to set the path to the data file.
|
||||||
*
|
*
|
||||||
|
@@ -7,6 +7,7 @@ import eva2.optimization.operator.archiving.ArchivingAllDominating;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
||||||
import eva2.optimization.tools.FileTools;
|
import eva2.optimization.tools.FileTools;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
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
|
* Maximum Pareto Front Error gives the maximum distance of all minimum distances of each
|
||||||
* element in the current solution to the true Pareto front.
|
* 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 {
|
public class MetricMaximumParetoFrontError implements eva2.optimization.operator.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable {
|
||||||
private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
||||||
private String[] titles;
|
private String[] titles;
|
||||||
@@ -126,9 +128,6 @@ public class MetricMaximumParetoFrontError implements eva2.optimization.operator
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -139,15 +138,6 @@ public class MetricMaximumParetoFrontError implements eva2.optimization.operator
|
|||||||
return "Maximum Pareto Front Error";
|
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.
|
* This method allows you to set the path to the data file.
|
||||||
*
|
*
|
||||||
|
@@ -4,11 +4,13 @@ import eva2.optimization.individuals.AbstractEAIndividual;
|
|||||||
import eva2.optimization.operator.archiving.ArchivingAllDominating;
|
import eva2.optimization.operator.archiving.ArchivingAllDominating;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overall Non-Dom. Vector Generation calculates simply the number of
|
* 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 {
|
public class MetricOverallNonDominatedVectors implements InterfaceParetoFrontMetric, java.io.Serializable {
|
||||||
|
|
||||||
private ArchivingAllDominating dominating = new ArchivingAllDominating();
|
private ArchivingAllDominating dominating = new ArchivingAllDominating();
|
||||||
@@ -57,9 +59,6 @@ public class MetricOverallNonDominatedVectors implements InterfaceParetoFrontMet
|
|||||||
return tmpPop.size();
|
return tmpPop.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -69,13 +68,4 @@ public class MetricOverallNonDominatedVectors implements InterfaceParetoFrontMet
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "Overall Non-Dominated Vectors";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -5,10 +5,12 @@ import eva2.optimization.individuals.ESIndividualDoubleData;
|
|||||||
import eva2.optimization.operator.archiving.ArchivingAllDominating;
|
import eva2.optimization.operator.archiving.ArchivingAllDominating;
|
||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* S-Metric calculates the hyper-volume covered between the current solutions and a reference point.
|
* 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 {
|
public class MetricS implements InterfaceParetoFrontMetric, java.io.Serializable {
|
||||||
|
|
||||||
private double[][] objectiveSpaceRange;
|
private double[][] objectiveSpaceRange;
|
||||||
@@ -200,9 +202,6 @@ public class MetricS implements InterfaceParetoFrontMetric, java.io.Serializable
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -212,13 +211,4 @@ public class MetricS implements InterfaceParetoFrontMetric, java.io.Serializable
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "S-Metric";
|
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.";
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -8,6 +8,7 @@ import eva2.optimization.operator.archiving.ArchivingAllDominating;
|
|||||||
import eva2.optimization.population.Population;
|
import eva2.optimization.population.Population;
|
||||||
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
import eva2.problems.AbstractMultiObjectiveOptimizationProblem;
|
||||||
import eva2.optimization.tools.FileTools;
|
import eva2.optimization.tools.FileTools;
|
||||||
|
import eva2.util.annotation.Description;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
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.
|
* 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.
|
* 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 {
|
public class MetricSWithReference implements InterfaceParetoFrontMetric, java.io.Serializable {
|
||||||
private double[][] objectiveSpaceRange;
|
private double[][] objectiveSpaceRange;
|
||||||
private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
private PropertyFilePath inputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
||||||
@@ -249,9 +251,6 @@ public class MetricSWithReference implements InterfaceParetoFrontMetric, java.io
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
@@ -262,15 +261,6 @@ public class MetricSWithReference implements InterfaceParetoFrontMetric, java.io
|
|||||||
return "S-Metric";
|
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.
|
* This method allows you to set the path to the data file.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user