Renaming methods and removing toggel typo
This commit is contained in:
@@ -411,7 +411,7 @@ public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopu
|
|||||||
if (Thread.interrupted())
|
if (Thread.interrupted())
|
||||||
throw new InterruptedException();
|
throw new InterruptedException();
|
||||||
// write header to file
|
// write header to file
|
||||||
this.writeToFile(" FitnessCalls\t Best\t Mean\t Worst \t" + BeanInspector.toString(this.m_GO.getProblem().getAdditionalFileStringHeader(), '\t', false));
|
this.writeToFile(" FitnessCalls\t Best\t Mean\t Worst \t" + BeanInspector.toString(this.m_GO.getProblem().getAdditionalDataHeader(), '\t', false));
|
||||||
if ((this.m_ContinueFlag) && (this.m_Backup != null)) {
|
if ((this.m_ContinueFlag) && (this.m_Backup != null)) {
|
||||||
this.m_RecentFC += this.m_Backup.getFunctionCalls();
|
this.m_RecentFC += this.m_Backup.getFunctionCalls();
|
||||||
this.m_GO.getOptimizer().getProblem().initProblem();
|
this.m_GO.getOptimizer().getProblem().initProblem();
|
||||||
@@ -582,7 +582,7 @@ public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopu
|
|||||||
tmpLine.append("\t");
|
tmpLine.append("\t");
|
||||||
tmpLine.append(population.getWorstEAIndividual().getFitness(0));
|
tmpLine.append(population.getWorstEAIndividual().getFitness(0));
|
||||||
//tmpLine.append("\t");
|
//tmpLine.append("\t");
|
||||||
//tmpLine.append(this.m_GO.getProblem().getAdditionalFileStringValue(population));
|
//tmpLine.append(this.m_GO.getProblem().getAdditionalDataValue(population));
|
||||||
this.writeToFile(tmpLine.toString());
|
this.writeToFile(tmpLine.toString());
|
||||||
|
|
||||||
Double[] tmpData = new Double[2];
|
Double[] tmpData = new Double[2];
|
||||||
|
@@ -274,17 +274,17 @@ public class ESIndividualBinaryData extends AbstractEAIndividual implements Inte
|
|||||||
return "This is an ES individual adopted to optimize binary values.";
|
return "This is an ES individual adopted to optimize binary values.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method will toggle between genotyp interpreation as bit probability and
|
/** This method will toggle between genotype interpretation as bit probability and
|
||||||
* fixed switch.
|
* fixed switch.
|
||||||
* @param b the Switch.
|
* @param b the Switch.
|
||||||
*/
|
*/
|
||||||
public void setToggelInterpretation(boolean b) {
|
public void setToggleInterpretation(boolean b) {
|
||||||
this.m_UseHardSwitch = b;
|
this.m_UseHardSwitch = b;
|
||||||
}
|
}
|
||||||
public boolean getToggelInterpretation() {
|
public boolean getToggleInterpretation() {
|
||||||
return this.m_UseHardSwitch;
|
return this.m_UseHardSwitch;
|
||||||
}
|
}
|
||||||
public String toggelInterpretationTipText() {
|
public String toggleInterpretationTipText() {
|
||||||
return "Toggel between interpretation as probability or if(>0.5).";
|
return "Toggle between interpretation as probability or if(>0.5).";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -405,14 +405,14 @@ public class MOCCOViewer extends JPanel implements InterfaceRefSolutionListener,
|
|||||||
if (this.m_RefSolutionListener != null) this.m_RefSolutionListener.individualSelected(indy);
|
if (this.m_RefSolutionListener != null) this.m_RefSolutionListener.individualSelected(indy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method allows to toggel unique selection mode
|
/** This method allows to toggle unique selection mode
|
||||||
* @param t
|
* @param t
|
||||||
*/
|
*/
|
||||||
public void setUniquelySelectable(boolean t) {
|
public void setUniquelySelectable(boolean t) {
|
||||||
this.m_SelectUniqueSolution = t;
|
this.m_SelectUniqueSolution = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method allows to toggel selection mode
|
/** This method allows to toggle selection mode
|
||||||
* @param t
|
* @param t
|
||||||
*/
|
*/
|
||||||
public void setRefSolutionSelectable(boolean t) {
|
public void setRefSolutionSelectable(boolean t) {
|
||||||
@@ -454,7 +454,7 @@ public class MOCCOViewer extends JPanel implements InterfaceRefSolutionListener,
|
|||||||
this.m_View.updateView();
|
this.m_View.updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method allows to toggel unique selection mode
|
/** This method allows to toggle unique selection mode
|
||||||
* @param t
|
* @param t
|
||||||
*/
|
*/
|
||||||
public void setRefPointSelectable(boolean t) {
|
public void setRefPointSelectable(boolean t) {
|
||||||
|
@@ -163,7 +163,7 @@ public abstract class AbstractArchiving implements InterfaceArchiving, java.io.S
|
|||||||
// return "Toggles the debug mode.";
|
// return "Toggles the debug mode.";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -109,7 +109,7 @@ public class ArchivingMaxiMin implements InterfaceArchiving, java.io.Serializabl
|
|||||||
return "Choose the selection method (single-criteria ones please).";
|
return "Choose the selection method (single-criteria ones please).";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -368,7 +368,7 @@ public class ClusteringKMeans implements InterfaceClustering, java.io.Serializab
|
|||||||
this.m_UseSearchSpace = m;
|
this.m_UseSearchSpace = m;
|
||||||
}
|
}
|
||||||
public String useSearchSpaceTipText() {
|
public String useSearchSpaceTipText() {
|
||||||
return "Toggel between search/objective space distance.";
|
return "Toggle between search/objective space distance.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method allows you to toggle reuse of c.
|
/** This method allows you to toggle reuse of c.
|
||||||
@@ -381,7 +381,7 @@ public class ClusteringKMeans implements InterfaceClustering, java.io.Serializab
|
|||||||
this.m_ReuseC = m;
|
this.m_ReuseC = m;
|
||||||
}
|
}
|
||||||
public String reuseCTipText() {
|
public String reuseCTipText() {
|
||||||
return "Toggel reuse of previously found cluster centroids.";
|
return "Toggle reuse of previously found cluster centroids.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String initClustering(Population pop) {
|
public String initClustering(Population pop) {
|
||||||
|
@@ -377,7 +377,7 @@ public class ClusteringXMeans implements InterfaceClustering, java.io.Serializab
|
|||||||
this.m_UseSearchSpace = m;
|
this.m_UseSearchSpace = m;
|
||||||
}
|
}
|
||||||
public String useSearchSpaceTipText() {
|
public String useSearchSpaceTipText() {
|
||||||
return "Toggel between search/objective space distance.";
|
return "Toggle between search/objective space distance.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String initClustering(Population pop) {
|
public String initClustering(Population pop) {
|
||||||
|
@@ -398,6 +398,6 @@ public class MOClusteringSeparation implements InterfaceMigration, java.io.Seria
|
|||||||
this.m_KMeans.setReuseC(this.m_ReuseC);
|
this.m_KMeans.setReuseC(this.m_ReuseC);
|
||||||
}
|
}
|
||||||
public String reuseCTipText() {
|
public String reuseCTipText() {
|
||||||
return "Toggel reuse of previously found cluster centroids.";
|
return "Toggle reuse of previously found cluster centroids.";
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -49,7 +49,7 @@ public interface InterfaceSelection {
|
|||||||
*/
|
*/
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size);
|
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size);
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -99,7 +99,7 @@ public class SelectAll implements InterfaceSelection, java.io.Serializable {
|
|||||||
return "This method selects all individuals.";
|
return "This method selects all individuals.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -172,7 +172,7 @@ public class SelectBestIndividuals implements InterfaceSelection, java.io.Serial
|
|||||||
return "Elitist Selection";
|
return "Elitist Selection";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -133,7 +133,7 @@ public class SelectBestSingle implements InterfaceSelection, java.io.Serializabl
|
|||||||
return "Totalitarian Selection";
|
return "Totalitarian Selection";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -196,7 +196,7 @@ public class SelectEPTournaments implements InterfaceSelection, java.io.Serializ
|
|||||||
m_Tournaments = g;
|
m_Tournaments = g;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -137,7 +137,7 @@ public class SelectMOMAIIDominanceCounter implements InterfaceSelection, java.io
|
|||||||
return "Choose the selection method (single-criteria ones please).";
|
return "Choose the selection method (single-criteria ones please).";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -107,7 +107,7 @@ public class SelectMOMaxiMin implements InterfaceSelection, java.io.Serializable
|
|||||||
return "Choose the selection method (single-criteria ones please).";
|
return "Choose the selection method (single-criteria ones please).";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -167,7 +167,7 @@ public class SelectMONSGAIICrowedTournament implements InterfaceSelection, java.
|
|||||||
m_TournamentSize = g;
|
m_TournamentSize = g;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -133,7 +133,7 @@ public class SelectMONonDominated implements InterfaceSelection, java.io.Seriali
|
|||||||
return "Non-Dominated Selection";
|
return "Non-Dominated Selection";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -118,7 +118,7 @@ public class SelectMOPESA implements InterfaceSelection, java.io.Serializable {
|
|||||||
m_TournamentSize = g;
|
m_TournamentSize = g;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -143,7 +143,7 @@ public class SelectMOPESAII implements InterfaceSelection, java.io.Serializable
|
|||||||
return "PESAII Selection";
|
return "PESAII Selection";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -149,7 +149,7 @@ public class SelectMOSPEAII implements InterfaceSelection, java.io.Serializable
|
|||||||
return "Choose a method for selecting the reduced population.";
|
return "Choose a method for selecting the reduced population.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -157,7 +157,7 @@ public class SelectParticleWheel implements InterfaceSelection, java.io.Serializ
|
|||||||
"This is a single objective selecting method, it will select in respect to a random criterion.";
|
"This is a single objective selecting method, it will select in respect to a random criterion.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -113,7 +113,7 @@ public class SelectRandom implements InterfaceSelection, java.io.Serializable {
|
|||||||
return "This method selects randomly. Therefore, it even works fine on Multiobjective fitness cases.";
|
return "This method selects randomly. Therefore, it even works fine on Multiobjective fitness cases.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -132,7 +132,7 @@ public class SelectTournament implements InterfaceSelection, java.io.Serializabl
|
|||||||
m_TournamentSize = g;
|
m_TournamentSize = g;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -215,7 +215,7 @@ public class SelectXProbRouletteWheel implements InterfaceSelection, java.io.Ser
|
|||||||
return "Select the normation method.";
|
return "Select the normation method.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggel the use of obeying the constraint violation principle
|
/** Toggle the use of obeying the constraint violation principle
|
||||||
* of Deb
|
* of Deb
|
||||||
* @param b The new state
|
* @param b The new state
|
||||||
*/
|
*/
|
||||||
|
@@ -122,17 +122,17 @@ public abstract class AbstractMultiModalProblemKnown extends AbstractProblemDoub
|
|||||||
public abstract double[] evalUnnormalized(double[] x);
|
public abstract double[] evalUnnormalized(double[] x);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getAdditionalFileStringHeader() {
|
public String[] getAdditionalDataHeader() {
|
||||||
return ToolBox.appendArrays(new String[]{"numOptsFound", "maxPeakRatio"}, super.getAdditionalFileStringHeader());
|
return ToolBox.appendArrays(new String[]{"numOptsFound", "maxPeakRatio"}, super.getAdditionalDataHeader());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||||
Object[] result = new Object[2];
|
Object[] result = new Object[2];
|
||||||
// result += AbstractEAIndividual.getDefaultDataString(pop.getBestIndividual()) +"\t";
|
// result += AbstractEAIndividual.getDefaultDataString(pop.getBestIndividual()) +"\t";
|
||||||
result[0] = this.getNumberOfFoundOptima((Population)pop);
|
result[0] = this.getNumberOfFoundOptima((Population)pop);
|
||||||
result[1] = this.getMaximumPeakRatio((Population)pop);
|
result[1] = this.getMaximumPeakRatio((Population)pop);
|
||||||
return ToolBox.appendArrays(result, super.getAdditionalFileStringValue(pop));
|
return ToolBox.appendArrays(result, super.getAdditionalDataValue(pop));
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// /** This method returns a string describing the optimization problem.
|
// /** This method returns a string describing the optimization problem.
|
||||||
|
@@ -490,13 +490,13 @@ public abstract class AbstractMultiObjectiveOptimizationProblem extends Abstract
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getAdditionalFileStringHeader() {
|
public String[] getAdditionalDataHeader() {
|
||||||
String[] superHd = super.getAdditionalFileStringHeader();
|
String[] superHd = super.getAdditionalDataHeader();
|
||||||
return ToolBox.appendArrays(new String[]{"paretoMetricCurrent","paretoMetricFront"}, superHd);
|
return ToolBox.appendArrays(new String[]{"paretoMetricCurrent","paretoMetricFront"}, superHd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||||
Object[] result = new Object[2];
|
Object[] result = new Object[2];
|
||||||
if (m_MOSOConverter!=null && !(m_MOSOConverter instanceof MOSONoConvert)) {
|
if (m_MOSOConverter!=null && !(m_MOSOConverter instanceof MOSONoConvert)) {
|
||||||
result[0]=Double.NaN; result[1]=Double.NaN;
|
result[0]=Double.NaN; result[1]=Double.NaN;
|
||||||
@@ -504,16 +504,16 @@ public abstract class AbstractMultiObjectiveOptimizationProblem extends Abstract
|
|||||||
result[0] = this.calculateMetric((Population)pop);
|
result[0] = this.calculateMetric((Population)pop);
|
||||||
result[1] = this.calculateMetric(getLocalParetoFront());
|
result[1] = this.calculateMetric(getLocalParetoFront());
|
||||||
}
|
}
|
||||||
return ToolBox.appendArrays(result, super.getAdditionalFileStringValue(pop));
|
return ToolBox.appendArrays(result, super.getAdditionalDataValue(pop));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalFileStringInfo(eva2.server.go.PopulationInterface)
|
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalDataInfo(eva2.server.go.PopulationInterface)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String[] getAdditionalFileStringInfo() {
|
public String[] getAdditionalDataInfo() {
|
||||||
String[] superInfo = super.getAdditionalFileStringInfo();
|
String[] superInfo = super.getAdditionalDataInfo();
|
||||||
return ToolBox.appendArrays(new String[]{"Pareto metric on the current population (per generation)",
|
return ToolBox.appendArrays(new String[]{"Pareto metric on the current population (per generation)",
|
||||||
"Pareto metric on the collected pareto front"}, superInfo);
|
"Pareto metric on the collected pareto front"}, superInfo);
|
||||||
}
|
}
|
||||||
|
@@ -246,7 +246,7 @@ implements InterfaceOptimizationProblem /*, InterfaceParamControllable*/, Serial
|
|||||||
* @param pop The population that is to be refined.
|
* @param pop The population that is to be refined.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String[] getAdditionalFileStringHeader() {
|
public String[] getAdditionalDataHeader() {
|
||||||
if (this instanceof InterfaceInterestingHistogram) return new String[]{STAT_SOLUTION_HEADER,"histogram","score"};
|
if (this instanceof InterfaceInterestingHistogram) return new String[]{STAT_SOLUTION_HEADER,"histogram","score"};
|
||||||
else return new String[]{STAT_SOLUTION_HEADER};
|
else return new String[]{STAT_SOLUTION_HEADER};
|
||||||
}
|
}
|
||||||
@@ -255,7 +255,7 @@ implements InterfaceOptimizationProblem /*, InterfaceParamControllable*/, Serial
|
|||||||
* @param pop The population that is to be refined.
|
* @param pop The population that is to be refined.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String[] getAdditionalFileStringInfo() {
|
public String[] getAdditionalDataInfo() {
|
||||||
if (this instanceof InterfaceInterestingHistogram) {
|
if (this instanceof InterfaceInterestingHistogram) {
|
||||||
return new String[]{"Representation of the current best individual",
|
return new String[]{"Representation of the current best individual",
|
||||||
"Fitness histogram of the current population",
|
"Fitness histogram of the current population",
|
||||||
@@ -268,7 +268,7 @@ implements InterfaceOptimizationProblem /*, InterfaceParamControllable*/, Serial
|
|||||||
* @param pop The population that is to be refined.
|
* @param pop The population that is to be refined.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||||
Object solObj;
|
Object solObj;
|
||||||
// solObj = AbstractEAIndividual.getDefaultDataString(pop.getBestIndividual());
|
// solObj = AbstractEAIndividual.getDefaultDataString(pop.getBestIndividual());
|
||||||
solObj = AbstractEAIndividual.getDefaultDataObject(pop.getBestIndividual());
|
solObj = AbstractEAIndividual.getDefaultDataObject(pop.getBestIndividual());
|
||||||
|
@@ -575,11 +575,11 @@ public abstract class AbstractProblemDouble extends AbstractOptimizationProblem
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalFileStringHeader()
|
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalDataHeader()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String[] getAdditionalFileStringHeader() {
|
public String[] getAdditionalDataHeader() {
|
||||||
String[] superHeader = super.getAdditionalFileStringHeader();
|
String[] superHeader = super.getAdditionalDataHeader();
|
||||||
if (isWithConstraints())
|
if (isWithConstraints())
|
||||||
return ToolBox.appendArrays(superHeader, new String[] { "rawFit",
|
return ToolBox.appendArrays(superHeader, new String[] { "rawFit",
|
||||||
"numViol", "sumViol" });
|
"numViol", "sumViol" });
|
||||||
@@ -589,11 +589,11 @@ public abstract class AbstractProblemDouble extends AbstractOptimizationProblem
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalFileStringInfo()
|
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalDataInfo()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String[] getAdditionalFileStringInfo() {
|
public String[] getAdditionalDataInfo() {
|
||||||
String[] superInfo = super.getAdditionalFileStringInfo();
|
String[] superInfo = super.getAdditionalDataInfo();
|
||||||
if (isWithConstraints())
|
if (isWithConstraints())
|
||||||
return ToolBox
|
return ToolBox
|
||||||
.appendArrays(
|
.appendArrays(
|
||||||
@@ -607,8 +607,8 @@ public abstract class AbstractProblemDouble extends AbstractOptimizationProblem
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||||
Object[] superVal = super.getAdditionalFileStringValue(pop);
|
Object[] superVal = super.getAdditionalDataValue(pop);
|
||||||
if (isWithConstraints()) {
|
if (isWithConstraints()) {
|
||||||
AbstractEAIndividual indy = (AbstractEAIndividual) pop
|
AbstractEAIndividual indy = (AbstractEAIndividual) pop
|
||||||
.getBestIndividual();
|
.getBestIndividual();
|
||||||
|
@@ -4,9 +4,10 @@ package eva2.server.go.problems;
|
|||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
|
|
||||||
import eva2.server.go.individuals.AbstractEAIndividual;
|
import eva2.server.go.individuals.AbstractEAIndividual;
|
||||||
import eva2.server.go.individuals.GAIndividualBinaryData;
|
|
||||||
import eva2.server.go.individuals.InterfaceDataTypeBinary;
|
import eva2.server.go.individuals.InterfaceDataTypeBinary;
|
||||||
import eva2.server.go.populations.Population;
|
import eva2.server.go.operators.mutation.MutateEAMixer;
|
||||||
|
import eva2.server.go.operators.mutation.MutateGASwapBits;
|
||||||
|
import eva2.server.go.operators.mutation.MutateGAUniform;
|
||||||
import eva2.server.go.strategies.InterfaceOptimizer;
|
import eva2.server.go.strategies.InterfaceOptimizer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21,6 +22,7 @@ public class B1Problem extends AbstractProblemBinary implements java.io.Serializ
|
|||||||
|
|
||||||
public B1Problem() {
|
public B1Problem() {
|
||||||
super();
|
super();
|
||||||
|
this.getIndividualTemplate().setMutationOperator(new MutateEAMixer(new MutateGASwapBits(), new MutateGAUniform()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public B1Problem(B1Problem b) {
|
public B1Problem(B1Problem b) {
|
||||||
|
@@ -158,18 +158,18 @@ public class F8Problem extends AbstractProblemDoubleOffset
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getAdditionalFileStringHeader() {
|
public String[] getAdditionalDataHeader() {
|
||||||
String[] superHd = super.getAdditionalFileStringHeader();
|
String[] superHd = super.getAdditionalDataHeader();
|
||||||
return ToolBox.appendArrays(new String[]{"numOptimaFound","maxPeakRatio"}, superHd);
|
return ToolBox.appendArrays(new String[]{"numOptimaFound","maxPeakRatio"}, superHd);
|
||||||
// return "#Optima found \tMaximum Peak Ratio \t" + super.getAdditionalFileStringHeader(pop);
|
// return "#Optima found \tMaximum Peak Ratio \t" + super.getAdditionalDataHeader(pop);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||||
Object[] myRet = new Object[2];
|
Object[] myRet = new Object[2];
|
||||||
myRet[0] = this.getNumberOfFoundOptima((Population)pop);
|
myRet[0] = this.getNumberOfFoundOptima((Population)pop);
|
||||||
myRet[1] = this.getMaximumPeakRatio((Population)pop);
|
myRet[1] = this.getMaximumPeakRatio((Population)pop);
|
||||||
return ToolBox.appendArrays(myRet, super.getAdditionalFileStringValue(pop));
|
return ToolBox.appendArrays(myRet, super.getAdditionalDataValue(pop));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -483,10 +483,10 @@ public class FLensProblem extends AbstractOptimizationProblem implements Interfa
|
|||||||
return this.m_Show;
|
return this.m_Show;
|
||||||
}
|
}
|
||||||
public String showTipText() {
|
public String showTipText() {
|
||||||
return "Toggel the visualization of the solution.";
|
return "Toggle the visualization of the solution.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method allows you to toggel the use of the material constraint.
|
/** This method allows you to toggle the use of the material constraint.
|
||||||
* @param show Whether to show the result or not
|
* @param show Whether to show the result or not
|
||||||
*/
|
*/
|
||||||
public void setUseMaterialConst(boolean show) {
|
public void setUseMaterialConst(boolean show) {
|
||||||
@@ -496,7 +496,7 @@ public class FLensProblem extends AbstractOptimizationProblem implements Interfa
|
|||||||
return this.m_UseMaterialConst;
|
return this.m_UseMaterialConst;
|
||||||
}
|
}
|
||||||
public String useMaterialConstTipText() {
|
public String useMaterialConstTipText() {
|
||||||
return "Toggel the use of the material constraint.";
|
return "Toggle the use of the material constraint.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method allows you to choose the EA individual
|
/** This method allows you to choose the EA individual
|
||||||
|
@@ -17,7 +17,7 @@ public interface InterfaceAdditionalPopulationInformer {
|
|||||||
* @param pop The population of the optimization run.
|
* @param pop The population of the optimization run.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String[] getAdditionalFileStringHeader();
|
public String[] getAdditionalDataHeader();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optionally return informative descriptions of the data fields.
|
* Optionally return informative descriptions of the data fields.
|
||||||
@@ -25,12 +25,12 @@ public interface InterfaceAdditionalPopulationInformer {
|
|||||||
* @param pop
|
* @param pop
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String[] getAdditionalFileStringInfo();
|
public String[] getAdditionalDataInfo();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns additional statistical data.
|
* This method returns additional statistical data.
|
||||||
* @param pop The population that is to be refined.
|
* @param pop The population that is to be refined.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop);
|
public Object[] getAdditionalDataValue(PopulationInterface pop);
|
||||||
}
|
}
|
||||||
|
@@ -366,7 +366,7 @@ public class PSymbolicRegression extends AbstractOptimizationProblem implements
|
|||||||
return "Noise level on the fitness value.";
|
return "Noise level on the fitness value.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method toggels the use of inner constants.
|
/** This method toggles the use of inner constants.
|
||||||
* @param b The flag to use inner constants.
|
* @param b The flag to use inner constants.
|
||||||
*/
|
*/
|
||||||
public void setUseInnerConst(boolean b) {
|
public void setUseInnerConst(boolean b) {
|
||||||
@@ -376,10 +376,10 @@ public class PSymbolicRegression extends AbstractOptimizationProblem implements
|
|||||||
return this.m_UseInnerConst;
|
return this.m_UseInnerConst;
|
||||||
}
|
}
|
||||||
public String useInnerConstTipText() {
|
public String useInnerConstTipText() {
|
||||||
return "Toggel the use of inner constants.";
|
return "Toggle the use of inner constants.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method toggels the use of local hill climbing for inner constants.
|
/** This method toggles the use of local hill climbing for inner constants.
|
||||||
* @param b The flag to use local hill climbing for inner constants.
|
* @param b The flag to use local hill climbing for inner constants.
|
||||||
*/
|
*/
|
||||||
public void setUseLocalHillClimbing(boolean b) {
|
public void setUseLocalHillClimbing(boolean b) {
|
||||||
@@ -510,14 +510,14 @@ public class PSymbolicRegression extends AbstractOptimizationProblem implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getAdditionalFileStringHeader() {
|
public String[] getAdditionalDataHeader() {
|
||||||
String[] superHd = super.getAdditionalFileStringHeader();
|
String[] superHd = super.getAdditionalDataHeader();
|
||||||
return ToolBox.appendArrays(new String[]{"bestIndySize","avgIndySize","avgMaxIndyDepth"}, superHd);
|
return ToolBox.appendArrays(new String[]{"bestIndySize","avgIndySize","avgMaxIndyDepth"}, superHd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||||
Object[] superDat = super.getAdditionalFileStringValue(pop);
|
Object[] superDat = super.getAdditionalDataValue(pop);
|
||||||
return ToolBox.appendArrays(new Object[]{getBestIndySize(pop), getAvgIndySize(pop), getAvgIndyDepth(pop)}, superDat);
|
return ToolBox.appendArrays(new Object[]{getBestIndySize(pop), getAvgIndySize(pop), getAvgIndyDepth(pop)}, superDat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1142,14 +1142,14 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
return "If fitness improves less than this value within the halting window, convergence is assumed. May be set to zero.";
|
return "If fitness improves less than this value within the halting window, convergence is assumed. May be set to zero.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getAdditionalFileStringHeader() {
|
public String[] getAdditionalDataHeader() {
|
||||||
return new String[]{"numUndiff","numActSpec","avgSpecMeas","numArchived",
|
return new String[]{"numUndiff","numActSpec","avgSpecMeas","numArchived",
|
||||||
"archivedMedCorr", "archivedMeanDist"
|
"archivedMedCorr", "archivedMeanDist"
|
||||||
// , "numCollisions", "clustSig"
|
// , "numCollisions", "clustSig"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getAdditionalFileStringInfo() {
|
public String[] getAdditionalDataInfo() {
|
||||||
return new String[] {
|
return new String[] {
|
||||||
"The number of exploring individuals in the main population",
|
"The number of exploring individuals in the main population",
|
||||||
"The number of active species (sub-populations)",
|
"The number of active species (sub-populations)",
|
||||||
@@ -1162,7 +1162,7 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||||
// int actives = countActiveSpec();
|
// int actives = countActiveSpec();
|
||||||
return new Object[] {
|
return new Object[] {
|
||||||
m_Undifferentiated.size(),
|
m_Undifferentiated.size(),
|
||||||
|
@@ -418,15 +418,15 @@ public class ClusteringHillClimbing implements InterfacePopulationChangedEventLi
|
|||||||
return "Set the method to be used for the hill climbing as local search";
|
return "Set the method to be used for the hill climbing as local search";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getAdditionalFileStringHeader() {
|
public String[] getAdditionalDataHeader() {
|
||||||
return new String[]{"numIndies"};
|
return new String[]{"numIndies"};
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getAdditionalFileStringInfo() {
|
public String[] getAdditionalDataInfo() {
|
||||||
return new String[]{"The current population size"};
|
return new String[]{"The current population size"};
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||||
return new Object[]{m_Population.size()};
|
return new Object[]{m_Population.size()};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2067,17 +2067,17 @@ public class ParticleSwarmOptimization implements InterfaceOptimizer, java.io.Se
|
|||||||
// public void setDoLocalSearch(boolean doLocalSearch) {
|
// public void setDoLocalSearch(boolean doLocalSearch) {
|
||||||
// this.doLocalSearch = doLocalSearch;
|
// this.doLocalSearch = doLocalSearch;
|
||||||
// }
|
// }
|
||||||
public String[] getAdditionalFileStringHeader() {
|
public String[] getAdditionalDataHeader() {
|
||||||
if (emaPeriods > 0) return new String[]{"meanEMASpeed", "meanCurSpeed"};
|
if (emaPeriods > 0) return new String[]{"meanEMASpeed", "meanCurSpeed"};
|
||||||
else return new String[]{"meanCurSpeed"};
|
else return new String[]{"meanCurSpeed"};
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getAdditionalFileStringInfo() {
|
public String[] getAdditionalDataInfo() {
|
||||||
if (emaPeriods > 0) return new String[]{"Exponential moving average of the (range-relative) speed of all particles", "The mean (range-relative) current speed of all particles"};
|
if (emaPeriods > 0) return new String[]{"Exponential moving average of the (range-relative) speed of all particles", "The mean (range-relative) current speed of all particles"};
|
||||||
else return new String[]{"The mean (range-relative) current speed of all particles"};
|
else return new String[]{"The mean (range-relative) current speed of all particles"};
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||||
AbstractEAIndividual indy = (AbstractEAIndividual)pop.get(0);
|
AbstractEAIndividual indy = (AbstractEAIndividual)pop.get(0);
|
||||||
if (emaPeriods>0) {
|
if (emaPeriods>0) {
|
||||||
double relSp;
|
double relSp;
|
||||||
|
@@ -791,7 +791,7 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
|
|||||||
values.addAll(Arrays.asList(getSimpleOutputValues()));
|
values.addAll(Arrays.asList(getSimpleOutputValues()));
|
||||||
if (informerList != null) {
|
if (informerList != null) {
|
||||||
for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
||||||
List<Object> reqList = Arrays.asList(informer.getAdditionalFileStringValue(pop));
|
List<Object> reqList = Arrays.asList(informer.getAdditionalDataValue(pop));
|
||||||
values.addAll(reqList);
|
values.addAll(reqList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -821,9 +821,9 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
|
|||||||
LinkedList<String> headers = new LinkedList<String>();
|
LinkedList<String> headers = new LinkedList<String>();
|
||||||
if (metaInfo!=null && (metaInfo.size()>0)) System.err.println("Warning, metaInfo list should be empty in AbstractStatistics.getAdditionalInfoInfo");
|
if (metaInfo!=null && (metaInfo.size()>0)) System.err.println("Warning, metaInfo list should be empty in AbstractStatistics.getAdditionalInfoInfo");
|
||||||
for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
||||||
headers.addAll(Arrays.asList(informer.getAdditionalFileStringHeader()));
|
headers.addAll(Arrays.asList(informer.getAdditionalDataHeader()));
|
||||||
if (metaInfo!=null) metaInfo.addAll(Arrays.asList(informer.getAdditionalFileStringInfo()));
|
if (metaInfo!=null) metaInfo.addAll(Arrays.asList(informer.getAdditionalDataInfo()));
|
||||||
// hdr = hdr + "\t " + informer.getAdditionalFileStringHeader(pop);
|
// hdr = hdr + "\t " + informer.getAdditionalDataHeader(pop);
|
||||||
}
|
}
|
||||||
Iterator<String> hIter = headers.iterator();
|
Iterator<String> hIter = headers.iterator();
|
||||||
Iterator<String> mIter = (metaInfo!=null) ? metaInfo.iterator() : null;
|
Iterator<String> mIter = (metaInfo!=null) ? metaInfo.iterator() : null;
|
||||||
@@ -866,7 +866,7 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
|
|||||||
// ArrayList<Object> additionalObjects = new ArrayList<Object>(5);
|
// ArrayList<Object> additionalObjects = new ArrayList<Object>(5);
|
||||||
//
|
//
|
||||||
// for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
// for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
||||||
// additionalObjects.addAll(Arrays.asList(informer.getAdditionalFileStringValue(pop)));
|
// additionalObjects.addAll(Arrays.asList(informer.getAdditionalDataValue(pop)));
|
||||||
// }
|
// }
|
||||||
// String addInfo = StringTools.concatValues(additionalObjects, textFieldDelimiter);
|
// String addInfo = StringTools.concatValues(additionalObjects, textFieldDelimiter);
|
||||||
// Double[] retVals = parseDoubles(additionalObjects);
|
// Double[] retVals = parseDoubles(additionalObjects);
|
||||||
@@ -876,7 +876,7 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
|
|||||||
//// StringBuffer addBuffer = new StringBuffer();
|
//// StringBuffer addBuffer = new StringBuffer();
|
||||||
//// for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
//// for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
||||||
//// addBuffer.append(" \t ");
|
//// addBuffer.append(" \t ");
|
||||||
//// addBuffer.append(informer.getAdditionalFileStringValue(pop));
|
//// addBuffer.append(informer.getAdditionalDataValue(pop));
|
||||||
//// }
|
//// }
|
||||||
//// String addInfo = addBuffer.toString().trim();
|
//// String addInfo = addBuffer.toString().trim();
|
||||||
//// if (addInfo.startsWith("\t")) addInfo.substring(2); // remove first separator to avoid returning empty field as double
|
//// if (addInfo.startsWith("\t")) addInfo.substring(2); // remove first separator to avoid returning empty field as double
|
||||||
|
@@ -384,13 +384,13 @@ public class StatsParameter implements InterfaceStatisticsParameter, InterfaceNo
|
|||||||
ArrayList<String> infoFields = new ArrayList<String>();
|
ArrayList<String> infoFields = new ArrayList<String>();
|
||||||
// parse list of header elements, show additional Strings according to names.
|
// parse list of header elements, show additional Strings according to names.
|
||||||
for (InterfaceAdditionalPopulationInformer inf : informers) {
|
for (InterfaceAdditionalPopulationInformer inf : informers) {
|
||||||
headerFields.addAll(Arrays.asList(inf.getAdditionalFileStringHeader()));
|
headerFields.addAll(Arrays.asList(inf.getAdditionalDataHeader()));
|
||||||
if (infoFields.size()<headerFields.size()) { // add info strings for tool tips - fill up with null if none have been returned.
|
if (infoFields.size()<headerFields.size()) { // add info strings for tool tips - fill up with null if none have been returned.
|
||||||
String[] infos = inf.getAdditionalFileStringInfo();
|
String[] infos = inf.getAdditionalDataInfo();
|
||||||
if (infos!=null) infoFields.addAll(Arrays.asList(infos));
|
if (infos!=null) infoFields.addAll(Arrays.asList(infos));
|
||||||
while (infoFields.size()<headerFields.size()) infoFields.add(null);
|
while (infoFields.size()<headerFields.size()) infoFields.add(null);
|
||||||
}
|
}
|
||||||
// header += inf.getAdditionalFileStringHeader(null); // lets hope this works with a null
|
// header += inf.getAdditionalDataHeader(null); // lets hope this works with a null
|
||||||
}
|
}
|
||||||
// create additional fields to be selectable by the user, defined by the informer headers
|
// create additional fields to be selectable by the user, defined by the informer headers
|
||||||
// StringSelection ss = new StringSelection(GraphSelectionEnum.getAndAppendArray(headerFields.toArray(new String[headerFields.size()])));
|
// StringSelection ss = new StringSelection(GraphSelectionEnum.getAndAppendArray(headerFields.toArray(new String[headerFields.size()])));
|
||||||
|
Reference in New Issue
Block a user