diff --git a/src/eva2/EvAInfo.java b/src/eva2/EvAInfo.java index 253d2105..9fe4fded 100644 --- a/src/eva2/EvAInfo.java +++ b/src/eva2/EvAInfo.java @@ -4,8 +4,8 @@ package eva2; * Main product and version information strings. * * --- Changelog - * - * Repaired the GenericArrayEditor. + * 2.027: Renamed SetData and SetDataLamarckian from individual datatype interfaces to SetGenotype and SetPhenotype. + * Repaired the GenericArrayEditor. Population measures can now be plottet in stats. * 2.026: Added DiversityTerminator and KnownOptimaTerminator, slightly changed InterfaceTerminator for these * and InterfaceStatistics to provide termination message to text window. * Killed redundant method getGenerations() in Population. Population.getAllSolutions now returns a @@ -25,7 +25,7 @@ package eva2; public class EvAInfo { public static final String productName = "EvA 2"; public static final String productLongName = "Evolutionary Algorithms Workbench 2"; - public static final String versionNum = new String ("2.026"); + public static final String versionNum = new String ("2.027"); public static final String url = "http://www.ra.cs.uni-tuebingen.de/software/EvA2"; public static final String propertyFile = "resources/EvA2.props"; diff --git a/src/eva2/gui/GraphPointSet.java b/src/eva2/gui/GraphPointSet.java index cff2bb3c..9c91b2e7 100644 --- a/src/eva2/gui/GraphPointSet.java +++ b/src/eva2/gui/GraphPointSet.java @@ -129,7 +129,6 @@ public class GraphPointSet { case 8: c = Color.orange; break; case 9: c = Color.darkGray; break; } - System.out.println("Selected " + c.toString() + " for " + k); return c; } /** diff --git a/src/eva2/server/go/individuals/ESIndividualBinaryData.java b/src/eva2/server/go/individuals/ESIndividualBinaryData.java index 2ebf5bcb..d82a649e 100644 --- a/src/eva2/server/go/individuals/ESIndividualBinaryData.java +++ b/src/eva2/server/go/individuals/ESIndividualBinaryData.java @@ -147,15 +147,15 @@ public class ESIndividualBinaryData extends AbstractEAIndividual implements Inte /** This method allows you to set the binary data. * @param binaryData The new binary data. */ - public void SetBinaryData(BitSet binaryData) { + public void SetBinaryPhenotype(BitSet binaryData) { this.m_Phenotype = binaryData; } /** This method allows you to set the binary data, this can be used for * memetic algorithms. * @param binaryData The new binary data. */ - public void SetBinaryDataLamarckian(BitSet binaryData) { - this.SetBinaryData(binaryData); + public void SetBinaryGenotype(BitSet binaryData) { + this.SetBinaryPhenotype(binaryData); for (int i = 0; i < this.m_Genotype.length; i++) { if (this.m_UseHardSwitch) { if (binaryData.get(i)) this.m_Genotype[i] = RNG.randomDouble(0.55,1.0); @@ -187,7 +187,7 @@ public class ESIndividualBinaryData extends AbstractEAIndividual implements Inte public void initByValue(Object obj, InterfaceOptimizationProblem opt) { if (obj instanceof BitSet) { BitSet bs = (BitSet) obj; - this.SetBinaryDataLamarckian(bs); + this.SetBinaryGenotype(bs); } else { this.defaultInit(); System.out.println("Initial value for ESIndividualBinaryData is no BitSet!"); diff --git a/src/eva2/server/go/individuals/ESIndividualDoubleData.java b/src/eva2/server/go/individuals/ESIndividualDoubleData.java index ff28454e..eeba3602 100644 --- a/src/eva2/server/go/individuals/ESIndividualDoubleData.java +++ b/src/eva2/server/go/individuals/ESIndividualDoubleData.java @@ -174,7 +174,7 @@ public class ESIndividualDoubleData extends AbstractEAIndividual implements Inte * use SetDoubleDataLamarckian(). * @param doubleData The new double data. */ - public void SetDoubleData(double[] doubleData) { + public void SetDoublePhenotype(double[] doubleData) { this.m_Phenotype = doubleData; } @@ -182,8 +182,8 @@ public class ESIndividualDoubleData extends AbstractEAIndividual implements Inte * memetic algorithms. * @param doubleData The new double data. */ - public void SetDoubleDataLamarckian(double[] doubleData) { - this.SetDoubleData(doubleData); + public void SetDoubleGenotype(double[] doubleData) { + this.SetDoublePhenotype(doubleData); this.m_Genotype = new double[doubleData.length]; System.arraycopy(doubleData, 0, this.m_Genotype, 0, doubleData.length); } @@ -209,7 +209,7 @@ public class ESIndividualDoubleData extends AbstractEAIndividual implements Inte if (obj instanceof double[]) { double[] bs = (double[]) obj; if (bs.length != this.m_Genotype.length) System.out.println("Init value and requested length doesn't match!"); - this.SetDoubleDataLamarckian(bs); + this.SetDoubleGenotype(bs); } else { this.defaultInit(); System.out.println("Initial value for ESIndividualDoubleData is not double[]!"); diff --git a/src/eva2/server/go/individuals/ESIndividualIntegerData.java b/src/eva2/server/go/individuals/ESIndividualIntegerData.java index 0f46e0d9..c7cb562d 100644 --- a/src/eva2/server/go/individuals/ESIndividualIntegerData.java +++ b/src/eva2/server/go/individuals/ESIndividualIntegerData.java @@ -169,7 +169,7 @@ public class ESIndividualIntegerData extends AbstractEAIndividual implements Int /** This method allows you to set the int data. * @param intData The new int data. */ - public void SetIntegerData(int[] intData) { + public void SetIntPhenotype(int[] intData) { this.m_Phenotype = intData; } @@ -177,8 +177,11 @@ public class ESIndividualIntegerData extends AbstractEAIndividual implements Int * memetic algorithms. * @param intData The new int data. */ - public void SetIntegerDataLamarckian(int[] intData) { - this.SetIntegerData(intData); + public void SetIntGenotype(int[] intData) { + for (int i = 0; i < this.m_Genotype.length; i++) { + m_Genotype[i]=(double)intData[i]; + } + getIntegerData(); } /************************************************************************************ @@ -202,7 +205,7 @@ public class ESIndividualIntegerData extends AbstractEAIndividual implements Int if (obj instanceof int[]) { int[] bs = (int[]) obj; if (bs.length != this.m_Genotype.length) System.out.println("Init value and requested length doesn't match!"); - this.SetIntegerDataLamarckian(bs); + this.SetIntGenotype(bs); } else { this.defaultInit(); System.out.println("Initial value for ESIndividualIntegerData is not int[]!"); diff --git a/src/eva2/server/go/individuals/ESIndividualPermutationData.java b/src/eva2/server/go/individuals/ESIndividualPermutationData.java index 52736948..cab03986 100644 --- a/src/eva2/server/go/individuals/ESIndividualPermutationData.java +++ b/src/eva2/server/go/individuals/ESIndividualPermutationData.java @@ -133,7 +133,7 @@ public class ESIndividualPermutationData extends AbstractEAIndividual implements return res; } - public void SetPermutationData(int[][] perm){ + public void SetPermutationPhenotype(int[][] perm){ this.m_Phenotype = perm; this.m_Range = new double[perm.length][][]; for (int i = 0; i < perm.length; i++) { @@ -146,8 +146,8 @@ public class ESIndividualPermutationData extends AbstractEAIndividual implements } - public void SetPermutationDataLamarckian(int[][] perm){ - this.SetPermutationData(perm); + public void SetPermutationGenotype(int[][] perm){ + this.SetPermutationPhenotype(perm); this.m_Genotype = new double[perm.length][]; this.m_Range = new double[perm.length][][]; @@ -231,7 +231,7 @@ public class ESIndividualPermutationData extends AbstractEAIndividual implements if (obj instanceof int[][]) { int[][] bs = (int[][]) obj; if (bs.length != this.m_Genotype.length) System.out.println("Init value and requested length doesn't match!"); - this.SetPermutationDataLamarckian(bs); + this.SetPermutationGenotype(bs); } else { this.defaultInit(); System.out.println("Initial value for ESIndividualPermutationData is not int[]!"); diff --git a/src/eva2/server/go/individuals/GAESIndividualBinaryDoubleData.java b/src/eva2/server/go/individuals/GAESIndividualBinaryDoubleData.java index 6a7d3840..7b64ff4d 100644 --- a/src/eva2/server/go/individuals/GAESIndividualBinaryDoubleData.java +++ b/src/eva2/server/go/individuals/GAESIndividualBinaryDoubleData.java @@ -222,8 +222,8 @@ public class GAESIndividualBinaryDoubleData extends AbstractEAIndividual impleme * @param doubleData The new double data. * @see InterfaceDataTypeDouble.SetDoubleData() */ - public void SetDoubleData(double[] doubleData) { - this.m_Numbers.SetDoubleData(doubleData); + public void SetDoublePhenotype(double[] doubleData) { + this.m_Numbers.SetDoublePhenotype(doubleData); } /** This method allows you to set the double data, this can be used for @@ -231,8 +231,8 @@ public class GAESIndividualBinaryDoubleData extends AbstractEAIndividual impleme * @param doubleData The new double data. * @see InterfaceDataTypeDouble.SetDoubleDataLamarckian() */ - public void SetDoubleDataLamarckian(double[] doubleData) { - this.m_Numbers.SetDoubleDataLamarckian(doubleData); + public void SetDoubleGenotype(double[] doubleData) { + this.m_Numbers.SetDoubleGenotype(doubleData); } /********************************************************************************************************************** @@ -272,8 +272,8 @@ public class GAESIndividualBinaryDoubleData extends AbstractEAIndividual impleme * @param binaryData The new binary data. * @see InterfaceDataTypeBinary.SetBinaryData() */ - public void SetBinaryData(BitSet binaryData) { - this.m_BitSet.SetBinaryData(binaryData); + public void SetBinaryPhenotype(BitSet binaryData) { + this.m_BitSet.SetBinaryPhenotype(binaryData); } /** This method allows you to set the binary data, this can be used for @@ -281,8 +281,8 @@ public class GAESIndividualBinaryDoubleData extends AbstractEAIndividual impleme * @param binaryData The new binary data. * @see InterfaceBinaryData.SetBinaryDataLamarckian() */ - public void SetBinaryDataLamarckian(BitSet binaryData) { - this.m_BitSet.SetBinaryDataLamarckian(binaryData); + public void SetBinaryGenotype(BitSet binaryData) { + this.m_BitSet.SetBinaryGenotype(binaryData); } /********************************************************************************************************************** diff --git a/src/eva2/server/go/individuals/GAIndividualBinaryData.java b/src/eva2/server/go/individuals/GAIndividualBinaryData.java index 95db3caa..b9a8492b 100644 --- a/src/eva2/server/go/individuals/GAIndividualBinaryData.java +++ b/src/eva2/server/go/individuals/GAIndividualBinaryData.java @@ -112,7 +112,7 @@ public class GAIndividualBinaryData extends AbstractEAIndividual implements Inte public void initByValue(Object obj, InterfaceOptimizationProblem opt) { if (obj instanceof BitSet) { BitSet bs = (BitSet) obj; - this.SetBinaryDataLamarckian(bs); + this.SetBinaryGenotype(bs); } else { this.defaultInit(); System.out.println("Initial value for GAIndividualBinaryData is no BitSet!"); @@ -234,7 +234,7 @@ public class GAIndividualBinaryData extends AbstractEAIndividual implements Inte /** This method allows you to set the binary data. * @param binaryData The new binary data. */ - public void SetBinaryData(BitSet binaryData) { + public void SetBinaryPhenotype(BitSet binaryData) { this.m_Phenotype = binaryData; } @@ -242,8 +242,8 @@ public class GAIndividualBinaryData extends AbstractEAIndividual implements Inte * memetic algorithms. * @param binaryData The new binary data. */ - public void SetBinaryDataLamarckian(BitSet binaryData) { - this.SetBinaryData(binaryData); + public void SetBinaryGenotype(BitSet binaryData) { + this.SetBinaryPhenotype(binaryData); this.m_Genotype =(BitSet)binaryData.clone(); } diff --git a/src/eva2/server/go/individuals/GAIndividualDoubleData.java b/src/eva2/server/go/individuals/GAIndividualDoubleData.java index 8c5655a5..ec0b73d8 100644 --- a/src/eva2/server/go/individuals/GAIndividualDoubleData.java +++ b/src/eva2/server/go/individuals/GAIndividualDoubleData.java @@ -189,7 +189,7 @@ public class GAIndividualDoubleData extends AbstractEAIndividual implements Inte * use SetDoubleDataLamarckian. * @param doubleData The new double data. */ - public void SetDoubleData(double[] doubleData) { + public void SetDoublePhenotype(double[] doubleData) { this.m_Phenotype = doubleData; } @@ -197,8 +197,8 @@ public class GAIndividualDoubleData extends AbstractEAIndividual implements Inte * memetic algorithms. * @param doubleData The new double data. */ - public void SetDoubleDataLamarckian(double[] doubleData) { - this.SetDoubleData(doubleData); + public void SetDoubleGenotype(double[] doubleData) { + this.SetDoublePhenotype(doubleData); int[] locus = new int[2]; for (int i = 0; i < doubleData.length; i++) { locus[0] = i * this.m_Precision; @@ -228,7 +228,7 @@ public class GAIndividualDoubleData extends AbstractEAIndividual implements Inte if (obj instanceof double[]) { double[] bs = (double[]) obj; if (bs.length != this.m_Range.length) System.out.println("Init value and requested length doesn't match!"); - this.SetDoubleDataLamarckian(bs); + this.SetDoubleGenotype(bs); } else { this.defaultInit(); System.out.println("Initial value for GAIndividualDoubleData is not double[]!"); diff --git a/src/eva2/server/go/individuals/GAIndividualIntegerData.java b/src/eva2/server/go/individuals/GAIndividualIntegerData.java index 9eb1acc5..d7092dc0 100644 --- a/src/eva2/server/go/individuals/GAIndividualIntegerData.java +++ b/src/eva2/server/go/individuals/GAIndividualIntegerData.java @@ -186,7 +186,7 @@ public class GAIndividualIntegerData extends AbstractEAIndividual implements Int /** This method allows you to set the double data. * @param doubleData The new double data. */ - public void SetIntegerData(int[] doubleData) { + public void SetIntPhenotype(int[] doubleData) { this.m_Phenotype = doubleData; } @@ -194,8 +194,8 @@ public class GAIndividualIntegerData extends AbstractEAIndividual implements Int * memetic algorithms. * @param doubleData The new double data. */ - public void SetIntegerDataLamarckian(int[] doubleData) { - this.SetIntegerData(doubleData); + public void SetIntGenotype(int[] doubleData) { + this.SetIntPhenotype(doubleData); if (doubleData != null) { int[] locus = new int[2]; locus[0] = 0; @@ -229,7 +229,7 @@ public class GAIndividualIntegerData extends AbstractEAIndividual implements Int if (obj instanceof int[]) { int[] bs = (int[]) obj; if (bs.length != this.m_Range.length) System.out.println("Init value and requested length doesn't match!"); - this.SetIntegerDataLamarckian(bs); + this.SetIntGenotype(bs); } else { this.defaultInit(); System.out.println("Initial value for GAIndividualDoubleData is not double[]!"); @@ -354,7 +354,7 @@ public class GAIndividualIntegerData extends AbstractEAIndividual implements Int tmp += data[i] + "; "; } System.out.println(tmp+"}"); - indy.SetIntegerDataLamarckian(data); + indy.SetIntGenotype(data); System.out.println(""+indy.getStringRepresentation()); data = indy.getIntegerData(); tmp = "After {"; diff --git a/src/eva2/server/go/individuals/GAPIndividualProgramData.java b/src/eva2/server/go/individuals/GAPIndividualProgramData.java index 6a9a3fcb..71b8859b 100644 --- a/src/eva2/server/go/individuals/GAPIndividualProgramData.java +++ b/src/eva2/server/go/individuals/GAPIndividualProgramData.java @@ -214,16 +214,16 @@ public class GAPIndividualProgramData extends AbstractEAIndividual implements In * SetDoubleDataLamarckian(). * @param doubleData The new double data. */ - public void SetDoubleData(double[] doubleData) { - this.m_Numbers.SetDoubleData(doubleData); + public void SetDoublePhenotype(double[] doubleData) { + this.m_Numbers.SetDoublePhenotype(doubleData); } /** This method allows you to set the genotype data, this can be used for * memetic algorithms. * @param doubleData The new double data. */ - public void SetDoubleDataLamarckian(double[] doubleData) { - this.m_Numbers.SetDoubleDataLamarckian(doubleData); + public void SetDoubleGenotype(double[] doubleData) { + this.m_Numbers.SetDoubleGenotype(doubleData); } /************************************************************************************ @@ -254,15 +254,15 @@ public class GAPIndividualProgramData extends AbstractEAIndividual implements In /** This method allows you to set the program. * @param program The new program. */ - public void SetProgramData(InterfaceProgram[] program) { - this.m_Program.SetProgramData(program); + public void SetProgramPhenotype(InterfaceProgram[] program) { + this.m_Program.SetProgramPhenotype(program); } /** This method allows you to set the program. * @param program The new program. */ - public void SetProgramDataLamarckian(InterfaceProgram[] program) { - this.m_Program.SetProgramDataLamarckian(program); + public void SetProgramGenotype(InterfaceProgram[] program) { + this.m_Program.SetProgramGenotype(program); } /** This method allows you to set the function area diff --git a/src/eva2/server/go/individuals/GEIndividualProgramData.java b/src/eva2/server/go/individuals/GEIndividualProgramData.java index e318277e..5069ca9c 100644 --- a/src/eva2/server/go/individuals/GEIndividualProgramData.java +++ b/src/eva2/server/go/individuals/GEIndividualProgramData.java @@ -460,7 +460,7 @@ public class GEIndividualProgramData extends AbstractEAIndividual implements Int /** This method allows you to set the program phenotype. * @param program The new program. */ - public void SetProgramData(InterfaceProgram[] program) { + public void SetProgramPhenotype(InterfaceProgram[] program) { if (program instanceof AbstractGPNode[]) { this.m_Phenotype = new AbstractGPNode[program.length]; for (int t = 0; t < program.length; t++) { @@ -473,8 +473,8 @@ public class GEIndividualProgramData extends AbstractEAIndividual implements Int * Warning - this is not implemented, it only sets the phenotype using SetProgramData. * @param program The new program. */ - public void SetProgramDataLamarckian(InterfaceProgram[] program) { - this.SetProgramData(program); + public void SetProgramGenotype(InterfaceProgram[] program) { + this.SetProgramPhenotype(program); if (program instanceof AbstractGPNode[]) System.err.println("Warning setProgram() for GEIndividualProgramData not implemented!"); } @@ -517,7 +517,7 @@ public class GEIndividualProgramData extends AbstractEAIndividual implements Int */ public void initByValue(Object obj, InterfaceOptimizationProblem opt) { if (obj instanceof InterfaceProgram) { - this.SetProgramDataLamarckian((InterfaceProgram[])obj); + this.SetProgramGenotype((InterfaceProgram[])obj); } else { this.defaultInit(); System.out.println("Initial value for GPIndividualDoubleData is no InterfaceProgram[]!"); diff --git a/src/eva2/server/go/individuals/GIIndividualIntegerData.java b/src/eva2/server/go/individuals/GIIndividualIntegerData.java index 817d26e6..fc3b6694 100644 --- a/src/eva2/server/go/individuals/GIIndividualIntegerData.java +++ b/src/eva2/server/go/individuals/GIIndividualIntegerData.java @@ -170,7 +170,7 @@ public class GIIndividualIntegerData extends AbstractEAIndividual implements Int /** This method allows you to set the double data. * @param doubleData The new double data. */ - public void SetIntegerData(int[] doubleData) { + public void SetIntPhenotype(int[] doubleData) { this.m_Phenotype = doubleData; } @@ -178,8 +178,8 @@ public class GIIndividualIntegerData extends AbstractEAIndividual implements Int * memetic algorithms. * @param doubleData The new double data. */ - public void SetIntegerDataLamarckian(int[] doubleData) { - this.SetIntegerData(doubleData); + public void SetIntGenotype(int[] doubleData) { + this.SetIntPhenotype(doubleData); this.m_Genotype = new int[this.m_Range.length]; for (int i = 0; i < doubleData.length; i++) { this.m_Genotype[i] = doubleData[i]; @@ -207,7 +207,7 @@ public class GIIndividualIntegerData extends AbstractEAIndividual implements Int if (obj instanceof int[]) { int[] bs = (int[]) obj; if (bs.length != this.m_Range.length) System.out.println("Init value and requested length doesn't match!"); - this.SetIntegerDataLamarckian(bs); + this.SetIntGenotype(bs); } else { this.defaultInit(); System.out.println("Initial value for GAIndividualDoubleData is not double[]!"); diff --git a/src/eva2/server/go/individuals/GIOBGAIndividualIntegerPermutationData.java b/src/eva2/server/go/individuals/GIOBGAIndividualIntegerPermutationData.java index 994c0124..1945dd4e 100644 --- a/src/eva2/server/go/individuals/GIOBGAIndividualIntegerPermutationData.java +++ b/src/eva2/server/go/individuals/GIOBGAIndividualIntegerPermutationData.java @@ -220,16 +220,16 @@ public class GIOBGAIndividualIntegerPermutationData extends AbstractEAIndividual /** This method allows you to set the int data. * @param intData The new int data. */ - public void SetIntegerData(int[] intData) { - this.m_Integer.SetIntegerData(intData); + public void SetIntPhenotype(int[] intData) { + this.m_Integer.SetIntPhenotype(intData); } /** This method allows you to set the int data, this can be used for * memetic algorithms. * @param intData The new int data. */ - public void SetIntegerDataLamarckian(int[] intData) { - this.m_Integer.SetIntegerDataLamarckian(intData); + public void SetIntGenotype(int[] intData) { + this.m_Integer.SetIntGenotype(intData); } /********************************************************************************************************************** @@ -268,16 +268,16 @@ public class GIOBGAIndividualIntegerPermutationData extends AbstractEAIndividual /** This method allows you to set the permutation. * @param perm The new permutation data. */ - public void SetPermutationData(int[][] perm) { - this.SetPermutationData(perm); + public void SetPermutationPhenotype(int[][] perm) { + this.SetPermutationPhenotype(perm); } /** This method allows you to set the permutation data, this can be used for * memetic algorithms. * @param perm The new permutation data. */ - public void SetPermutationDataLamarckian(int[][] perm) { - this.SetPermutationDataLamarckian(perm); + public void SetPermutationGenotype(int[][] perm) { + this.SetPermutationGenotype(perm); } public void setFirstindex(int[] firstindex) { diff --git a/src/eva2/server/go/individuals/GPIndividualProgramData.java b/src/eva2/server/go/individuals/GPIndividualProgramData.java index e5a0425d..431bcf14 100644 --- a/src/eva2/server/go/individuals/GPIndividualProgramData.java +++ b/src/eva2/server/go/individuals/GPIndividualProgramData.java @@ -155,7 +155,7 @@ public class GPIndividualProgramData extends AbstractEAIndividual implements Int /** This method allows you to set the program phenotype. * @param program The new program. */ - public void SetProgramData(InterfaceProgram[] program) { + public void SetProgramPhenotype(InterfaceProgram[] program) { if (program instanceof AbstractGPNode[]) { this.m_Phenotype = new AbstractGPNode[program.length]; for (int i = 0; i < this.m_Phenotype.length; i++) @@ -166,8 +166,8 @@ public class GPIndividualProgramData extends AbstractEAIndividual implements Int /** This method allows you to set the program genotype. * @param program The new program. */ - public void SetProgramDataLamarckian(InterfaceProgram[] program) { - this.SetProgramData(program); + public void SetProgramGenotype(InterfaceProgram[] program) { + this.SetProgramPhenotype(program); if (program instanceof AbstractGPNode[]) { this.m_Genotype = new AbstractGPNode[program.length]; for (int i = 0; i < this.m_Genotype.length; i++) @@ -210,7 +210,7 @@ public class GPIndividualProgramData extends AbstractEAIndividual implements Int */ public void initByValue(Object obj, InterfaceOptimizationProblem opt) { if (obj instanceof InterfaceProgram[]) { - this.SetProgramDataLamarckian((InterfaceProgram[])obj); + this.SetProgramGenotype((InterfaceProgram[])obj); } else { this.defaultInit(); System.out.println("Initial value for GPIndividualDoubleData is no InterfaceProgram[]!"); diff --git a/src/eva2/server/go/individuals/InterfaceDataTypeBinary.java b/src/eva2/server/go/individuals/InterfaceDataTypeBinary.java index 41f6d6b2..8dffe679 100644 --- a/src/eva2/server/go/individuals/InterfaceDataTypeBinary.java +++ b/src/eva2/server/go/individuals/InterfaceDataTypeBinary.java @@ -16,7 +16,7 @@ public interface InterfaceDataTypeBinary { /** This method allows you to request a certain amount of binary data * @param length The lenght of the BitSet that is to be optimized */ - public void setBinaryDataLength (int length); + public void setBinaryDataLength(int length); /** This method returns the length of the binary data set * @return The number of bits stored @@ -37,11 +37,11 @@ public interface InterfaceDataTypeBinary { /** This method allows you to set the binary data. * @param binaryData The new binary data. */ - public void SetBinaryData(BitSet binaryData); + public void SetBinaryPhenotype(BitSet binaryData); /** This method allows you to set the binary data, this can be used for * memetic algorithms. * @param binaryData The new binary data. */ - public void SetBinaryDataLamarckian(BitSet binaryData); + public void SetBinaryGenotype(BitSet binaryData); } diff --git a/src/eva2/server/go/individuals/InterfaceDataTypeDouble.java b/src/eva2/server/go/individuals/InterfaceDataTypeDouble.java index 3322b17d..a911d5a8 100644 --- a/src/eva2/server/go/individuals/InterfaceDataTypeDouble.java +++ b/src/eva2/server/go/individuals/InterfaceDataTypeDouble.java @@ -14,7 +14,7 @@ public interface InterfaceDataTypeDouble { /** This method allows you to request a certain amount of double data * @param length The lenght of the double[] that is to be optimized */ - public void setDoubleDataLength (int length); + public void setDoubleDataLength(int length); /** This method returns the length of the double data set * @return The number of doubles stored @@ -48,11 +48,11 @@ public interface InterfaceDataTypeDouble { * SetDoubleDataLamarckian to set the genotype data. * @param doubleData The new double data. */ - public void SetDoubleData(double[] doubleData); + public void SetDoublePhenotype(double[] doubleData); /** This method allows you to set the double data, this can be used for * memetic algorithms. * @param doubleData The new double data. */ - public void SetDoubleDataLamarckian(double[] doubleData); + public void SetDoubleGenotype(double[] doubleData); } diff --git a/src/eva2/server/go/individuals/InterfaceDataTypeInteger.java b/src/eva2/server/go/individuals/InterfaceDataTypeInteger.java index aaad2779..02d19d18 100644 --- a/src/eva2/server/go/individuals/InterfaceDataTypeInteger.java +++ b/src/eva2/server/go/individuals/InterfaceDataTypeInteger.java @@ -47,11 +47,11 @@ public interface InterfaceDataTypeInteger { /** This method allows you to set the int data. * @param intData The new int data. */ - public void SetIntegerData(int[] intData); + public void SetIntPhenotype(int[] intData); /** This method allows you to set the int data, this can be used for * memetic algorithms. * @param intData The new int data. */ - public void SetIntegerDataLamarckian(int[] intData); + public void SetIntGenotype(int[] intData); } diff --git a/src/eva2/server/go/individuals/InterfaceDataTypePermutation.java b/src/eva2/server/go/individuals/InterfaceDataTypePermutation.java index 34ba09a8..6e6c48d8 100644 --- a/src/eva2/server/go/individuals/InterfaceDataTypePermutation.java +++ b/src/eva2/server/go/individuals/InterfaceDataTypePermutation.java @@ -48,13 +48,13 @@ public interface InterfaceDataTypePermutation { /** This method allows you to set the permutation. * @param perm The new permutation data. */ - void SetPermutationData(int[][] perm); + void SetPermutationPhenotype(int[][] perm); /** This method allows you to set the permutation data, this can be used for * memetic algorithms. * @param perm The new permutation data. */ - void SetPermutationDataLamarckian(int[][] perm); + void SetPermutationGenotype(int[][] perm); public void setFirstindex(int[] firstindex); } diff --git a/src/eva2/server/go/individuals/InterfaceDataTypeProgram.java b/src/eva2/server/go/individuals/InterfaceDataTypeProgram.java index 0a1ec0b5..f8a69d1a 100644 --- a/src/eva2/server/go/individuals/InterfaceDataTypeProgram.java +++ b/src/eva2/server/go/individuals/InterfaceDataTypeProgram.java @@ -32,12 +32,12 @@ public interface InterfaceDataTypeProgram { /** This method allows you to set the program. * @param program The new program. */ - public void SetProgramData(InterfaceProgram[] program); + public void SetProgramPhenotype(InterfaceProgram[] program); /** This method allows you to set the program. * @param program The new program. */ - public void SetProgramDataLamarckian(InterfaceProgram[] program); + public void SetProgramGenotype(InterfaceProgram[] program); /** This method allows you to set the function area * @param area The area contains functions and terminals diff --git a/src/eva2/server/go/individuals/OBGAIndividualPermutationData.java b/src/eva2/server/go/individuals/OBGAIndividualPermutationData.java index 6b873975..4e130731 100644 --- a/src/eva2/server/go/individuals/OBGAIndividualPermutationData.java +++ b/src/eva2/server/go/individuals/OBGAIndividualPermutationData.java @@ -104,7 +104,7 @@ public class OBGAIndividualPermutationData extends AbstractEAIndividual implemen */ public void initByValue(Object obj, InterfaceOptimizationProblem opt) { if (obj instanceof int[]) { - this.SetPermutationDataLamarckian((int[][]) obj); + this.SetPermutationGenotype((int[][]) obj); } else { this.defaultInit(); System.out.println("Initial value for OBGAIndividualBinaryData is no Permutation!"); @@ -177,7 +177,7 @@ public class OBGAIndividualPermutationData extends AbstractEAIndividual implemen perm[p2] = temp; } - this.SetPermutationDataLamarckian(permmatrix); + this.SetPermutationGenotype(permmatrix); } /*generates a random permutation */ @@ -196,7 +196,7 @@ public class OBGAIndividualPermutationData extends AbstractEAIndividual implemen i++; } } - this.SetPermutationDataLamarckian(perm); + this.SetPermutationGenotype(perm); // System.out.println(getStringRepresentation()); } @@ -223,12 +223,12 @@ public class OBGAIndividualPermutationData extends AbstractEAIndividual implemen return res; } - public void SetPermutationData(int[][] perm){ + public void SetPermutationPhenotype(int[][] perm){ this.m_Phenotype = perm; } - public void SetPermutationDataLamarckian(int[][] perm){ - this.SetPermutationData(perm); + public void SetPermutationGenotype(int[][] perm){ + this.SetPermutationPhenotype(perm); this.m_Genotype = new int[perm.length][]; for (int i = 0; i < perm.length; i++) { this.m_Genotype[i] = new int[perm[i].length]; diff --git a/src/eva2/server/go/operators/cluster/ClusteringXMeans.java b/src/eva2/server/go/operators/cluster/ClusteringXMeans.java index 9eeaaff1..049ca407 100644 --- a/src/eva2/server/go/operators/cluster/ClusteringXMeans.java +++ b/src/eva2/server/go/operators/cluster/ClusteringXMeans.java @@ -317,7 +317,7 @@ public class ClusteringXMeans implements InterfaceClustering, java.io.Serializab x[0] = 10; x[1] = 10; } - ((InterfaceDataTypeDouble)pop.get(i)).SetDoubleDataLamarckian(x); + ((InterfaceDataTypeDouble)pop.get(i)).SetDoubleGenotype(x); } } else { f1.initPopulation(pop); diff --git a/src/eva2/server/go/problems/AbstractDynTransProblem.java b/src/eva2/server/go/problems/AbstractDynTransProblem.java index d535d142..556005b8 100644 --- a/src/eva2/server/go/problems/AbstractDynTransProblem.java +++ b/src/eva2/server/go/problems/AbstractDynTransProblem.java @@ -98,7 +98,7 @@ public abstract class AbstractDynTransProblem extends AbstractSynchronousOptimiz /* individuum moves towords untranslated problem */ indyData[i] -= getTranslation(i, time); } - ((InterfaceDataTypeDouble)individual).SetDoubleDataLamarckian(indyData); + ((InterfaceDataTypeDouble)individual).SetDoubleGenotype(indyData); } /* diff --git a/src/eva2/server/go/problems/AbstractMultiModalProblemKnown.java b/src/eva2/server/go/problems/AbstractMultiModalProblemKnown.java index 63ac696f..00d49e4f 100644 --- a/src/eva2/server/go/problems/AbstractMultiModalProblemKnown.java +++ b/src/eva2/server/go/problems/AbstractMultiModalProblemKnown.java @@ -175,7 +175,7 @@ public abstract class AbstractMultiModalProblemKnown extends AbstractProblemDoub protected void addOptimum(double[] point) { InterfaceDataTypeDouble tmpIndy; tmpIndy = (InterfaceDataTypeDouble)((AbstractEAIndividual)this.m_Template).clone(); - tmpIndy.SetDoubleDataLamarckian(point); + tmpIndy.SetDoubleGenotype(point); ((AbstractEAIndividual)tmpIndy).SetFitness(evalUnnormalized(point)); if (((AbstractEAIndividual)tmpIndy).getFitness(0)>=m_GlobalOpt) { m_GlobalOpt = ((AbstractEAIndividual)tmpIndy).getFitness(0); diff --git a/src/eva2/server/go/problems/BKnapsackProblem.java b/src/eva2/server/go/problems/BKnapsackProblem.java index e6d32fc4..d37173f9 100644 --- a/src/eva2/server/go/problems/BKnapsackProblem.java +++ b/src/eva2/server/go/problems/BKnapsackProblem.java @@ -166,7 +166,7 @@ public class BKnapsackProblem extends AbstractProblemBinary implements java.io.S while (eval(tmpSet)[1] > 0) { tmpSet.set(RNG.randomInt(0,items.length-1)); } - ((InterfaceDataTypeBinary)indy).SetBinaryDataLamarckian(tmpSet); + ((InterfaceDataTypeBinary)indy).SetBinaryGenotype(tmpSet); } } @@ -234,7 +234,7 @@ public class BKnapsackProblem extends AbstractProblemBinary implements java.io.S } if (this.m_Lamarckism) { - ((InterfaceDataTypeBinary) individual).SetBinaryDataLamarckian(tmpBitSet); + ((InterfaceDataTypeBinary) individual).SetBinaryGenotype(tmpBitSet); } } result[0] += 5100; diff --git a/src/eva2/server/go/strategies/DynamicParticleSwarmOptimization.java b/src/eva2/server/go/strategies/DynamicParticleSwarmOptimization.java index 9e9cb4e7..74477a25 100644 --- a/src/eva2/server/go/strategies/DynamicParticleSwarmOptimization.java +++ b/src/eva2/server/go/strategies/DynamicParticleSwarmOptimization.java @@ -156,7 +156,7 @@ public class DynamicParticleSwarmOptimization extends ParticleSwarmOptimization } } - if (indy instanceof InterfaceDataTypeDouble) ((InterfaceDataTypeDouble)indy).SetDoubleDataLamarckian(newPos); + if (indy instanceof InterfaceDataTypeDouble) ((InterfaceDataTypeDouble)indy).SetDoubleGenotype(newPos); else endy.SetDGenotype(newPos); resetFitness(indy); diff --git a/src/eva2/server/go/strategies/GradientDescentAlgorithm.java b/src/eva2/server/go/strategies/GradientDescentAlgorithm.java index 409ac9bc..8d741fc0 100644 --- a/src/eva2/server/go/strategies/GradientDescentAlgorithm.java +++ b/src/eva2/server/go/strategies/GradientDescentAlgorithm.java @@ -183,7 +183,7 @@ public class GradientDescentAlgorithm implements InterfaceOptimizer, java.io.Ser } - ((InterfaceDataTypeDouble) indy).SetDoubleDataLamarckian(params); + ((InterfaceDataTypeDouble) indy).SetDoubleGenotype(params); } } @@ -196,7 +196,7 @@ public class GradientDescentAlgorithm implements InterfaceOptimizer, java.io.Ser Hashtable history = (Hashtable) indyhash.get(indy); if (indy.getFitness()[0] > recoverythreshold) { System.out.println("Gradient Descent: Fitness critical:" + indy.getFitness()[0]); - ((InterfaceDataTypeDouble) indy).SetDoubleData((double[]) history.get("params")); + ((InterfaceDataTypeDouble) indy).SetDoublePhenotype((double[]) history.get("params")); double[] changes = (double[]) history.get("changes"); int[] lock = (int[]) history.get("lock"); diff --git a/src/eva2/server/go/strategies/ParticleSwarmOptimization.java b/src/eva2/server/go/strategies/ParticleSwarmOptimization.java index 42fa1769..c4da3c3f 100644 --- a/src/eva2/server/go/strategies/ParticleSwarmOptimization.java +++ b/src/eva2/server/go/strategies/ParticleSwarmOptimization.java @@ -1132,7 +1132,7 @@ public class ParticleSwarmOptimization implements InterfaceOptimizer, java.io.Se } // finally set the new position and the current velocity - if (indy instanceof InterfaceDataTypeDouble) ((InterfaceDataTypeDouble)indy).SetDoubleDataLamarckian(newPosition); + if (indy instanceof InterfaceDataTypeDouble) ((InterfaceDataTypeDouble)indy).SetDoubleGenotype(newPosition); else { ((InterfaceESIndividual) indy).SetDGenotype(newPosition); // WARNING, this does a checkBounds in any case! if (!m_CheckConstraints) System.err.println("warning, checkbounds will be forced by InterfaceESIndividual!"); diff --git a/src/eva2/server/go/strategies/Tribes.java b/src/eva2/server/go/strategies/Tribes.java index ea4dc433..2805b0ca 100644 --- a/src/eva2/server/go/strategies/Tribes.java +++ b/src/eva2/server/go/strategies/Tribes.java @@ -250,7 +250,7 @@ public class Tribes implements InterfaceOptimizer, java.io.Serializable { if (bestMemPos.firstIsBetter(bestMemPos.getFitness(), bestExp.getFitness())) { AbstractEAIndividual indy = (AbstractEAIndividual)bestExp.clone(); indy.SetFitness(bestMemPos.getFitness()); - ((InterfaceDataTypeDouble)indy).SetDoubleDataLamarckian(bestMemPos.getPos()); + ((InterfaceDataTypeDouble)indy).SetDoubleGenotype(bestMemPos.getPos()); return indy; } else return bestExp; } @@ -684,7 +684,7 @@ public class Tribes implements InterfaceOptimizer, java.io.Serializable { if (tmp == null) System.err.println("Error in Tribes::positionToExplorer!"); TribesExplorer indy = tmp.clone(); indy.clearPosVel(); - indy.SetDoubleDataLamarckian(pos.getPos()); + indy.SetDoubleGenotype(pos.getPos()); indy.SetFitness(pos.getFitness()); return indy; } diff --git a/src/eva2/server/go/strategies/tribes/TribesExplorer.java b/src/eva2/server/go/strategies/tribes/TribesExplorer.java index f8bbee2d..c056d852 100644 --- a/src/eva2/server/go/strategies/tribes/TribesExplorer.java +++ b/src/eva2/server/go/strategies/tribes/TribesExplorer.java @@ -961,7 +961,7 @@ v[d] = cmin * v[d]; if (obj instanceof double[]) { double[] x = (double[]) obj; if (x.length != position.x.length) System.err.println("Init value and requested length doesn't match!"); - this.SetDoubleDataLamarckian(x); + this.SetDoubleGenotype(x); } else { this.init(opt); System.err.println("Initial value for ESIndividualDoubleData is not double[]!"); @@ -979,11 +979,11 @@ v[d] = cmin * v[d]; System.err.println("TRIBES: mutation is not available!"); } - public void SetDoubleData(double[] doubleData) { + public void SetDoublePhenotype(double[] doubleData) { position.setDoubleArray(doubleData); } - public void SetDoubleDataLamarckian(double[] doubleData) { + public void SetDoubleGenotype(double[] doubleData) { position.setDoubleArray(doubleData); } diff --git a/src/eva2/server/stat/StatsParameter.java b/src/eva2/server/stat/StatsParameter.java index 2c3c0275..399cbdc9 100644 --- a/src/eva2/server/stat/StatsParameter.java +++ b/src/eva2/server/stat/StatsParameter.java @@ -261,15 +261,15 @@ public class StatsParameter implements InterfaceStatisticsParameter, Serializabl * */ public String plotDataTipText() { - return "The data to be plotted."; + return "The data to be plotted: best fitness, worst fitness or average/max distance in population."; } - /** - * - */ - public String plotObjectivesTipText() { - return "The individual of which the objectives are plotted."; - } +// /** +// * +// */ +// public String plotObjectivesTipText() { +// return "The individual of which the objectives are plotted."; +// } /**