Reformat code and optimize imports.
Language Level changed to 1.7
This commit is contained in:
parent
6473b35859
commit
595d0084a9
@ -1,107 +1,109 @@
|
||||
package eva2;
|
||||
|
||||
import eva2.tools.BasicResourceLoader;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @author mkron
|
||||
*
|
||||
*/
|
||||
public class EvAInfo {
|
||||
/**
|
||||
* Product Name.
|
||||
*/
|
||||
public static final String productName = "EvA2";
|
||||
|
||||
public static final String productName = "EvA2";
|
||||
|
||||
/**
|
||||
* Long product name.
|
||||
*/
|
||||
public static final String productLongName = "Evolutionary Algorithms Workbench 2";
|
||||
|
||||
public static final String productLongName = "Evolutionary Algorithms Workbench 2";
|
||||
|
||||
/**
|
||||
* Website URL of EvA2.
|
||||
*/
|
||||
public static final String url = "http://www.cogsys.cs.uni-tuebingen.de/software/EvA2";
|
||||
public static final String url = "http://www.cogsys.cs.uni-tuebingen.de/software/EvA2";
|
||||
|
||||
/**
|
||||
* Relative path to default properties.
|
||||
*/
|
||||
public static final String propertyFile = "META-INF/EvA2.props";
|
||||
|
||||
public static final String LGPLFile = "lgpl-3.0.txt";
|
||||
public static final String GPLFile= "gpl-3.0.txt";
|
||||
|
||||
public static final String propertyFile = "META-INF/EvA2.props";
|
||||
|
||||
public static final String LGPLFile = "lgpl-3.0.txt";
|
||||
public static final String GPLFile = "gpl-3.0.txt";
|
||||
|
||||
/**
|
||||
* Relative path to application icon.
|
||||
*/
|
||||
public static final String iconLocation = "images/icon4.gif";
|
||||
public static final String iconLocation = "images/icon4.gif";
|
||||
|
||||
/**
|
||||
* Relative path to splash screen image.
|
||||
*/
|
||||
public static final String splashLocation = "images/EvASplashScreen.png";
|
||||
|
||||
public static final String infoTitle = productName+" Information";
|
||||
public static final String copyrightYear = "2010-2012";
|
||||
public static final String splashLocation = "images/EvASplashScreen.png";
|
||||
|
||||
public static final String infoTitle = productName + " Information";
|
||||
public static final String copyrightYear = "2010-2012";
|
||||
|
||||
////////////// Property handling...
|
||||
|
||||
private static Properties evaProperties;
|
||||
|
||||
static {
|
||||
try {
|
||||
evaProperties = BasicResourceLoader.readProperties(EvAInfo.propertyFile);
|
||||
} catch (Exception ex) {
|
||||
System.err.println(resourceNotFoundErrorMessage(EvAInfo.propertyFile));
|
||||
System.err.println(ex.getMessage());
|
||||
System.exit(1);
|
||||
}
|
||||
InputStream istr = BasicResourceLoader.instance().getStreamFromResourceLocation(EvAInfo.iconLocation);
|
||||
if (istr == null) {
|
||||
throw new RuntimeException(resourceNotFoundErrorMessage(EvAInfo.iconLocation) + " (EvAInfo.static)");
|
||||
}
|
||||
}
|
||||
|
||||
////////////// Property handling...
|
||||
|
||||
private static Properties evaProperties;
|
||||
static {
|
||||
try {
|
||||
evaProperties = BasicResourceLoader.readProperties(EvAInfo.propertyFile);
|
||||
} catch (Exception ex) {
|
||||
System.err.println(resourceNotFoundErrorMessage(EvAInfo.propertyFile));
|
||||
System.err.println(ex.getMessage());
|
||||
System.exit(1);
|
||||
}
|
||||
InputStream istr = BasicResourceLoader.instance().getStreamFromResourceLocation(EvAInfo.iconLocation);
|
||||
if (istr==null) {
|
||||
throw new RuntimeException(resourceNotFoundErrorMessage(EvAInfo.iconLocation) + " (EvAInfo.static)");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An eloquent error message in case a resource was not found - which was
|
||||
* expected in the EvA2 resource directory.
|
||||
*
|
||||
* @param resourceName
|
||||
* @return
|
||||
*/
|
||||
public static String resourceNotFoundErrorMessage(String resourceName) {
|
||||
String cp = System.getProperty("java.class.path");
|
||||
return "Could not find " + resourceName +
|
||||
"\nPlease make resources folder available on the class path! " +
|
||||
"Current class path is: " + cp +
|
||||
"\nYou may copy it there or add the parent folder of resources/ to the class path.";
|
||||
String cp = System.getProperty("java.class.path");
|
||||
return "Could not find " + resourceName +
|
||||
"\nPlease make resources folder available on the class path! " +
|
||||
"Current class path is: " + cp +
|
||||
"\nYou may copy it there or add the parent folder of resources/ to the class path.";
|
||||
}
|
||||
|
||||
public static String getProperty(String key) {
|
||||
String myVal = evaProperties.getProperty(key);
|
||||
return myVal;
|
||||
}
|
||||
|
||||
public static Properties getProperties() {
|
||||
return evaProperties;
|
||||
}
|
||||
|
||||
private static void setProperty(String key, String value) {
|
||||
evaProperties.setProperty(key, value);
|
||||
}
|
||||
public static String getProperty(String key) {
|
||||
String myVal = evaProperties.getProperty(key);
|
||||
return myVal;
|
||||
}
|
||||
|
||||
public static String getVersion() {
|
||||
String version = getProperty("EvA2Version");
|
||||
if (version==null) {
|
||||
System.err.println("ERROR, missing property EvA2Version!");
|
||||
}
|
||||
return version;
|
||||
}
|
||||
public static Properties getProperties() {
|
||||
return evaProperties;
|
||||
}
|
||||
|
||||
public static String propDefaultModule() {
|
||||
return getProperty("DefaultModule");
|
||||
}
|
||||
private static void setProperty(String key, String value) {
|
||||
evaProperties.setProperty(key, value);
|
||||
}
|
||||
|
||||
public static String propShowModules() {
|
||||
return getProperty("ShowModules");
|
||||
}
|
||||
public static String getVersion() {
|
||||
String version = getProperty("EvA2Version");
|
||||
if (version == null) {
|
||||
System.err.println("ERROR, missing property EvA2Version!");
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
public static String propDefaultModule() {
|
||||
return getProperty("DefaultModule");
|
||||
}
|
||||
|
||||
public static String propShowModules() {
|
||||
return getProperty("ShowModules");
|
||||
}
|
||||
}
|
||||
|
@ -1,41 +1,13 @@
|
||||
package eva2;
|
||||
|
||||
import eva2.optimization.modules.OptimizationParameters;
|
||||
import eva2.optimization.operator.mutation.InterfaceMutation;
|
||||
import eva2.optimization.operator.mutation.NoMutation;
|
||||
import eva2.optimization.operator.mutation.MutateESFixedStepSize;
|
||||
import eva2.optimization.operator.mutation.MutateESCovarianceMatrixAdaption;
|
||||
import eva2.optimization.operator.mutation.MutateESGlobal;
|
||||
import eva2.optimization.operator.mutation.MutateESRankMuCMA;
|
||||
import eva2.optimization.strategies.ParticleSwarmOptimization;
|
||||
import eva2.optimization.strategies.EvolutionStrategyIPOP;
|
||||
import eva2.optimization.strategies.GradientDescentAlgorithm;
|
||||
import eva2.optimization.strategies.NelderMeadSimplex;
|
||||
import eva2.optimization.strategies.DifferentialEvolution;
|
||||
import eva2.optimization.strategies.EsDpiNiching;
|
||||
import eva2.optimization.strategies.HillClimbing;
|
||||
import eva2.optimization.strategies.EvolutionStrategies;
|
||||
import eva2.optimization.strategies.PopulationBasedIncrementalLearning;
|
||||
import eva2.optimization.strategies.EsDpiNichingCma;
|
||||
import eva2.optimization.strategies.MultiObjectiveEA;
|
||||
import eva2.optimization.strategies.GeneticAlgorithm;
|
||||
import eva2.optimization.strategies.InterfaceOptimizer;
|
||||
import eva2.optimization.strategies.Tribes;
|
||||
import eva2.optimization.strategies.SimulatedAnnealing;
|
||||
import eva2.optimization.strategies.ClusteringHillClimbing;
|
||||
import eva2.optimization.strategies.ClusterBasedNichingEA;
|
||||
import eva2.optimization.strategies.MonteCarloSearch;
|
||||
import eva2.optimization.individuals.IndividualInterface;
|
||||
import eva2.optimization.go.InterfacePopulationChangedEventListener;
|
||||
import eva2.optimization.go.InterfaceTerminator;
|
||||
import eva2.optimization.enums.DETypeEnum;
|
||||
import eva2.optimization.enums.MutateESCrossoverTypeEnum;
|
||||
import eva2.optimization.enums.PSOTopologyEnum;
|
||||
import eva2.optimization.enums.PostProcessMethod;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.individuals.InterfaceDataTypeBinary;
|
||||
import eva2.optimization.individuals.InterfaceDataTypeDouble;
|
||||
import eva2.optimization.individuals.InterfaceESIndividual;
|
||||
import eva2.optimization.go.InterfacePopulationChangedEventListener;
|
||||
import eva2.optimization.go.InterfaceTerminator;
|
||||
import eva2.optimization.individuals.*;
|
||||
import eva2.optimization.modules.OptimizationParameters;
|
||||
import eva2.optimization.operator.archiving.ArchivingNSGAII;
|
||||
import eva2.optimization.operator.archiving.InformationRetrievalInserting;
|
||||
import eva2.optimization.operator.archiving.InterfaceArchiving;
|
||||
@ -46,6 +18,7 @@ import eva2.optimization.operator.crossover.CrossoverESDefault;
|
||||
import eva2.optimization.operator.crossover.InterfaceCrossover;
|
||||
import eva2.optimization.operator.crossover.NoCrossover;
|
||||
import eva2.optimization.operator.distancemetric.IndividualDataMetric;
|
||||
import eva2.optimization.operator.mutation.*;
|
||||
import eva2.optimization.operator.postprocess.InterfacePostProcessParams;
|
||||
import eva2.optimization.operator.postprocess.PostProcessParams;
|
||||
import eva2.optimization.operator.selection.InterfaceSelection;
|
||||
@ -56,7 +29,9 @@ import eva2.optimization.population.PBILPopulation;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.optimization.problems.AbstractOptimizationProblem;
|
||||
import eva2.optimization.stat.InterfaceStatistics;
|
||||
import eva2.optimization.strategies.*;
|
||||
import eva2.tools.math.RNG;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.BitSet;
|
||||
import java.util.List;
|
||||
@ -76,11 +51,11 @@ import java.util.List;
|
||||
* while (!terminator.isTerminated(optimizer.getPopulation())) optimizer.optimize();
|
||||
* </code> </p>
|
||||
*
|
||||
* @version 0.1
|
||||
* @since 2.0
|
||||
* @author mkron
|
||||
* @author Andreas Dräger
|
||||
* @version 0.1
|
||||
* @date 17.04.2007
|
||||
* @since 2.0
|
||||
*/
|
||||
public class OptimizerFactory {
|
||||
|
||||
@ -150,22 +125,22 @@ public class OptimizerFactory {
|
||||
*
|
||||
* @param mu
|
||||
* @param lambda
|
||||
* @param plus if true this operator uses elitism otherwise a comma
|
||||
* strategy.
|
||||
* @param plus if true this operator uses elitism otherwise a comma
|
||||
* strategy.
|
||||
* @param mutationoperator
|
||||
* @param pm
|
||||
* @param crossoveroperator
|
||||
* @param pc
|
||||
* @param selection environmental selection operator
|
||||
* @param selection environmental selection operator
|
||||
* @param problem
|
||||
* @param listener
|
||||
* @return An optimization algorithm that employs an evolution strategy.
|
||||
*/
|
||||
public static final EvolutionStrategies createEvolutionStrategy(int mu,
|
||||
int lambda, boolean plus, InterfaceMutation mutationoperator,
|
||||
double pm, InterfaceCrossover crossoveroperator, double pc,
|
||||
InterfaceSelection selection, AbstractOptimizationProblem problem,
|
||||
InterfacePopulationChangedEventListener listener) {
|
||||
int lambda, boolean plus, InterfaceMutation mutationoperator,
|
||||
double pm, InterfaceCrossover crossoveroperator, double pc,
|
||||
InterfaceSelection selection, AbstractOptimizationProblem problem,
|
||||
InterfacePopulationChangedEventListener listener) {
|
||||
return createES(new EvolutionStrategies(mu, lambda, plus), mutationoperator, pm, crossoveroperator, pc, selection, problem, listener);
|
||||
}
|
||||
|
||||
@ -175,24 +150,24 @@ public class OptimizerFactory {
|
||||
*
|
||||
* @param mu
|
||||
* @param lambda
|
||||
* @param plus if true this operator uses elitism otherwise a comma
|
||||
* strategy.
|
||||
* @param plus if true this operator uses elitism otherwise a comma
|
||||
* strategy.
|
||||
* @param mutationoperator
|
||||
* @param pm
|
||||
* @param crossoveroperator
|
||||
* @param pc
|
||||
* @param incPopSizeFact factor by which to inrease lambda ro restart,
|
||||
* default is 2
|
||||
* @param stagThresh if the fitness changes below this value during a
|
||||
* stagnation phase, a restart is initiated
|
||||
* @param incPopSizeFact factor by which to inrease lambda ro restart,
|
||||
* default is 2
|
||||
* @param stagThresh if the fitness changes below this value during a
|
||||
* stagnation phase, a restart is initiated
|
||||
* @param problem
|
||||
* @param listener
|
||||
* @return An optimization algorithm that employs an IPOP-ES.
|
||||
*/
|
||||
public static final EvolutionStrategyIPOP createEvolutionStrategyIPOP(int mu,
|
||||
int lambda, boolean plus, InterfaceMutation mutationoperator,
|
||||
double pm, InterfaceCrossover crossoveroperator, double pc, double incPopSizeFact, double stagThresh,
|
||||
AbstractOptimizationProblem problem, InterfacePopulationChangedEventListener listener) {
|
||||
int lambda, boolean plus, InterfaceMutation mutationoperator,
|
||||
double pm, InterfaceCrossover crossoveroperator, double pc, double incPopSizeFact, double stagThresh,
|
||||
AbstractOptimizationProblem problem, InterfacePopulationChangedEventListener listener) {
|
||||
EvolutionStrategyIPOP esIPOP = (EvolutionStrategyIPOP) createES(new EvolutionStrategyIPOP(mu, lambda, plus), mutationoperator, pm, crossoveroperator, pc, new SelectBestIndividuals(), problem, listener);
|
||||
esIPOP.setIncPopSizeFact(incPopSizeFact);
|
||||
// esIPOP.setStagnationGenerations(stagTimeGens);
|
||||
@ -201,9 +176,9 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
private static final EvolutionStrategies createES(EvolutionStrategies theES, InterfaceMutation mutationoperator,
|
||||
double pm, InterfaceCrossover crossoveroperator, double pc,
|
||||
InterfaceSelection selection, AbstractOptimizationProblem problem,
|
||||
InterfacePopulationChangedEventListener listener) {
|
||||
double pm, InterfaceCrossover crossoveroperator, double pc,
|
||||
InterfaceSelection selection, AbstractOptimizationProblem problem,
|
||||
InterfacePopulationChangedEventListener listener) {
|
||||
|
||||
problem.initializeProblem();
|
||||
|
||||
@ -267,12 +242,12 @@ public class OptimizerFactory {
|
||||
* multi-objective selection method within the specific optimizer. This uses
|
||||
* a standard archiving strategy (NSGAII) and InformationRetrievalInserting.
|
||||
*
|
||||
* @param subOpt the specific optimizer to use
|
||||
* @param subOpt the specific optimizer to use
|
||||
* @param archiveSize maximum size of the archive
|
||||
* @param problem
|
||||
* @param listener
|
||||
* @return An optimization algorithm that employs a multi-objective
|
||||
* optimizer
|
||||
* optimizer
|
||||
*/
|
||||
public static MultiObjectiveEA createMultiObjectiveEA(
|
||||
InterfaceOptimizer subOpt, int archiveSize,
|
||||
@ -302,14 +277,14 @@ public class OptimizerFactory {
|
||||
* This method creates a multi-objective EA optimizer. Remember to set a
|
||||
* multi-objective selection method within the specific optimizer.
|
||||
*
|
||||
* @param subOpt the specific optimizer to use
|
||||
* @param archiving the archiving strategy collecting the pareto front
|
||||
* @param archiveSize maximum size of the archive
|
||||
* @param subOpt the specific optimizer to use
|
||||
* @param archiving the archiving strategy collecting the pareto front
|
||||
* @param archiveSize maximum size of the archive
|
||||
* @param infoRetrieval information retrieval strategy
|
||||
* @param problem
|
||||
* @param listener
|
||||
* @return An optimization algorithm that employs a multi-objective
|
||||
* optimizer
|
||||
* optimizer
|
||||
*/
|
||||
public static MultiObjectiveEA createMultiObjectiveEA(
|
||||
InterfaceOptimizer subOpt, InterfaceArchiving archiving,
|
||||
@ -352,28 +327,28 @@ public class OptimizerFactory {
|
||||
* This method creates a Hill Climber algorithm with a default fixed-size
|
||||
* mutation.
|
||||
*
|
||||
* @param pop The size of the population
|
||||
* @param problem The problem to be optimized
|
||||
* @param pop The size of the population
|
||||
* @param problem The problem to be optimized
|
||||
* @param listener
|
||||
* @return An optimization procedure that performs hill climbing.
|
||||
*/
|
||||
public static HillClimbing createHillClimber(int popSize,
|
||||
AbstractOptimizationProblem problem,
|
||||
InterfacePopulationChangedEventListener listener) {
|
||||
AbstractOptimizationProblem problem,
|
||||
InterfacePopulationChangedEventListener listener) {
|
||||
return createHillClimber(popSize, new MutateESFixedStepSize(0.2), problem, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method creates a Hill Climber algorithm.
|
||||
*
|
||||
* @param pop The size of the population
|
||||
* @param problem The problem to be optimized
|
||||
* @param pop The size of the population
|
||||
* @param problem The problem to be optimized
|
||||
* @param listener
|
||||
* @return An optimization procedure that performs hill climbing.
|
||||
*/
|
||||
public static HillClimbing createHillClimber(int popSize, InterfaceMutation mutator,
|
||||
AbstractOptimizationProblem problem,
|
||||
InterfacePopulationChangedEventListener listener) {
|
||||
AbstractOptimizationProblem problem,
|
||||
InterfacePopulationChangedEventListener listener) {
|
||||
|
||||
problem.initializeProblem();
|
||||
|
||||
@ -434,9 +409,9 @@ public class OptimizerFactory {
|
||||
* @param speedLim
|
||||
* @param listener
|
||||
* @param topology
|
||||
* @see ParticleSwarmOpimization
|
||||
* @return An optimization algorithm that performs particle swarm
|
||||
* optimization.
|
||||
* optimization.
|
||||
* @see ParticleSwarmOpimization
|
||||
*/
|
||||
public static ParticleSwarmOptimization createParticleSwarmOptimization(
|
||||
AbstractOptimizationProblem problem, int popsize, double phi1,
|
||||
@ -473,7 +448,7 @@ public class OptimizerFactory {
|
||||
*
|
||||
* @param problem
|
||||
* @param popsize
|
||||
* @param alpha The parameter for the linear cooling
|
||||
* @param alpha The parameter for the linear cooling
|
||||
* @param temperature The initial temperature
|
||||
* @param mut
|
||||
* @param listener
|
||||
@ -556,15 +531,16 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
// /////////////////////////// constructing a default OptimizerRunnable
|
||||
|
||||
/**
|
||||
* For an optimizer identifier, return the corresponding default parameter
|
||||
* set including initialization (thats why the problem is required).
|
||||
*
|
||||
* @param optType optimizer identifier
|
||||
* @param problem corresponding optimization problem
|
||||
* @param optType optimizer identifier
|
||||
* @param problem corresponding optimization problem
|
||||
*/
|
||||
public static OptimizationParameters getParams(final int optType,
|
||||
AbstractOptimizationProblem problem) {
|
||||
AbstractOptimizationProblem problem) {
|
||||
switch (optType) {
|
||||
case STD_ES:
|
||||
return standardES(problem);
|
||||
@ -625,8 +601,8 @@ public class OptimizerFactory {
|
||||
* @return a runnable optimizer
|
||||
*/
|
||||
public static OptimizerRunnable getOptRunnable(final int optType,
|
||||
AbstractOptimizationProblem problem, int fitCalls,
|
||||
String outputFilePrefix) {
|
||||
AbstractOptimizationProblem problem, int fitCalls,
|
||||
String outputFilePrefix) {
|
||||
return getOptRunnable(optType, problem, new EvaluationTerminator(fitCalls), outputFilePrefix);
|
||||
}
|
||||
|
||||
@ -644,8 +620,8 @@ public class OptimizerFactory {
|
||||
* @return a runnable optimizer
|
||||
*/
|
||||
public static OptimizerRunnable getOptRunnable(final int optType,
|
||||
AbstractOptimizationProblem problem, InterfaceTerminator terminator,
|
||||
String outputFilePrefix) {
|
||||
AbstractOptimizationProblem problem, InterfaceTerminator terminator,
|
||||
String outputFilePrefix) {
|
||||
OptimizerRunnable opt = null;
|
||||
OptimizationParameters params = getParams(optType, problem);
|
||||
if (params != null) {
|
||||
@ -672,19 +648,20 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
// /////////////////////////// constructing a default OptimizerRunnable
|
||||
|
||||
/**
|
||||
* Produce a runnable optimizer from a strategy identifier, a problem
|
||||
* instance and with the current static terminator in use. Output is written
|
||||
* to a file if the prefix String is given.
|
||||
*
|
||||
* @see #getOptRunnable(int, AbstractOptimizationProblem, int, String)
|
||||
* @param optType
|
||||
* @param problem
|
||||
* @param outputFilePrefix
|
||||
* @return a runnable optimizer
|
||||
* @see #getOptRunnable(int, AbstractOptimizationProblem, int, String)
|
||||
*/
|
||||
public static OptimizerRunnable getOptRunnable(final int optType,
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
return getOptRunnable(optType, problem, getTerminator(), outputFilePrefix);
|
||||
}
|
||||
|
||||
@ -713,6 +690,7 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
// /////////////////////// Creating default strategies
|
||||
|
||||
/**
|
||||
* Use lambda, default random seed and terminator to produce OptimizationParameters.
|
||||
*
|
||||
@ -721,19 +699,19 @@ public class OptimizerFactory {
|
||||
* @return
|
||||
*/
|
||||
public static OptimizationParameters makeESParams(EvolutionStrategies es,
|
||||
AbstractOptimizationProblem problem) {
|
||||
AbstractOptimizationProblem problem) {
|
||||
return makeParams(es, es.getLambda(), problem, randSeed, getTerminator());
|
||||
}
|
||||
|
||||
/**
|
||||
* Use default random seed and terminator for a parameter set.
|
||||
*
|
||||
* @see #makeParams(InterfaceOptimizer, int, AbstractOptimizationProblem,
|
||||
* long, InterfaceTerminator)
|
||||
* @param opt
|
||||
* @param popSize
|
||||
* @param problem
|
||||
* @return
|
||||
* @see #makeParams(InterfaceOptimizer, int, AbstractOptimizationProblem,
|
||||
* long, InterfaceTerminator)
|
||||
*/
|
||||
public static OptimizationParameters makeParams(InterfaceOptimizer opt, int popSize, AbstractOptimizationProblem problem) {
|
||||
return makeParams(opt, popSize, problem, randSeed, getTerminator());
|
||||
@ -742,12 +720,12 @@ public class OptimizerFactory {
|
||||
/**
|
||||
* Use default random seed and the population size of the optimizer.
|
||||
*
|
||||
* @see #makeParams(InterfaceOptimizer, int, AbstractOptimizationProblem,
|
||||
* long, InterfaceTerminator)
|
||||
* @param opt
|
||||
* @param popSize
|
||||
* @param problem
|
||||
* @return
|
||||
* @see #makeParams(InterfaceOptimizer, int, AbstractOptimizationProblem,
|
||||
* long, InterfaceTerminator)
|
||||
*/
|
||||
public static OptimizationParameters makeParams(InterfaceOptimizer opt, AbstractOptimizationProblem problem, InterfaceTerminator term) {
|
||||
return makeParams(opt, opt.getPopulation().getTargetSize(), problem, randSeed, term);
|
||||
@ -757,18 +735,18 @@ public class OptimizerFactory {
|
||||
* Set the population size, initialize the population and return a parameter
|
||||
* structure containing all given parts.
|
||||
*
|
||||
* @see #makeParams(InterfaceOptimizer, Population,
|
||||
* AbstractOptimizationProblem, long, InterfaceTerminator)
|
||||
* @param opt
|
||||
* @param popSize
|
||||
* @param problem
|
||||
* @param seed
|
||||
* @param term
|
||||
* @return
|
||||
* @see #makeParams(InterfaceOptimizer, Population,
|
||||
* AbstractOptimizationProblem, long, InterfaceTerminator)
|
||||
*/
|
||||
public static OptimizationParameters makeParams(InterfaceOptimizer opt,
|
||||
int popSize, AbstractOptimizationProblem problem, long seed,
|
||||
InterfaceTerminator term) {
|
||||
int popSize, AbstractOptimizationProblem problem, long seed,
|
||||
InterfaceTerminator term) {
|
||||
Population pop = new Population(popSize);
|
||||
RNG.setRandomSeed(seed);
|
||||
problem.initializePopulation(pop);
|
||||
@ -780,17 +758,17 @@ public class OptimizerFactory {
|
||||
* The result can be modified and then used to create an OptimizerRunnable,
|
||||
* which of course can simply be run.
|
||||
*
|
||||
* @see OptimizerRunnable
|
||||
* @param opt
|
||||
* @param pop
|
||||
* @param problem
|
||||
* @param seed
|
||||
* @param term
|
||||
* @return
|
||||
* @see OptimizerRunnable
|
||||
*/
|
||||
public static OptimizationParameters makeParams(InterfaceOptimizer opt,
|
||||
Population pop, AbstractOptimizationProblem problem, long seed,
|
||||
InterfaceTerminator term) {
|
||||
Population pop, AbstractOptimizationProblem problem, long seed,
|
||||
InterfaceTerminator term) {
|
||||
OptimizationParameters params = new OptimizationParameters();
|
||||
params.setProblem(problem);
|
||||
opt.setProblem(problem);
|
||||
@ -802,7 +780,7 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
public static OptimizerRunnable optimize(final int optType,
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
return optimize(getOptRunnable(optType, problem, outputFilePrefix));
|
||||
}
|
||||
|
||||
@ -860,7 +838,7 @@ public class OptimizerFactory {
|
||||
|
||||
// ///////////////////////////// Optimize a given parameter instance
|
||||
public static BitSet optimizeToBinary(OptimizationParameters params,
|
||||
String outputFilePrefix) {
|
||||
String outputFilePrefix) {
|
||||
OptimizerRunnable runnable = optimize(new OptimizerRunnable(params,
|
||||
outputFilePrefix));
|
||||
return runnable.getBinarySolution();
|
||||
@ -868,13 +846,13 @@ public class OptimizerFactory {
|
||||
|
||||
// ///////////////////////////// Optimize using a default strategy
|
||||
public static BitSet optimizeToBinary(final int optType,
|
||||
AbstractOptimizationProblem problem) {
|
||||
AbstractOptimizationProblem problem) {
|
||||
return optimizeToBinary(optType, problem, null);
|
||||
}
|
||||
|
||||
// ///////////////////////////// Optimize using a default strategy
|
||||
public static BitSet optimizeToBinary(final int optType,
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
OptimizerRunnable runnable = optimize(optType, problem,
|
||||
outputFilePrefix);
|
||||
return (runnable != null) ? runnable.getBinarySolution() : null;
|
||||
@ -887,7 +865,7 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
public static double[] optimizeToDouble(OptimizationParameters params,
|
||||
String outputFilePrefix) {
|
||||
String outputFilePrefix) {
|
||||
OptimizerRunnable runnable = optimize(new OptimizerRunnable(params,
|
||||
outputFilePrefix));
|
||||
return runnable.getDoubleSolution();
|
||||
@ -906,12 +884,12 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
public static double[] optimizeToDouble(final int optType,
|
||||
AbstractOptimizationProblem problem) {
|
||||
AbstractOptimizationProblem problem) {
|
||||
return optimizeToDouble(optType, problem, null);
|
||||
}
|
||||
|
||||
public static double[] optimizeToDouble(final int optType,
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
OptimizerRunnable runnable = optimize(optType, problem,
|
||||
outputFilePrefix);
|
||||
return (runnable != null) ? runnable.getDoubleSolution() : null;
|
||||
@ -929,19 +907,19 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
public static IndividualInterface optimizeToInd(OptimizationParameters params,
|
||||
String outputFilePrefix) {
|
||||
String outputFilePrefix) {
|
||||
OptimizerRunnable runnable = optimize(new OptimizerRunnable(params,
|
||||
outputFilePrefix));
|
||||
return runnable.getResult();
|
||||
}
|
||||
|
||||
public static IndividualInterface optimizeToInd(final int optType,
|
||||
AbstractOptimizationProblem problem) {
|
||||
AbstractOptimizationProblem problem) {
|
||||
return optimizeToInd(optType, problem, null);
|
||||
}
|
||||
|
||||
public static IndividualInterface optimizeToInd(final int optType,
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
OptimizerRunnable runnable = optimize(optType, problem,
|
||||
outputFilePrefix);
|
||||
return (runnable != null) ? runnable.getResult() : null;
|
||||
@ -953,14 +931,14 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
public static Population optimizeToPop(OptimizationParameters params,
|
||||
String outputFilePrefix) {
|
||||
String outputFilePrefix) {
|
||||
OptimizerRunnable runnable = optimize(new OptimizerRunnable(params,
|
||||
outputFilePrefix));
|
||||
return runnable.getResultPopulation();
|
||||
}
|
||||
|
||||
public static Population optimizeToPop(final int optType,
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
AbstractOptimizationProblem problem, String outputFilePrefix) {
|
||||
OptimizerRunnable runnable = optimize(optType, problem,
|
||||
outputFilePrefix);
|
||||
return (runnable != null) ? runnable.getResultPopulation() : null;
|
||||
@ -992,7 +970,7 @@ public class OptimizerFactory {
|
||||
* @return
|
||||
*/
|
||||
public static Population postProcess(OptimizerRunnable runnable, int steps,
|
||||
double sigma, int nBest) {
|
||||
double sigma, int nBest) {
|
||||
PostProcessParams ppp = new PostProcessParams(steps, sigma, nBest);
|
||||
return postProcess(runnable, ppp);
|
||||
}
|
||||
@ -1006,7 +984,7 @@ public class OptimizerFactory {
|
||||
* @return
|
||||
*/
|
||||
public static Population postProcess(OptimizerRunnable runnable,
|
||||
InterfacePostProcessParams ppp) {
|
||||
InterfacePostProcessParams ppp) {
|
||||
runnable.setDoRestart(true);
|
||||
runnable.setDoPostProcessOnly(true);
|
||||
runnable.setPostProcessingParams(ppp);
|
||||
@ -1017,7 +995,7 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
public static List<BitSet> postProcessBinVec(int steps, double sigma,
|
||||
int nBest) {
|
||||
int nBest) {
|
||||
return (lastRunnable != null) ? postProcessBinVec(lastRunnable,
|
||||
new PostProcessParams(steps, sigma, nBest)) : null;
|
||||
}
|
||||
@ -1029,7 +1007,7 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
public static List<BitSet> postProcessBinVec(OptimizerRunnable runnable,
|
||||
int steps, double sigma, int nBest) {
|
||||
int steps, double sigma, int nBest) {
|
||||
return postProcessBinVec(runnable, new PostProcessParams(steps, sigma,
|
||||
nBest));
|
||||
}
|
||||
@ -1043,7 +1021,7 @@ public class OptimizerFactory {
|
||||
* @return
|
||||
*/
|
||||
public static List<BitSet> postProcessBinVec(OptimizerRunnable runnable,
|
||||
InterfacePostProcessParams ppp) {
|
||||
InterfacePostProcessParams ppp) {
|
||||
Population resPop = postProcess(runnable, ppp);
|
||||
List<BitSet> ret = new ArrayList<BitSet>(resPop.size());
|
||||
for (Object o : resPop) {
|
||||
@ -1056,7 +1034,7 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
public static List<double[]> postProcessDblVec(int steps, double sigma,
|
||||
int nBest) {
|
||||
int nBest) {
|
||||
return (lastRunnable == null) ? null : postProcessDblVec(lastRunnable,
|
||||
new PostProcessParams(steps, sigma, nBest));
|
||||
}
|
||||
@ -1096,7 +1074,7 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
public static List<AbstractEAIndividual> postProcessIndVec(int steps,
|
||||
double sigma, int nBest) {
|
||||
double sigma, int nBest) {
|
||||
return (lastRunnable != null) ? postProcessIndVec(lastRunnable,
|
||||
new PostProcessParams(steps, sigma, nBest)) : null;
|
||||
}
|
||||
@ -1137,6 +1115,7 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
///////////////////////////// termination management
|
||||
|
||||
/**
|
||||
* Replace the current user-defined terminator by the given one.
|
||||
*
|
||||
@ -1154,7 +1133,7 @@ public class OptimizerFactory {
|
||||
* the new one is used without conjunction.
|
||||
*
|
||||
* @param newTerm a new InterfaceTerminator instance
|
||||
* @param bAnd indicate the boolean combination
|
||||
* @param bAnd indicate the boolean combination
|
||||
*/
|
||||
public static void addTerminator(InterfaceTerminator newTerm, boolean bAnd) {
|
||||
if (OptimizerFactory.userTerm == null) {
|
||||
@ -1185,11 +1164,12 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
///////////////////////////// default parameters
|
||||
|
||||
/**
|
||||
* Create a standard multi-start hill-climber parameter set with 50 initial
|
||||
* individuals.
|
||||
*
|
||||
* @return a standard multi-start hill-climber
|
||||
* @return a standard multi-start hill-climber
|
||||
*/
|
||||
public static OptimizationParameters hillClimbing(
|
||||
AbstractOptimizationProblem problem) {
|
||||
@ -1200,7 +1180,7 @@ public class OptimizerFactory {
|
||||
* Create a standard multi-start hill-climber parameter set with the given
|
||||
* number of individuals.
|
||||
*
|
||||
* @return a standard multi-start hill-climber
|
||||
* @return a standard multi-start hill-climber
|
||||
*/
|
||||
public static OptimizationParameters hillClimbing(
|
||||
AbstractOptimizationProblem problem, int popSize) {
|
||||
@ -1226,7 +1206,7 @@ public class OptimizerFactory {
|
||||
* @return
|
||||
*/
|
||||
public static OptimizationParameters createCbn(AbstractOptimizationProblem problem, InterfaceOptimizer opt,
|
||||
double clusterSigma, int minClustSize, int maxSpecSize, int haltingWindowLength, double haltingWindowEpsilon, int popSize) {
|
||||
double clusterSigma, int minClustSize, int maxSpecSize, int haltingWindowLength, double haltingWindowEpsilon, int popSize) {
|
||||
return createCbn(problem, opt, new ClusteringDensityBased(clusterSigma, minClustSize), maxSpecSize,
|
||||
new ClusteringDensityBased(clusterSigma, minClustSize), haltingWindowLength, haltingWindowEpsilon, popSize);
|
||||
}
|
||||
@ -1244,7 +1224,7 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
public static OptimizationParameters createCbnPSO(AbstractOptimizationProblem problem, double clusterSigma, int minClustSize,
|
||||
int maxSpecSize, int haltingWindowLength, double haltingWindowEpsilon, int popSize) {
|
||||
int maxSpecSize, int haltingWindowLength, double haltingWindowEpsilon, int popSize) {
|
||||
OptimizationParameters psoParams = standardPSO(problem);
|
||||
ParticleSwarmOptimization pso = (ParticleSwarmOptimization) psoParams.getOptimizer();
|
||||
ClusteringDensityBased clust = new ClusteringDensityBased(clusterSigma, minClustSize,
|
||||
@ -1266,8 +1246,8 @@ public class OptimizerFactory {
|
||||
* @return
|
||||
*/
|
||||
public static OptimizationParameters createCbn(AbstractOptimizationProblem problem, InterfaceOptimizer opt,
|
||||
InterfaceClustering clustDifferentiate, int maxSpecSize, InterfaceClustering clustMerge, int haltingWindowLength,
|
||||
double haltingWindowEpsilon, int popSize) {
|
||||
InterfaceClustering clustDifferentiate, int maxSpecSize, InterfaceClustering clustMerge, int haltingWindowLength,
|
||||
double haltingWindowEpsilon, int popSize) {
|
||||
ClusterBasedNichingEA cbn = new ClusterBasedNichingEA();
|
||||
cbn.setOptimizer(opt);
|
||||
cbn.setMergingCA(clustMerge);
|
||||
@ -1323,7 +1303,6 @@ public class OptimizerFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param problem
|
||||
* @return
|
||||
*/
|
||||
@ -1364,7 +1343,7 @@ public class OptimizerFactory {
|
||||
* @return
|
||||
*/
|
||||
public static OptimizationParameters clusteringHillClimbingNM(AbstractOptimizationProblem problem,
|
||||
int evalCycle, int popSize, double minImprovement, double sigmaClust) {
|
||||
int evalCycle, int popSize, double minImprovement, double sigmaClust) {
|
||||
return clusteringHillClimbing(problem, evalCycle, popSize, minImprovement,
|
||||
PostProcessMethod.nelderMead, 0.01, 0.00000001, sigmaClust);
|
||||
}
|
||||
@ -1637,7 +1616,7 @@ public class OptimizerFactory {
|
||||
* @return
|
||||
*/
|
||||
private static boolean assertIndyType(AbstractOptimizationProblem prob,
|
||||
Class<InterfaceESIndividual> cls) {
|
||||
Class<InterfaceESIndividual> cls) {
|
||||
return cls.isAssignableFrom(prob.getIndividualTemplate().getClass());
|
||||
}
|
||||
|
||||
|
@ -1,24 +1,20 @@
|
||||
package eva2;
|
||||
|
||||
import eva2.optimization.go.InterfaceOptimizationParameters;
|
||||
import eva2.optimization.stat.StatisticsDummy;
|
||||
import eva2.optimization.stat.InterfaceStatistics;
|
||||
import eva2.optimization.stat.StatisticsParameter;
|
||||
import eva2.optimization.stat.AbstractStatistics;
|
||||
import eva2.optimization.stat.StatisticsStandalone;
|
||||
import eva2.optimization.stat.InterfaceTextListener;
|
||||
import eva2.optimization.OptimizationStateListener;
|
||||
import eva2.optimization.individuals.IndividualInterface;
|
||||
import eva2.optimization.go.InterfaceOptimizationParameters;
|
||||
import eva2.optimization.go.InterfaceTerminator;
|
||||
import eva2.optimization.individuals.IndividualInterface;
|
||||
import eva2.optimization.individuals.InterfaceDataTypeBinary;
|
||||
import eva2.optimization.individuals.InterfaceDataTypeDouble;
|
||||
import eva2.optimization.individuals.InterfaceDataTypeInteger;
|
||||
import eva2.optimization.modules.OptimizationParameters;
|
||||
import eva2.optimization.modules.Processor;
|
||||
import eva2.optimization.operator.postprocess.InterfacePostProcessParams;
|
||||
import eva2.optimization.operator.postprocess.PostProcessParams;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.optimization.population.SolutionSet;
|
||||
import eva2.optimization.modules.OptimizationParameters;
|
||||
import eva2.optimization.modules.Processor;
|
||||
import eva2.optimization.stat.*;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.BitSet;
|
||||
@ -26,273 +22,274 @@ import java.util.BitSet;
|
||||
|
||||
/**
|
||||
* This Runnable class just encapsulates the Processor class with some simple ways to access a solution.
|
||||
*
|
||||
* @author mkron
|
||||
*
|
||||
* @author mkron
|
||||
*/
|
||||
public class OptimizerRunnable implements Runnable {
|
||||
private Processor proc;
|
||||
private boolean isFinished = false;
|
||||
private boolean doRestart = false; // indicate whether start or restart should be done --> whether pop will be reinitialized.
|
||||
private boolean postProcessOnly = false;
|
||||
private InterfaceTextListener listener = null;
|
||||
private String ident="OptimizerRunnable";
|
||||
private static int cntID = 0;
|
||||
private int rnblID = -1;
|
||||
|
||||
/**
|
||||
* Construct an OptimizerRunnable with given parameters and a StatisticsStandalone instance without restart,
|
||||
* meaning that the population will be initialized randomly.
|
||||
*
|
||||
* @param params
|
||||
* @param outputFilePrefix
|
||||
*/
|
||||
public OptimizerRunnable(OptimizationParameters params, String outputFilePrefix) {
|
||||
this(params, outputFilePrefix, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor assumes that DummyStatistics are enough. This saves time e.g. for small populations.
|
||||
* If restart is true, the processor will not reinitialize the population allowing search on predefined populations.
|
||||
*
|
||||
* @param params
|
||||
* @param restart
|
||||
*/
|
||||
public OptimizerRunnable(OptimizationParameters params, boolean restart) {
|
||||
this(params, new StatisticsDummy(), restart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an OptimizerRunnable with given parameters and a StatisticsStandalone instance with optional restart.
|
||||
* If restart is true, the processor will not reinitialize the population allowing search on predefined populations.
|
||||
* The outputFilePrefix may be null.
|
||||
*
|
||||
* @param params
|
||||
* @param outputFilePrefix
|
||||
* @param restart
|
||||
*/
|
||||
public OptimizerRunnable(OptimizationParameters params, String outputFilePrefix, boolean restart) {
|
||||
this(params, new StatisticsStandalone(outputFilePrefix), restart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an OptimizerRunnable with given parameters and statistics instance with optional restart.
|
||||
* If restart is true, the processor will not reinitialize the population allowing search on predefined populations.
|
||||
*
|
||||
* @param params
|
||||
* @param outputFilePrefix
|
||||
* @param restart
|
||||
*/
|
||||
public OptimizerRunnable(OptimizationParameters params, InterfaceStatistics stats, boolean restart) {
|
||||
rnblID = cntID;
|
||||
cntID++;
|
||||
private Processor proc;
|
||||
private boolean isFinished = false;
|
||||
private boolean doRestart = false; // indicate whether start or restart should be done --> whether pop will be reinitialized.
|
||||
private boolean postProcessOnly = false;
|
||||
private InterfaceTextListener listener = null;
|
||||
private String ident = "OptimizerRunnable";
|
||||
private static int cntID = 0;
|
||||
private int rnblID = -1;
|
||||
|
||||
proc = new Processor(stats, null, params);
|
||||
if (proc.getStatistics() instanceof AbstractStatistics) {
|
||||
((AbstractStatistics)proc.getStatistics()).setSaveParams(false);
|
||||
}
|
||||
doRestart = restart;
|
||||
}
|
||||
|
||||
public void setIdentifier(String id) {
|
||||
ident=id;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return ident;
|
||||
}
|
||||
|
||||
/**
|
||||
* A unique ID for the runnable.
|
||||
* @return
|
||||
*/
|
||||
public int getID() {
|
||||
return rnblID;
|
||||
}
|
||||
|
||||
public InterfaceOptimizationParameters getGOParams() {
|
||||
return proc.getGOParams();
|
||||
}
|
||||
|
||||
public InterfaceStatistics getStats() {
|
||||
return proc.getStatistics();
|
||||
}
|
||||
|
||||
public void setStats(InterfaceStatistics stats) {
|
||||
if (proc.isOptimizationRunning()) {
|
||||
throw new RuntimeException("Error - cannot change statistics instance during optimization.");
|
||||
}
|
||||
InterfaceOptimizationParameters params = proc.getGOParams();
|
||||
proc = new Processor(stats, null, params);
|
||||
if (proc.getStatistics() instanceof AbstractStatistics) {
|
||||
((AbstractStatistics)proc.getStatistics()).setSaveParams(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void setTextListener(InterfaceTextListener lsnr) {
|
||||
proc.getStatistics().removeTextListener(listener);
|
||||
this.listener = lsnr;
|
||||
if (listener != null) {
|
||||
proc.getStatistics().addTextListener(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void addOptimizationStateListener(OptimizationStateListener rsl) {
|
||||
if (proc != null) {
|
||||
proc.addListener(rsl);
|
||||
}
|
||||
/**
|
||||
* Construct an OptimizerRunnable with given parameters and a StatisticsStandalone instance without restart,
|
||||
* meaning that the population will be initialized randomly.
|
||||
*
|
||||
* @param params
|
||||
* @param outputFilePrefix
|
||||
*/
|
||||
public OptimizerRunnable(OptimizationParameters params, String outputFilePrefix) {
|
||||
this(params, outputFilePrefix, false);
|
||||
}
|
||||
|
||||
public void setDoRestart(boolean restart) {
|
||||
doRestart = restart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
isFinished = false;
|
||||
try {
|
||||
proc.setSaveParams(false);
|
||||
if (postProcessOnly) {
|
||||
proc.performPostProcessing((PostProcessParams)proc.getGOParams().getPostProcessParams(), listener);
|
||||
} else {
|
||||
if (doRestart) {
|
||||
proc.restartOptimization();
|
||||
}
|
||||
else {
|
||||
proc.startOptimization();
|
||||
}
|
||||
proc.runOptOnce();
|
||||
}
|
||||
} catch(Exception e) {
|
||||
proc.getStatistics().printToTextListener("Exception in OptimizeThread::run: " + e.getMessage() + "\n");
|
||||
StringWriter sw = new StringWriter();
|
||||
e.printStackTrace(new PrintWriter(sw));
|
||||
proc.getStatistics().printToTextListener(sw.toString());
|
||||
}
|
||||
isFinished = true;
|
||||
synchronized (this) {
|
||||
this.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
public void setDoPostProcessOnly(boolean poPO) {
|
||||
postProcessOnly = poPO;
|
||||
}
|
||||
|
||||
public boolean isFinished() {
|
||||
return isFinished;
|
||||
}
|
||||
|
||||
public boolean wasAborted() {
|
||||
return (proc!=null && (proc.wasAborted()));
|
||||
}
|
||||
|
||||
public void restartOpt() {
|
||||
proc.restartOptimization();
|
||||
}
|
||||
|
||||
public void stopOpt() {
|
||||
proc.stopOptimization();
|
||||
}
|
||||
|
||||
public IndividualInterface getResult() {
|
||||
return proc.getStatistics().getBestSolution();
|
||||
}
|
||||
|
||||
public Population getResultPopulation() {
|
||||
return proc.getResultPopulation();
|
||||
}
|
||||
|
||||
public SolutionSet getSolutionSet() {
|
||||
return (SolutionSet)proc.getGOParams().getOptimizer().getAllSolutions();
|
||||
}
|
||||
|
||||
public void setPostProcessingParams(InterfacePostProcessParams ppp) {
|
||||
proc.getGOParams().setPostProcessParams(ppp);
|
||||
}
|
||||
|
||||
public int getProgress() {
|
||||
return proc.getGOParams().getOptimizer().getPopulation().getFunctionCalls();
|
||||
}
|
||||
|
||||
public String terminatedBecause() {
|
||||
if (isFinished) {
|
||||
if (postProcessOnly) {
|
||||
return "Post processing finished";
|
||||
} else {
|
||||
InterfaceTerminator term = proc.getGOParams().getTerminator();
|
||||
return term.lastTerminationMessage();
|
||||
}
|
||||
} else {
|
||||
return "Not yet terminated";
|
||||
/**
|
||||
* This constructor assumes that DummyStatistics are enough. This saves time e.g. for small populations.
|
||||
* If restart is true, the processor will not reinitialize the population allowing search on predefined populations.
|
||||
*
|
||||
* @param params
|
||||
* @param restart
|
||||
*/
|
||||
public OptimizerRunnable(OptimizationParameters params, boolean restart) {
|
||||
this(params, new StatisticsDummy(), restart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an OptimizerRunnable with given parameters and a StatisticsStandalone instance with optional restart.
|
||||
* If restart is true, the processor will not reinitialize the population allowing search on predefined populations.
|
||||
* The outputFilePrefix may be null.
|
||||
*
|
||||
* @param params
|
||||
* @param outputFilePrefix
|
||||
* @param restart
|
||||
*/
|
||||
public OptimizerRunnable(OptimizationParameters params, String outputFilePrefix, boolean restart) {
|
||||
this(params, new StatisticsStandalone(outputFilePrefix), restart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an OptimizerRunnable with given parameters and statistics instance with optional restart.
|
||||
* If restart is true, the processor will not reinitialize the population allowing search on predefined populations.
|
||||
*
|
||||
* @param params
|
||||
* @param outputFilePrefix
|
||||
* @param restart
|
||||
*/
|
||||
public OptimizerRunnable(OptimizationParameters params, InterfaceStatistics stats, boolean restart) {
|
||||
rnblID = cntID;
|
||||
cntID++;
|
||||
|
||||
proc = new Processor(stats, null, params);
|
||||
if (proc.getStatistics() instanceof AbstractStatistics) {
|
||||
((AbstractStatistics) proc.getStatistics()).setSaveParams(false);
|
||||
}
|
||||
doRestart = restart;
|
||||
}
|
||||
|
||||
public void setIdentifier(String id) {
|
||||
ident = id;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return ident;
|
||||
}
|
||||
|
||||
/**
|
||||
* A unique ID for the runnable.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getID() {
|
||||
return rnblID;
|
||||
}
|
||||
|
||||
public InterfaceOptimizationParameters getGOParams() {
|
||||
return proc.getGOParams();
|
||||
}
|
||||
|
||||
public InterfaceStatistics getStats() {
|
||||
return proc.getStatistics();
|
||||
}
|
||||
|
||||
public void setStats(InterfaceStatistics stats) {
|
||||
if (proc.isOptimizationRunning()) {
|
||||
throw new RuntimeException("Error - cannot change statistics instance during optimization.");
|
||||
}
|
||||
InterfaceOptimizationParameters params = proc.getGOParams();
|
||||
proc = new Processor(stats, null, params);
|
||||
if (proc.getStatistics() instanceof AbstractStatistics) {
|
||||
((AbstractStatistics) proc.getStatistics()).setSaveParams(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void setTextListener(InterfaceTextListener lsnr) {
|
||||
proc.getStatistics().removeTextListener(listener);
|
||||
this.listener = lsnr;
|
||||
if (listener != null) {
|
||||
proc.getStatistics().addTextListener(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void addOptimizationStateListener(OptimizationStateListener rsl) {
|
||||
if (proc != null) {
|
||||
proc.addListener(rsl);
|
||||
}
|
||||
}
|
||||
|
||||
public void setDoRestart(boolean restart) {
|
||||
doRestart = restart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
isFinished = false;
|
||||
try {
|
||||
proc.setSaveParams(false);
|
||||
if (postProcessOnly) {
|
||||
proc.performPostProcessing((PostProcessParams) proc.getGOParams().getPostProcessParams(), listener);
|
||||
} else {
|
||||
if (doRestart) {
|
||||
proc.restartOptimization();
|
||||
} else {
|
||||
proc.startOptimization();
|
||||
}
|
||||
proc.runOptOnce();
|
||||
}
|
||||
}
|
||||
|
||||
public double[] getDoubleSolution() {
|
||||
IndividualInterface indy = getResult();
|
||||
if (indy instanceof InterfaceDataTypeDouble) {
|
||||
return ((InterfaceDataTypeDouble)indy).getDoubleData();
|
||||
} else {
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
proc.getStatistics().printToTextListener("Exception in OptimizeThread::run: " + e.getMessage() + "\n");
|
||||
StringWriter sw = new StringWriter();
|
||||
e.printStackTrace(new PrintWriter(sw));
|
||||
proc.getStatistics().printToTextListener(sw.toString());
|
||||
}
|
||||
isFinished = true;
|
||||
synchronized (this) {
|
||||
this.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
public void setDoPostProcessOnly(boolean poPO) {
|
||||
postProcessOnly = poPO;
|
||||
}
|
||||
|
||||
public boolean isFinished() {
|
||||
return isFinished;
|
||||
}
|
||||
|
||||
public boolean wasAborted() {
|
||||
return (proc != null && (proc.wasAborted()));
|
||||
}
|
||||
|
||||
public void restartOpt() {
|
||||
proc.restartOptimization();
|
||||
}
|
||||
|
||||
public void stopOpt() {
|
||||
proc.stopOptimization();
|
||||
}
|
||||
|
||||
public IndividualInterface getResult() {
|
||||
return proc.getStatistics().getBestSolution();
|
||||
}
|
||||
|
||||
public Population getResultPopulation() {
|
||||
return proc.getResultPopulation();
|
||||
}
|
||||
|
||||
public SolutionSet getSolutionSet() {
|
||||
return (SolutionSet) proc.getGOParams().getOptimizer().getAllSolutions();
|
||||
}
|
||||
|
||||
public void setPostProcessingParams(InterfacePostProcessParams ppp) {
|
||||
proc.getGOParams().setPostProcessParams(ppp);
|
||||
}
|
||||
|
||||
public int getProgress() {
|
||||
return proc.getGOParams().getOptimizer().getPopulation().getFunctionCalls();
|
||||
}
|
||||
|
||||
public String terminatedBecause() {
|
||||
if (isFinished) {
|
||||
if (postProcessOnly) {
|
||||
return "Post processing finished";
|
||||
} else {
|
||||
InterfaceTerminator term = proc.getGOParams().getTerminator();
|
||||
return term.lastTerminationMessage();
|
||||
}
|
||||
}
|
||||
|
||||
public BitSet getBinarySolution() {
|
||||
IndividualInterface indy = getResult();
|
||||
if (indy instanceof InterfaceDataTypeBinary) {
|
||||
return ((InterfaceDataTypeBinary)indy).getBinaryData();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public int[] getIntegerSolution() {
|
||||
IndividualInterface indy = getResult();
|
||||
if (indy instanceof InterfaceDataTypeInteger) {
|
||||
return ((InterfaceDataTypeInteger)indy).getIntegerData();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the verbosity level in the statistics module to the given value.
|
||||
*
|
||||
* @see StatsParameter
|
||||
* @param vLev
|
||||
*/
|
||||
public void setVerbosityLevel(int vLev) {
|
||||
if (vLev >= 0 && vLev < proc.getStatistics().getStatisticsParameter().getOutputVerbosity().getTags().length) {
|
||||
proc.getStatistics().getStatisticsParameter().getOutputVerbosity().setSelectedTag(vLev);
|
||||
} else {
|
||||
System.err.println("Invalid verbosity leveln in OptimizerRunnable.setVerbosityLevel!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the output direction in the statistics module.
|
||||
*
|
||||
* @see StatsParameter
|
||||
* @param outp
|
||||
*/
|
||||
public void setOutputTo(int outp) {
|
||||
((StatisticsParameter)proc.getStatistics().getStatisticsParameter()).setOutputTo(outp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the number of multiruns in the statistics module.
|
||||
* @param multis
|
||||
*/
|
||||
public void setMultiRuns(int multis) {
|
||||
((AbstractStatistics)proc.getStatistics()).getStatisticsParameter().setMultiRuns(multis);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate whether full stats should be printed as text (or only selected entries).
|
||||
* @see StatsParameter
|
||||
* @param addInfo
|
||||
*/
|
||||
public void setOutputFullStatsToText(boolean addInfo) {
|
||||
((AbstractStatistics)proc.getStatistics()).getStatisticsParameter().setOutputAllFieldsAsText(addInfo);
|
||||
}
|
||||
} else {
|
||||
return "Not yet terminated";
|
||||
}
|
||||
}
|
||||
|
||||
public double[] getDoubleSolution() {
|
||||
IndividualInterface indy = getResult();
|
||||
if (indy instanceof InterfaceDataTypeDouble) {
|
||||
return ((InterfaceDataTypeDouble) indy).getDoubleData();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public BitSet getBinarySolution() {
|
||||
IndividualInterface indy = getResult();
|
||||
if (indy instanceof InterfaceDataTypeBinary) {
|
||||
return ((InterfaceDataTypeBinary) indy).getBinaryData();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public int[] getIntegerSolution() {
|
||||
IndividualInterface indy = getResult();
|
||||
if (indy instanceof InterfaceDataTypeInteger) {
|
||||
return ((InterfaceDataTypeInteger) indy).getIntegerData();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the verbosity level in the statistics module to the given value.
|
||||
*
|
||||
* @param vLev
|
||||
* @see StatsParameter
|
||||
*/
|
||||
public void setVerbosityLevel(int vLev) {
|
||||
if (vLev >= 0 && vLev < proc.getStatistics().getStatisticsParameter().getOutputVerbosity().getTags().length) {
|
||||
proc.getStatistics().getStatisticsParameter().getOutputVerbosity().setSelectedTag(vLev);
|
||||
} else {
|
||||
System.err.println("Invalid verbosity leveln in OptimizerRunnable.setVerbosityLevel!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the output direction in the statistics module.
|
||||
*
|
||||
* @param outp
|
||||
* @see StatsParameter
|
||||
*/
|
||||
public void setOutputTo(int outp) {
|
||||
((StatisticsParameter) proc.getStatistics().getStatisticsParameter()).setOutputTo(outp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the number of multiruns in the statistics module.
|
||||
*
|
||||
* @param multis
|
||||
*/
|
||||
public void setMultiRuns(int multis) {
|
||||
((AbstractStatistics) proc.getStatistics()).getStatisticsParameter().setMultiRuns(multis);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate whether full stats should be printed as text (or only selected entries).
|
||||
*
|
||||
* @param addInfo
|
||||
* @see StatsParameter
|
||||
*/
|
||||
public void setOutputFullStatsToText(boolean addInfo) {
|
||||
((AbstractStatistics) proc.getStatistics()).getStatisticsParameter().setOutputAllFieldsAsText(addInfo);
|
||||
}
|
||||
}
|
@ -1,21 +1,19 @@
|
||||
package eva2.cli;
|
||||
|
||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||
import eva2.optimization.strategies.DifferentialEvolution;
|
||||
import eva2.optimization.strategies.InterfaceOptimizer;
|
||||
import eva2.util.annotation.Parameter;
|
||||
import org.apache.commons.cli.*;
|
||||
import eva2.optimization.OptimizationStateListener;
|
||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||
import eva2.optimization.strategies.InterfaceOptimizer;
|
||||
import org.apache.commons.cli.*;
|
||||
import org.reflections.Reflections;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class Main implements OptimizationStateListener {
|
||||
|
||||
|
||||
|
||||
private static Options createDefaultCommandLineOptions() {
|
||||
Options opt = new Options();
|
||||
|
||||
@ -56,15 +54,15 @@ public class Main implements OptimizationStateListener {
|
||||
//To change body of implemented methods use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
public static void printProgressBar(int percent){
|
||||
public static void printProgressBar(int percent) {
|
||||
StringBuilder bar = new StringBuilder("[");
|
||||
|
||||
for(int i = 0; i < 50; i++){
|
||||
if( i < (percent/2)){
|
||||
for (int i = 0; i < 50; i++) {
|
||||
if (i < (percent / 2)) {
|
||||
bar.append("=");
|
||||
}else if( i == (percent/2)){
|
||||
} else if (i == (percent / 2)) {
|
||||
bar.append(">");
|
||||
}else{
|
||||
} else {
|
||||
bar.append(" ");
|
||||
}
|
||||
}
|
||||
@ -78,9 +76,9 @@ public class Main implements OptimizationStateListener {
|
||||
|
||||
Reflections reflections = new Reflections("eva2.optimization.strategies");
|
||||
Set<Class<? extends InterfaceOptimizer>> optimizers = reflections.getSubTypesOf(InterfaceOptimizer.class);
|
||||
for(Class<? extends InterfaceOptimizer> optimizer : optimizers) {
|
||||
for (Class<? extends InterfaceOptimizer> optimizer : optimizers) {
|
||||
// We only want instantiable classes.ya
|
||||
if(optimizer.isInterface() || Modifier.isAbstract(optimizer.getModifiers())) {
|
||||
if (optimizer.isInterface() || Modifier.isAbstract(optimizer.getModifiers())) {
|
||||
continue;
|
||||
}
|
||||
optimizerList.put(optimizer.getSimpleName(), optimizer);
|
||||
@ -92,9 +90,9 @@ public class Main implements OptimizationStateListener {
|
||||
Map<String, Class<? extends InterfaceOptimizationProblem>> problemList = new TreeMap<String, Class<? extends InterfaceOptimizationProblem>>();
|
||||
Reflections reflections = new Reflections("eva2.optimization.problems");
|
||||
Set<Class<? extends InterfaceOptimizationProblem>> problems = reflections.getSubTypesOf(InterfaceOptimizationProblem.class);
|
||||
for(Class<? extends InterfaceOptimizationProblem> problem : problems) {
|
||||
for (Class<? extends InterfaceOptimizationProblem> problem : problems) {
|
||||
// We only want instantiable classes
|
||||
if(problem.isInterface() || Modifier.isAbstract(problem.getModifiers())) {
|
||||
if (problem.isInterface() || Modifier.isAbstract(problem.getModifiers())) {
|
||||
continue;
|
||||
}
|
||||
problemList.put(problem.getSimpleName(), problem);
|
||||
@ -130,9 +128,9 @@ public class Main implements OptimizationStateListener {
|
||||
/**
|
||||
* Process help and help sub pages.
|
||||
*/
|
||||
if(commandLine.hasOption("help")) {
|
||||
if (commandLine.hasOption("help")) {
|
||||
String helpOption = commandLine.getOptionValue("help");
|
||||
if("optimizer".equals(helpOption)) {
|
||||
if ("optimizer".equals(helpOption)) {
|
||||
showOptimizerHelp();
|
||||
} else if ("problem".equals(helpOption)) {
|
||||
showProblemHelp();
|
||||
@ -148,16 +146,16 @@ public class Main implements OptimizationStateListener {
|
||||
Map<String, Class<? extends InterfaceOptimizer>> optimizerList = createOptimizerList();
|
||||
|
||||
System.out.println("Available Optimizers:");
|
||||
for(String name : optimizerList.keySet()) {
|
||||
for (String name : optimizerList.keySet()) {
|
||||
System.out.printf("\t%s\n", name);
|
||||
}
|
||||
}
|
||||
|
||||
private static void showProblemHelp() {
|
||||
Map<String, Class<? extends InterfaceOptimizationProblem>> problemList= createProblemList();
|
||||
Map<String, Class<? extends InterfaceOptimizationProblem>> problemList = createProblemList();
|
||||
|
||||
System.out.println("Available Problems:");
|
||||
for(String name : problemList.keySet()) {
|
||||
for (String name : problemList.keySet()) {
|
||||
System.out.printf("\t%s\n", name);
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import eva2.gui.editor.GenericObjectEditor;
|
||||
* done at startup time and accelerates later reloading.
|
||||
*
|
||||
* @author mkron
|
||||
*
|
||||
*/
|
||||
public class ClassPreloader implements Runnable {
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class EvAComAdapter {
|
||||
public ModuleAdapter getModuleAdapter(String selectedModuleName, InterfaceOptimizationParameters goParams, String noGuiStatsFile) {
|
||||
ModuleAdapter newModuleAdapter;
|
||||
newModuleAdapter = getLocalMainAdapter().getModuleAdapter(selectedModuleName, goParams, noGuiStatsFile);
|
||||
|
||||
|
||||
return newModuleAdapter;
|
||||
}
|
||||
|
||||
|
@ -1,39 +1,43 @@
|
||||
package eva2.examples;
|
||||
|
||||
import eva2.OptimizerFactory;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.modules.OptimizationParameters;
|
||||
import eva2.optimization.operator.postprocess.PostProcessParams;
|
||||
import eva2.optimization.operator.terminators.EvaluationTerminator;
|
||||
import eva2.optimization.problems.FM0Problem;
|
||||
import eva2.optimization.modules.OptimizationParameters;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TestingCbnPostProc {
|
||||
public static void main(String[] args) {
|
||||
// a simple bimodal target function, two optima near (1.7,0) and (-1.44/0)
|
||||
FM0Problem fm0 = new FM0Problem();
|
||||
AbstractEAIndividual best;
|
||||
List<AbstractEAIndividual> ppSols;
|
||||
public static void main(String[] args) {
|
||||
// a simple bimodal target function, two optima near (1.7,0) and (-1.44/0)
|
||||
FM0Problem fm0 = new FM0Problem();
|
||||
AbstractEAIndividual best;
|
||||
List<AbstractEAIndividual> ppSols;
|
||||
|
||||
OptimizationParameters esParams = OptimizerFactory.standardCbnES(fm0);
|
||||
esParams.setTerminator(new EvaluationTerminator(2000));
|
||||
esParams.setSeed(0);
|
||||
best = (AbstractEAIndividual)OptimizerFactory.optimizeToInd(esParams, null);
|
||||
OptimizationParameters esParams = OptimizerFactory.standardCbnES(fm0);
|
||||
esParams.setTerminator(new EvaluationTerminator(2000));
|
||||
esParams.setSeed(0);
|
||||
best = (AbstractEAIndividual) OptimizerFactory.optimizeToInd(esParams, null);
|
||||
|
||||
System.out.println(esParams.getTerminator().lastTerminationMessage() + "\nFound solution: "
|
||||
+ AbstractEAIndividual.getDefaultDataString(best));
|
||||
System.out.println(esParams.getTerminator().lastTerminationMessage() + "\nFound solution: "
|
||||
+ AbstractEAIndividual.getDefaultDataString(best));
|
||||
|
||||
// post-process with clustering only
|
||||
ppSols = OptimizerFactory.postProcessIndVec(new PostProcessParams(0, 0.1, 5));
|
||||
System.out.println("After clustering: ");
|
||||
for (AbstractEAIndividual indy : ppSols) {
|
||||
System.out.println(AbstractEAIndividual.getDefaultDataString(indy));
|
||||
}
|
||||
// post-process with clustering only
|
||||
ppSols = OptimizerFactory.postProcessIndVec(new PostProcessParams(0, 0.1, 5));
|
||||
System.out.println("After clustering: ");
|
||||
for (AbstractEAIndividual indy : ppSols) {
|
||||
System.out.println(AbstractEAIndividual.getDefaultDataString(indy));
|
||||
}
|
||||
|
||||
// post-process with clustering and hill climbing
|
||||
ppSols = OptimizerFactory.postProcessIndVec(new PostProcessParams(1000, 0.1, 5));
|
||||
System.out.println("After clustering and local refinement: ");
|
||||
for (AbstractEAIndividual indy : ppSols) {
|
||||
System.out.println(AbstractEAIndividual.getDefaultDataString(indy));
|
||||
}
|
||||
};
|
||||
// post-process with clustering and hill climbing
|
||||
ppSols = OptimizerFactory.postProcessIndVec(new PostProcessParams(1000, 0.1, 5));
|
||||
System.out.println("After clustering and local refinement: ");
|
||||
for (AbstractEAIndividual indy : ppSols) {
|
||||
System.out.println(AbstractEAIndividual.getDefaultDataString(indy));
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
}
|
@ -1,37 +1,41 @@
|
||||
package eva2.examples;
|
||||
|
||||
import eva2.OptimizerFactory;
|
||||
import eva2.optimization.modules.OptimizationParameters;
|
||||
import eva2.optimization.operator.selection.SelectXProbRouletteWheel;
|
||||
import eva2.optimization.operator.terminators.EvaluationTerminator;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.optimization.problems.B1Problem;
|
||||
import eva2.optimization.strategies.GeneticAlgorithm;
|
||||
import eva2.optimization.modules.OptimizationParameters;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
public class TestingGAB1 {
|
||||
public static void main(String[] args) {
|
||||
B1Problem b1 = new B1Problem();
|
||||
BitSet sol;
|
||||
// default go-parameter instance with a GA
|
||||
OptimizationParameters gaParams = OptimizerFactory.standardGA(b1);
|
||||
// add an evaluation terminator
|
||||
gaParams.setTerminator(new EvaluationTerminator(1000));
|
||||
// set a specific random seed
|
||||
gaParams.setSeed(2342);
|
||||
public static void main(String[] args) {
|
||||
B1Problem b1 = new B1Problem();
|
||||
BitSet sol;
|
||||
// default go-parameter instance with a GA
|
||||
OptimizationParameters gaParams = OptimizerFactory.standardGA(b1);
|
||||
// add an evaluation terminator
|
||||
gaParams.setTerminator(new EvaluationTerminator(1000));
|
||||
// set a specific random seed
|
||||
gaParams.setSeed(2342);
|
||||
|
||||
// access the GA
|
||||
GeneticAlgorithm ga = (GeneticAlgorithm)gaParams.getOptimizer();
|
||||
ga.setElitism(false);
|
||||
ga.setParentSelection(new SelectXProbRouletteWheel()); // roulette wheel selection
|
||||
ga.setPopulation(new Population(150)); // population size 150
|
||||
// access the GA
|
||||
GeneticAlgorithm ga = (GeneticAlgorithm) gaParams.getOptimizer();
|
||||
ga.setElitism(false);
|
||||
ga.setParentSelection(new SelectXProbRouletteWheel()); // roulette wheel selection
|
||||
ga.setPopulation(new Population(150)); // population size 150
|
||||
|
||||
// run optimization and print intermediate results to a file with given prefix
|
||||
sol = OptimizerFactory.optimizeToBinary(gaParams, "ga-opt-results");
|
||||
System.out.println(OptimizerFactory.terminatedBecause() + "\nFound solution: ");
|
||||
for (int i=0; i<b1.getProblemDimension(); i++) {
|
||||
System.out.print(sol.get(i)+" ");
|
||||
// run optimization and print intermediate results to a file with given prefix
|
||||
sol = OptimizerFactory.optimizeToBinary(gaParams, "ga-opt-results");
|
||||
System.out.println(OptimizerFactory.terminatedBecause() + "\nFound solution: ");
|
||||
for (int i = 0; i < b1.getProblemDimension(); i++) {
|
||||
System.out.print(sol.get(i) + " ");
|
||||
}
|
||||
System.out.println();
|
||||
};
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -39,5 +39,6 @@ public class TestingPlusCmaEs {
|
||||
System.out.println(esParams.getTerminator().lastTerminationMessage() + "\nFound solution: "
|
||||
+ AbstractEAIndividual.getDefaultDataString(bestIndy));
|
||||
}
|
||||
;
|
||||
|
||||
;
|
||||
}
|
@ -6,12 +6,12 @@ package eva2.gui;
|
||||
|
||||
import eva2.tools.BasicResourceLoader;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.HyperlinkEvent;
|
||||
import javax.swing.event.HyperlinkListener;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
/**
|
||||
* @author becker
|
||||
|
@ -7,13 +7,8 @@ import eva2.tools.SelectedTag;
|
||||
import eva2.tools.StringTools;
|
||||
import eva2.tools.Tag;
|
||||
import eva2.util.annotation.Description;
|
||||
import eva2.util.annotation.Parameter;
|
||||
|
||||
import java.beans.BeanInfo;
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
import java.beans.MethodDescriptor;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.beans.*;
|
||||
import java.lang.reflect.Array;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
@ -641,7 +636,8 @@ public class BeanInspector {
|
||||
infoBf.append((String) ret);
|
||||
} else {
|
||||
Description description = obj.getClass().getAnnotation(Description.class);
|
||||
if(description != null) {;
|
||||
if (description != null) {
|
||||
;
|
||||
infoBf.append("\t");
|
||||
infoBf.append(description.text());
|
||||
}
|
||||
|
@ -15,14 +15,12 @@ import eva2.optimization.modules.ModuleAdapter;
|
||||
import eva2.optimization.stat.OptimizationJob;
|
||||
import eva2.tools.ToolBoxGui;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.Serializable;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JToolBar;
|
||||
|
||||
/**
|
||||
* Contains the GUI elements of start and stop buttons and optionally a help
|
||||
|
@ -8,14 +8,14 @@ package eva2.gui;
|
||||
import eva2.optimization.go.InterfaceNotifyOnInformers;
|
||||
import eva2.optimization.problems.InterfaceAdditionalPopulationInformer;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.basic.BasicButtonUI;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.basic.BasicButtonUI;
|
||||
|
||||
/**
|
||||
* Produces the main EvA2 frame and a tool bar instance. TODO This class should be removed
|
||||
|
@ -1,14 +1,14 @@
|
||||
package eva2.gui;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.JTree;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.TreeSelectionEvent;
|
||||
import javax.swing.event.TreeSelectionListener;
|
||||
import javax.swing.tree.DefaultTreeModel;
|
||||
import javax.swing.tree.TreePath;
|
||||
import java.awt.*;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyEditor;
|
||||
|
||||
/**
|
||||
* Listener for use with the EvATreeNode class. It implements both the tree selection listener
|
||||
|
@ -13,10 +13,7 @@ package eva2.gui;
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -13,9 +13,9 @@ package eva2.gui;
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
|
||||
import javax.swing.*;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import javax.swing.JComponent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -10,14 +10,10 @@ package eva2.gui;
|
||||
* $Author: streiche $
|
||||
*/
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Event;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.DefaultDesktopManager;
|
||||
import javax.swing.JInternalFrame;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -13,20 +13,15 @@ package eva2.gui;
|
||||
import eva2.EvAInfo;
|
||||
import eva2.tools.BasicResourceLoader;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import javax.swing.JEditorPane;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JViewport;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.HyperlinkEvent;
|
||||
import javax.swing.event.HyperlinkListener;
|
||||
import javax.swing.text.html.HTMLDocument;
|
||||
import javax.swing.text.html.HTMLFrameHyperlinkEvent;
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1,19 +1,7 @@
|
||||
package eva2.gui;
|
||||
/*
|
||||
* Title: EvA2
|
||||
* Description:
|
||||
* Copyright: Copyright (c) 2003
|
||||
* Company: University of Tuebingen, Computer Architecture
|
||||
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
|
||||
* @version: $Revision: 10 $
|
||||
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
|
||||
* $Author: streiche $
|
||||
*/
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.File;
|
||||
import javax.swing.JInternalFrame;
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JToolBar;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -10,16 +10,13 @@ package eva2.gui;
|
||||
* $Author: streiche $
|
||||
*/
|
||||
|
||||
import java.awt.Event;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JInternalFrame;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.InternalFrameAdapter;
|
||||
import javax.swing.event.InternalFrameEvent;
|
||||
import javax.swing.event.InternalFrameListener;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
public class JEFrame extends JInternalFrame {
|
||||
private boolean closeAllOnClose = false;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package eva2.gui;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.swing.JDesktopPane;
|
||||
/*
|
||||
* Title: EvA2
|
||||
* Description:
|
||||
|
@ -7,14 +7,13 @@ package eva2.gui;
|
||||
|
||||
import eva2.gui.editor.ComponentFilter;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Event;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.beans.PropertyVetoException;
|
||||
import java.util.Vector;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -2,11 +2,9 @@ package eva2.gui;
|
||||
|
||||
import eva2.tools.ToolBoxGui;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JToolBar;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
/**
|
||||
* @author becker
|
||||
|
@ -13,8 +13,8 @@ package eva2.gui;
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
|
||||
import java.io.File;
|
||||
import javax.swing.*;
|
||||
import java.io.File;
|
||||
|
||||
public class JExtFileChooser extends JFileChooser {
|
||||
private boolean overwriteWarning = true;
|
||||
|
@ -10,12 +10,9 @@ package eva2.gui;
|
||||
* $Author: streiche $
|
||||
*/
|
||||
|
||||
import java.beans.*;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.*;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -10,11 +10,11 @@ package eva2.gui;
|
||||
* $Author: streiche $
|
||||
*/
|
||||
|
||||
import java.awt.Insets;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -11,11 +11,10 @@ package eva2.gui;
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.optimization.stat.OptimizationJobList;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.beans.PropertyEditor;
|
||||
import java.beans.PropertyEditorManager;
|
||||
import java.io.Serializable;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
public class JParaPanel implements Serializable, PanelMaker {
|
||||
|
||||
|
@ -13,14 +13,21 @@ package eva2.gui;
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
|
||||
import java.awt.Event;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
import javax.swing.event.UndoableEditEvent;
|
||||
import javax.swing.event.UndoableEditListener;
|
||||
import javax.swing.text.DefaultEditorKit;
|
||||
import javax.swing.text.Keymap;
|
||||
import javax.swing.undo.CannotRedoException;
|
||||
import javax.swing.undo.CannotUndoException;
|
||||
import javax.swing.undo.UndoManager;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.*;
|
||||
import java.util.Hashtable;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
import javax.swing.text.*;
|
||||
import javax.swing.undo.*;
|
||||
|
||||
|
||||
public class JTextEditorInternalFrame extends JDocFrame {
|
||||
|
@ -5,18 +5,14 @@ package eva2.gui;
|
||||
* $ $Date: 2007-11-15 14:58:12 +0100 (Thu, 15 Nov 2007) $ $Author: mkron $
|
||||
*/
|
||||
|
||||
import eva2.EvAInfo;
|
||||
import eva2.optimization.tools.FileTools;
|
||||
import eva2.tools.BasicResourceLoader;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.Serializable;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import javax.swing.event.InternalFrameAdapter;
|
||||
import javax.swing.event.InternalFrameEvent;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -4,15 +4,13 @@
|
||||
*/
|
||||
package eva2.gui;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPopupMenu;
|
||||
|
||||
/**
|
||||
* This is a JLabel that shows the current logging level
|
||||
|
@ -1,17 +1,15 @@
|
||||
package eva2.gui;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Point;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import java.awt.*;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
/**
|
||||
* Simple logging panel that shows logs produced by EvA2
|
||||
@ -104,7 +102,7 @@ class LoggingHandler extends Handler {
|
||||
|
||||
@Override
|
||||
public void close() throws SecurityException {
|
||||
/*
|
||||
/*
|
||||
* Nothing to close
|
||||
*/
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
package eva2.gui;
|
||||
|
||||
import eva2.EvAInfo;
|
||||
import eva2.client.*;
|
||||
import eva2.client.ClassPreloader;
|
||||
import eva2.client.EvAComAdapter;
|
||||
import eva2.optimization.OptimizationStateListener;
|
||||
import eva2.optimization.go.InterfaceOptimizationParameters;
|
||||
import eva2.optimization.modules.AbstractModuleAdapter;
|
||||
@ -23,8 +24,9 @@ import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
import java.util.logging.ConsoleHandler;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@ -373,7 +375,6 @@ public class Main extends JFrame implements OptimizationStateListener {
|
||||
}
|
||||
|
||||
|
||||
|
||||
LoggingPanel logPanel = new LoggingPanel();
|
||||
logPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
|
||||
|
@ -6,8 +6,9 @@ import eva2.tools.BasicResourceLoader;
|
||||
import eva2.tools.EVAHELP;
|
||||
import eva2.tools.SerializedObject;
|
||||
import eva2.util.annotation.Description;
|
||||
import org.reflections.Reflections;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.basic.BasicComboBoxRenderer;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
@ -19,11 +20,11 @@ import java.beans.PropertyChangeSupport;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.basic.BasicComboBoxRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -352,9 +353,9 @@ public class OptimizationEditorPanel extends JPanel implements ItemListener {
|
||||
}
|
||||
|
||||
// If the globalInfo method doesn't exist try to use the Annotation
|
||||
if(tip == null || tip.isEmpty()) {
|
||||
if (tip == null || tip.isEmpty()) {
|
||||
Description description = instances.get(i).getAnnotation(Description.class);
|
||||
if(description != null) {
|
||||
if (description != null) {
|
||||
tip = description.text();
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package eva2.gui;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Simple helper interface.
|
||||
|
@ -1,9 +1,9 @@
|
||||
package eva2.gui;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.JCheckBox;
|
||||
|
||||
/**
|
||||
* A checkbox for boolean editors.
|
||||
|
@ -9,10 +9,9 @@ import eva2.EvAInfo;
|
||||
import eva2.tools.BasicResourceLoader;
|
||||
import eva2.tools.EVAHELP;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.JDialog;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -12,14 +12,9 @@ package eva2.gui;
|
||||
|
||||
import eva2.tools.EVAHELP;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -13,6 +13,11 @@ package eva2.gui;
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.tools.EVAHELP;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import javax.swing.table.TableCellEditor;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
import javax.swing.table.TableModel;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
@ -22,11 +27,6 @@ import java.lang.reflect.Method;
|
||||
import java.util.EventObject;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import javax.swing.table.TableCellEditor;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
import javax.swing.table.TableModel;
|
||||
|
||||
/**
|
||||
* There are some trick methods interpreted here. Check EvA2Notes.txt.
|
||||
|
@ -13,18 +13,12 @@ package eva2.gui;
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.Serializable;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -5,6 +5,9 @@ package eva2.gui;
|
||||
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $ $Author: streiche $
|
||||
*/
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import java.awt.event.FocusAdapter;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.KeyAdapter;
|
||||
@ -12,10 +15,6 @@ import java.awt.event.KeyEvent;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JSlider;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1,12 +1,11 @@
|
||||
package eva2.gui;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.FocusAdapter;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.KeyAdapter;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
/**
|
||||
* A text property editor view. Updates the editor on key release and lost focus
|
||||
|
@ -5,11 +5,8 @@ package eva2.gui;
|
||||
* $Date: 2007-05-04 14:22:16 +0200 (Fri, 04 May 2007) $ $Author: mkron $
|
||||
*/
|
||||
|
||||
import javax.swing.*;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.ComboBoxModel;
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.JComboBox;
|
||||
|
||||
public class PropertyValueSelector extends JComboBox {
|
||||
|
||||
|
@ -14,8 +14,8 @@ package eva2.gui;
|
||||
|
||||
import eva2.tools.BasicResourceLoader;
|
||||
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
class SplashScreen extends Frame {
|
||||
|
@ -1,23 +1,14 @@
|
||||
package eva2.gui.editor;
|
||||
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Rectangle;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -15,10 +15,15 @@ package eva2.gui.editor;
|
||||
|
||||
import eva2.gui.PropertyDialog;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.beans.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowListener;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
|
@ -2,11 +2,11 @@ package eva2.gui.editor;
|
||||
|
||||
import eva2.gui.PropertyValueSelector;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -4,6 +4,9 @@ import eva2.gui.*;
|
||||
import eva2.tools.EVAHELP;
|
||||
import eva2.tools.SerializedObject;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
@ -15,9 +18,6 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
|
||||
public class GenericArrayEditor extends JPanel implements PropertyEditor {
|
||||
|
||||
|
@ -2,27 +2,12 @@ package eva2.gui.editor;
|
||||
|
||||
import eva2.gui.PropertyDoubleArray;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.Window;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.FocusListener;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
/**
|
||||
* A simple focus listener with an object ID and callback.
|
||||
|
@ -2,12 +2,12 @@ package eva2.gui.editor;
|
||||
|
||||
import eva2.gui.PropertyEpsilonConstraint;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -2,12 +2,12 @@ package eva2.gui.editor;
|
||||
|
||||
import eva2.gui.PropertyEpsilonThreshold;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -2,6 +2,7 @@ package eva2.gui.editor;
|
||||
|
||||
import eva2.gui.PropertyFilePath;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
@ -9,10 +10,6 @@ import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
import java.io.File;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -2,6 +2,7 @@ package eva2.gui.editor;
|
||||
|
||||
import eva2.gui.PropertyIntArray;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
@ -10,7 +11,6 @@ import java.awt.event.KeyListener;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -4,18 +4,8 @@ import eva2.EvAInfo;
|
||||
import eva2.gui.OptimizationEditorPanel;
|
||||
import eva2.tools.ReflectPackage;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Rectangle;
|
||||
import java.beans.BeanInfo;
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
import java.beans.MethodDescriptor;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.beans.PropertyEditor;
|
||||
import java.awt.*;
|
||||
import java.beans.*;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
|
@ -9,31 +9,14 @@ import eva2.optimization.tools.AbstractObjectEditor;
|
||||
import eva2.optimization.tools.GeneralOptimizationEditorProperty;
|
||||
import eva2.tools.BasicResourceLoader;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.Toolkit;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -8,17 +8,8 @@ import eva2.optimization.tools.AbstractObjectEditor;
|
||||
import eva2.optimization.tools.GeneralOptimizationEditorProperty;
|
||||
import eva2.tools.BasicResourceLoader;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.Toolkit;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.KeyEvent;
|
||||
@ -27,16 +18,6 @@ import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -2,12 +2,15 @@ package eva2.gui.editor;
|
||||
|
||||
import eva2.gui.PropertyWeightedLPTchebycheff;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -3,8 +3,11 @@ package eva2.gui.editor;
|
||||
import eva2.gui.MultiLineString;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.beans.*;
|
||||
import java.awt.event.TextEvent;
|
||||
import java.awt.event.TextListener;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -13,9 +13,12 @@ package eva2.gui.editor;
|
||||
import eva2.gui.PropertySheetPanelStat;
|
||||
import eva2.optimization.stat.GenericStatistics;
|
||||
|
||||
import java.awt.*;
|
||||
import java.beans.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.beans.PropertyEditor;
|
||||
|
||||
public class StatisticsEditor implements PropertyEditor {
|
||||
|
||||
|
@ -16,13 +16,12 @@ import eva2.tools.BasicResourceLoader;
|
||||
import eva2.tools.SelectedTag;
|
||||
import eva2.tools.Tag;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Toolkit;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.beans.PropertyEditorManager;
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1,20 +1,9 @@
|
||||
package eva2.gui.plot;
|
||||
|
||||
|
||||
import eva2.tools.chart2d.DArray;
|
||||
import eva2.tools.chart2d.DBorder;
|
||||
import eva2.tools.chart2d.DComponent;
|
||||
import eva2.tools.chart2d.DIntDoubleMap;
|
||||
import eva2.tools.chart2d.DMeasures;
|
||||
import eva2.tools.chart2d.DPoint;
|
||||
import eva2.tools.chart2d.DPointIcon;
|
||||
import eva2.tools.chart2d.DPointSet;
|
||||
import eva2.tools.chart2d.DRectangle;
|
||||
import eva2.tools.chart2d.*;
|
||||
|
||||
import java.awt.BasicStroke;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Point;
|
||||
import java.awt.Stroke;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
package eva2.gui.plot;
|
||||
|
||||
import eva2.gui.plot.Graph;
|
||||
|
||||
/*
|
||||
* Title: EvA2
|
||||
* Description:
|
||||
|
@ -1,31 +1,15 @@
|
||||
package eva2.gui.plot;
|
||||
|
||||
import eva2.gui.*;
|
||||
import eva2.gui.Exp;
|
||||
import eva2.gui.InterfaceSelectablePointIcon;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.mocco.paretofrontviewer.InterfaceRefPointListener;
|
||||
import eva2.tools.ToolBoxGui;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconCircle;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconContent;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconCross;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconPoint;
|
||||
import eva2.tools.chart2d.Chart2DDPointIconText;
|
||||
import eva2.tools.chart2d.DArea;
|
||||
import eva2.tools.chart2d.DBorder;
|
||||
import eva2.tools.chart2d.DFunction;
|
||||
import eva2.tools.chart2d.DPoint;
|
||||
import eva2.tools.chart2d.DPointIcon;
|
||||
import eva2.tools.chart2d.DPointSet;
|
||||
import eva2.tools.chart2d.ScaledBorder;
|
||||
import eva2.tools.chart2d.*;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Point;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.PrintWriter;
|
||||
@ -35,9 +19,6 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPopupMenu;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -14,15 +14,10 @@ package eva2.gui.plot;
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
|
||||
import eva2.tools.chart2d.DArea;
|
||||
import eva2.tools.chart2d.DMeasures;
|
||||
import eva2.tools.chart2d.DPoint;
|
||||
import eva2.tools.chart2d.DPointIcon;
|
||||
import eva2.tools.chart2d.DPointSet;
|
||||
import eva2.tools.chart2d.*;
|
||||
import eva2.tools.math.Mathematics;
|
||||
|
||||
import java.awt.BasicStroke;
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -4,20 +4,11 @@ import eva2.tools.Pair;
|
||||
import eva2.tools.StringTools;
|
||||
import eva2.tools.chart2d.SlimRect;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
* A class representing the legend of a plot. It is created from a list of
|
||||
|
@ -7,25 +7,17 @@ import eva2.optimization.population.Population;
|
||||
import eva2.tools.BasicResourceLoader;
|
||||
import eva2.tools.chart2d.DPointSet;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.Formatter;
|
||||
import java.util.Locale;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.InternalFrameAdapter;
|
||||
import javax.swing.event.InternalFrameEvent;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.util.Formatter;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* ToDo: Rename to PlotWindow
|
||||
|
@ -1,17 +1,4 @@
|
||||
package eva2.gui.plot;
|
||||
/*
|
||||
* Title: EvA2
|
||||
* Description:
|
||||
* Copyright: Copyright (c) 2003
|
||||
* Company: University of Tuebingen, Computer Architecture
|
||||
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
|
||||
* @version: $Revision: 306 $
|
||||
* $Date: 2007-12-04 14:22:52 +0100 (Tue, 04 Dec 2007) $
|
||||
* $Author: mkron $
|
||||
*/
|
||||
/*==========================================================================*
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
|
||||
import eva2.optimization.problems.Interface2DBorderProblem;
|
||||
import eva2.optimization.problems.InterfaceFirstOrderDerivableProblem;
|
||||
@ -19,13 +6,8 @@ import eva2.tools.chart2d.DRectangle;
|
||||
import eva2.tools.diagram.ColorBarCalculator;
|
||||
import eva2.tools.math.Mathematics;
|
||||
|
||||
import java.awt.Color;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -4,13 +4,13 @@
|
||||
*/
|
||||
package eva2.gui.utils;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicTabbedPaneUI;
|
||||
import java.awt.*;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.awt.event.MouseMotionListener;
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicTabbedPaneUI;
|
||||
|
||||
public class CustomTabbedPaneUI extends BasicTabbedPaneUI {
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
package eva2.gui.utils;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.basic.BasicButtonUI;
|
||||
import java.awt.*;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.plaf.basic.BasicButtonUI;
|
||||
|
||||
public class VerticalButtonUI extends BasicButtonUI {
|
||||
|
||||
|
@ -21,8 +21,8 @@ import eva2.optimization.strategies.GeneticAlgorithm;
|
||||
import eva2.optimization.strategies.InterfaceOptimizer;
|
||||
import eva2.tools.math.RNG;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.List;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
@ -32,9 +32,8 @@ import java.net.InetAddress;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import javax.swing.*;
|
||||
|
||||
@eva2.util.annotation.Description(text="This is a simple example framework for Evolutionary Algorithms.")
|
||||
@eva2.util.annotation.Description(text = "This is a simple example framework for Evolutionary Algorithms.")
|
||||
public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopulationChangedEventListener, java.io.Serializable {
|
||||
|
||||
// Interface GUI Stuff
|
||||
|
@ -1,42 +1,23 @@
|
||||
package eva2.optimization.go;
|
||||
|
||||
import eva2.optimization.mocco.MOCCOState;
|
||||
import eva2.optimization.mocco.MOCCOParameterizeGDF;
|
||||
import eva2.optimization.mocco.MOCCOParameterizeTchebycheff;
|
||||
import eva2.optimization.mocco.MOCCOParameterizeRefPoint;
|
||||
import eva2.optimization.mocco.MOCCOChooseReferenceSolution;
|
||||
import eva2.optimization.mocco.MOCCOChooseReferencePoint;
|
||||
import eva2.optimization.mocco.MOCCOParameterizeSTEP;
|
||||
import eva2.optimization.mocco.MOCCOProblemInitialization;
|
||||
import eva2.optimization.mocco.MOCCOProblemRedefinition;
|
||||
import eva2.optimization.mocco.MOCCOParameterizeMO;
|
||||
import eva2.optimization.mocco.MOCCOChooseMOStrategy;
|
||||
import eva2.optimization.mocco.MOCCOInitialPopulationSize;
|
||||
import eva2.optimization.mocco.MOCCOParameterizeSO;
|
||||
import eva2.optimization.mocco.InterfaceProcessElement;
|
||||
import eva2.optimization.problems.InterfaceMultiObjectiveDeNovoProblem;
|
||||
import eva2.optimization.problems.AbstractMultiObjectiveOptimizationProblem;
|
||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||
import eva2.optimization.problems.TF1Problem;
|
||||
import eva2.optimization.problems.InterfaceOptimizationObjective;
|
||||
import eva2.gui.JParaPanel;
|
||||
import eva2.gui.PropertyDoubleArray;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
import eva2.optimization.mocco.*;
|
||||
import eva2.optimization.mocco.paretofrontviewer.MOCCOViewer;
|
||||
import eva2.optimization.operator.moso.InterfaceMOSOConverter;
|
||||
import eva2.optimization.operator.moso.MOSOWeightedFitness;
|
||||
import eva2.optimization.operator.terminators.EvaluationTerminator;
|
||||
import eva2.optimization.population.Population;
|
||||
import eva2.optimization.problems.*;
|
||||
import eva2.optimization.strategies.InterfaceOptimizer;
|
||||
import eva2.optimization.strategies.IslandModelEA;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.GridLayout;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -1,6 +1,6 @@
|
||||
package eva2.optimization.go;
|
||||
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* This is the 3rd version of SwingWorker (also known as
|
||||
|
@ -19,7 +19,7 @@ import java.util.Comparator;
|
||||
* @author mkron
|
||||
* @see #AbstractEAIndividual().isDominatingFitness(double[], double[])
|
||||
*/
|
||||
@eva2.util.annotation.Description(text="A comparator class for general EA individuals. Compares individuals based on their fitness in context of minimization.")
|
||||
@eva2.util.annotation.Description(text = "A comparator class for general EA individuals. Compares individuals based on their fitness in context of minimization.")
|
||||
public class AbstractEAIndividualComparator implements Comparator<Object>, Serializable {
|
||||
// flag whether a data field should be used.
|
||||
private String indyDataKey = "";
|
||||
|
@ -14,7 +14,7 @@ import java.util.BitSet;
|
||||
* This individual uses a real-valued genotype to code for binary values, either
|
||||
* by using a threshold value of by interpreting the double value as probability.
|
||||
*/
|
||||
@eva2.util.annotation.Description(text="This is an ES individual adopted to optimize binary values.")
|
||||
@eva2.util.annotation.Description(text = "This is an ES individual adopted to optimize binary values.")
|
||||
public class ESIndividualBinaryData extends AbstractEAIndividual implements InterfaceESIndividual, InterfaceDataTypeBinary, java.io.Serializable {
|
||||
|
||||
private BitSet m_Phenotype = new BitSet();
|
||||
|
@ -15,7 +15,7 @@ import eva2.util.annotation.Description;
|
||||
/**
|
||||
* This individual uses a real-valued genotype to code for double values.
|
||||
*/
|
||||
@Description(text="This is an ES individual suited to optimize double values.")
|
||||
@Description(text = "This is an ES individual suited to optimize double values.")
|
||||
public class ESIndividualDoubleData extends AbstractEAIndividual implements InterfaceESIndividual, InterfaceDataTypeDouble, java.io.Serializable {
|
||||
|
||||
private double[] genotype;
|
||||
|
@ -11,7 +11,7 @@ import eva2.util.annotation.Description;
|
||||
/**
|
||||
* This individual uses a real-valued genotype to code for integer values.
|
||||
*/
|
||||
@Description(text="This is an ES individual suited to optimize integer values.")
|
||||
@Description(text = "This is an ES individual suited to optimize integer values.")
|
||||
public class ESIndividualIntegerData extends AbstractEAIndividual implements InterfaceESIndividual, InterfaceDataTypeInteger, java.io.Serializable {
|
||||
|
||||
private double[] genotype;
|
||||
|
@ -12,7 +12,7 @@ import eva2.util.annotation.Description;
|
||||
* This individual uses a real-valued genotype to code for a permutations,
|
||||
* the sorting of the real-valued genotype gives the permutation.
|
||||
*/
|
||||
@Description(text="This is an ES individual suited to optimize permutations.")
|
||||
@Description(text = "This is an ES individual suited to optimize permutations.")
|
||||
public class ESIndividualPermutationData extends AbstractEAIndividual implements InterfaceESIndividual, InterfaceDataTypePermutation, java.io.Serializable {
|
||||
|
||||
private double[][] m_Genotype;
|
||||
|
@ -12,7 +12,7 @@ import java.util.BitSet;
|
||||
/**
|
||||
* This individual combines a binary and a real-valued phenotype.
|
||||
*/
|
||||
@Description(text="This is a mixed data type combining a BitSet and a real-valued vector.")
|
||||
@Description(text = "This is a mixed data type combining a BitSet and a real-valued vector.")
|
||||
public class GAESIndividualBinaryDoubleData extends AbstractEAIndividual implements InterfaceDataTypeBinary, InterfaceDataTypeDouble, java.io.Serializable {
|
||||
|
||||
private InterfaceDataTypeDouble m_Numbers = new ESIndividualDoubleData();
|
||||
|
@ -14,7 +14,7 @@ import java.util.BitSet;
|
||||
/**
|
||||
* This individual uses a binary genotype to code for binary values.
|
||||
*/
|
||||
@Description(text="This is a GA individual suited to optimize binary values.")
|
||||
@Description(text = "This is a GA individual suited to optimize binary values.")
|
||||
public class GAIndividualBinaryData extends AbstractEAIndividual implements InterfaceDataTypeBinary, InterfaceGAIndividual, java.io.Serializable {
|
||||
|
||||
protected BitSet m_Genotype = new BitSet();
|
||||
|
@ -17,7 +17,7 @@ import java.util.BitSet;
|
||||
* This individual uses a binary genotype to code for double values
|
||||
* using two alternative encodings.
|
||||
*/
|
||||
@Description(text="This is a GA individual suited to optimize double values.")
|
||||
@Description(text = "This is a GA individual suited to optimize double values.")
|
||||
public class GAIndividualDoubleData extends AbstractEAIndividual implements InterfaceGAIndividual, InterfaceDataTypeDouble, java.io.Serializable {
|
||||
|
||||
private double[] m_Phenotype;
|
||||
|
@ -16,7 +16,7 @@ import java.util.BitSet;
|
||||
* This individual uses a binary genotype to code for binary values using
|
||||
* two alternative encodings.
|
||||
*/
|
||||
@Description(text="This is a GA individual suited to optimize int values.")
|
||||
@Description(text = "This is a GA individual suited to optimize int values.")
|
||||
public class GAIndividualIntegerData extends AbstractEAIndividual implements InterfaceGAIndividual, InterfaceDataTypeInteger, java.io.Serializable {
|
||||
|
||||
private int[] phenotype;
|
||||
|
@ -18,7 +18,7 @@ import java.util.BitSet;
|
||||
* This individual uses a binary genotype to code for a tree-based representation
|
||||
* using a BNF grammar, see also Grammatical Evolution.
|
||||
*/
|
||||
@Description(text="This is a GE individual suited to optimize programs.")
|
||||
@Description(text = "This is a GE individual suited to optimize programs.")
|
||||
public class GEIndividualProgramData extends AbstractEAIndividual implements InterfaceGAIndividual, InterfaceDataTypeProgram, java.io.Serializable {
|
||||
|
||||
protected GPArea[] m_Area;
|
||||
|
@ -11,7 +11,7 @@ import eva2.util.annotation.Description;
|
||||
/**
|
||||
* This individual uses a integer genotype to code for integer values.
|
||||
*/
|
||||
@Description(text="This is a GI individual suited to optimize int values.")
|
||||
@Description(text = "This is a GI individual suited to optimize int values.")
|
||||
public class GIIndividualIntegerData extends AbstractEAIndividual implements InterfaceGIIndividual, InterfaceDataTypeInteger, java.io.Serializable {
|
||||
|
||||
private int[] m_Phenotype;
|
||||
|
@ -9,7 +9,7 @@ import eva2.util.annotation.Description;
|
||||
/**
|
||||
* This individual combines a binary and a real-valued phenotype.
|
||||
*/
|
||||
@Description(text="This is a mixed data type combining an integer vector with a permutation vector.")
|
||||
@Description(text = "This is a mixed data type combining an integer vector with a permutation vector.")
|
||||
public class GIOBGAIndividualIntegerPermutationData extends AbstractEAIndividual implements InterfaceDataTypeInteger, InterfaceDataTypePermutation, java.io.Serializable {
|
||||
|
||||
private InterfaceDataTypeInteger m_Integer = new GIIndividualIntegerData();
|
||||
|
@ -15,7 +15,7 @@ import eva2.util.annotation.Description;
|
||||
/**
|
||||
* This individual uses a tree-based genotype to code for program trees.
|
||||
*/
|
||||
@Description(text="This is a GP individual suited to optimize Koza style program trees.")
|
||||
@Description(text = "This is a GP individual suited to optimize Koza style program trees.")
|
||||
public class GPIndividualProgramData extends AbstractEAIndividual implements InterfaceGPIndividual, InterfaceDataTypeProgram, java.io.Serializable {
|
||||
|
||||
protected AbstractGPNode[] genotype;
|
||||
|
@ -14,7 +14,7 @@ import java.util.ArrayList;
|
||||
* This individual uses a permutation based genotype to code for
|
||||
* permutations.
|
||||
*/
|
||||
@Description(text="This is a GA individual coding permutations.")
|
||||
@Description(text = "This is a GA individual coding permutations.")
|
||||
public class OBGAIndividualPermutationData extends AbstractEAIndividual implements InterfaceDataTypePermutation, InterfaceOBGAIndividual, java.io.Serializable {
|
||||
|
||||
int[][] phenotype;
|
||||
|
@ -4,10 +4,10 @@ package eva2.optimization.mocco;
|
||||
import eva2.optimization.go.MOCCOStandalone;
|
||||
import eva2.tools.BasicResourceLoader;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -6,10 +6,10 @@ import eva2.optimization.mocco.paretofrontviewer.InterfaceRefPointListener;
|
||||
import eva2.optimization.problems.InterfaceMultiObjectiveDeNovoProblem;
|
||||
import eva2.optimization.problems.InterfaceOptimizationObjective;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -8,10 +8,10 @@ import eva2.optimization.population.Population;
|
||||
import eva2.optimization.problems.InterfaceMultiObjectiveDeNovoProblem;
|
||||
import eva2.optimization.problems.InterfaceOptimizationObjective;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -2,15 +2,10 @@ package eva2.optimization.mocco;
|
||||
|
||||
import eva2.optimization.go.MOCCOStandalone;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -1,9 +1,9 @@
|
||||
package eva2.optimization.mocco;
|
||||
|
||||
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.gui.PropertyDoubleArray;
|
||||
import eva2.gui.PropertyEditorProvider;
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.optimization.go.InterfaceTerminator;
|
||||
import eva2.optimization.go.MOCCOStandalone;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
@ -16,11 +16,11 @@ import eva2.optimization.strategies.InterfaceOptimizer;
|
||||
import eva2.optimization.tools.AbstractObjectEditor;
|
||||
import eva2.optimization.tools.GeneralOptimizationEditorProperty;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -1,8 +1,8 @@
|
||||
package eva2.optimization.mocco;
|
||||
|
||||
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.gui.PropertyEditorProvider;
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.optimization.go.InterfaceTerminator;
|
||||
import eva2.optimization.go.MOCCOStandalone;
|
||||
import eva2.optimization.population.Population;
|
||||
@ -12,10 +12,10 @@ import eva2.optimization.strategies.MultiObjectiveEA;
|
||||
import eva2.optimization.tools.AbstractObjectEditor;
|
||||
import eva2.optimization.tools.GeneralOptimizationEditorProperty;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -1,8 +1,8 @@
|
||||
package eva2.optimization.mocco;
|
||||
|
||||
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.gui.PropertyEditorProvider;
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.optimization.go.InterfaceTerminator;
|
||||
import eva2.optimization.go.MOCCOStandalone;
|
||||
import eva2.optimization.operator.migration.SOBestMigration;
|
||||
@ -13,15 +13,10 @@ import eva2.optimization.tools.AbstractObjectEditor;
|
||||
import eva2.optimization.tools.GeneralOptimizationEditorProperty;
|
||||
import eva2.tools.math.RNG;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -1,8 +1,8 @@
|
||||
package eva2.optimization.mocco;
|
||||
|
||||
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.gui.PropertyEditorProvider;
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.optimization.go.InterfaceTerminator;
|
||||
import eva2.optimization.go.MOCCOStandalone;
|
||||
import eva2.optimization.strategies.GeneticAlgorithm;
|
||||
@ -11,15 +11,10 @@ import eva2.optimization.strategies.MultiObjectiveEA;
|
||||
import eva2.optimization.tools.AbstractObjectEditor;
|
||||
import eva2.optimization.tools.GeneralOptimizationEditorProperty;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -1,9 +1,9 @@
|
||||
package eva2.optimization.mocco;
|
||||
|
||||
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.gui.PropertyDoubleArray;
|
||||
import eva2.gui.PropertyEditorProvider;
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.optimization.go.InterfaceTerminator;
|
||||
import eva2.optimization.go.MOCCOStandalone;
|
||||
import eva2.optimization.individuals.AbstractEAIndividual;
|
||||
@ -16,18 +16,11 @@ import eva2.optimization.strategies.InterfaceOptimizer;
|
||||
import eva2.optimization.tools.AbstractObjectEditor;
|
||||
import eva2.optimization.tools.GeneralOptimizationEditorProperty;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -1,8 +1,8 @@
|
||||
package eva2.optimization.mocco;
|
||||
|
||||
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.gui.PropertyEditorProvider;
|
||||
import eva2.gui.editor.GenericObjectEditor;
|
||||
import eva2.optimization.go.InterfaceTerminator;
|
||||
import eva2.optimization.go.MOCCOStandalone;
|
||||
import eva2.optimization.operator.migration.SOBestMigration;
|
||||
@ -13,17 +13,10 @@ import eva2.optimization.tools.AbstractObjectEditor;
|
||||
import eva2.optimization.tools.GeneralOptimizationEditorProperty;
|
||||
import eva2.tools.math.RNG;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -2,14 +2,10 @@ package eva2.optimization.mocco;
|
||||
|
||||
import eva2.optimization.go.MOCCOStandalone;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Font;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextArea;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -5,12 +5,10 @@ import eva2.optimization.go.MOCCOStandalone;
|
||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.ReflectPackage;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -5,10 +5,10 @@ import eva2.gui.JParaPanel;
|
||||
import eva2.optimization.go.MOCCOStandalone;
|
||||
import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
|
@ -12,7 +12,7 @@ import eva2.optimization.problems.InterfaceOptimizationProblem;
|
||||
import eva2.optimization.strategies.InterfaceOptimizer;
|
||||
import eva2.optimization.strategies.MultiObjectiveEA;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
|
@ -14,6 +14,7 @@ import eva2.tools.chart2d.DPoint;
|
||||
import eva2.tools.chart2d.DPointIcon;
|
||||
import eva2.tools.chart2d.ScaledBorder;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
@ -23,7 +24,6 @@ import java.io.FileOutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
/**
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user