Refactored "SetProblem" function to "setProblem". Coding Standards for the win.
This commit is contained in:
parent
ffd4041594
commit
ef36d09218
@ -127,7 +127,7 @@ public class OptimizerFactory {
|
|||||||
setTemplateOperators(problem, new NoMutation(), 0, new NoCrossover(), 0);
|
setTemplateOperators(problem, new NoMutation(), 0, new NoCrossover(), 0);
|
||||||
|
|
||||||
DifferentialEvolution de = new DifferentialEvolution();
|
DifferentialEvolution de = new DifferentialEvolution();
|
||||||
de.SetProblem(problem);
|
de.setProblem(problem);
|
||||||
de.getPopulation().setTargetSize(popsize);
|
de.getPopulation().setTargetSize(popsize);
|
||||||
de.setDEType(DETypeEnum.DE2_CurrentToBest);
|
de.setDEType(DETypeEnum.DE2_CurrentToBest);
|
||||||
de.setF(f);
|
de.setF(f);
|
||||||
@ -208,7 +208,7 @@ public class OptimizerFactory {
|
|||||||
// theES.setParentSelection(selection);
|
// theES.setParentSelection(selection);
|
||||||
// theES.setPartnerSelection(selection);
|
// theES.setPartnerSelection(selection);
|
||||||
theES.setEnvironmentSelection(selection);
|
theES.setEnvironmentSelection(selection);
|
||||||
theES.SetProblem(problem);
|
theES.setProblem(problem);
|
||||||
theES.init();
|
theES.init();
|
||||||
|
|
||||||
if (listener != null) listener.registerPopulationStateChanged(theES.getPopulation(), "");
|
if (listener != null) listener.registerPopulationStateChanged(theES.getPopulation(), "");
|
||||||
@ -240,7 +240,7 @@ public class OptimizerFactory {
|
|||||||
setTemplateOperators(problem, mut, pm, cross, pc);
|
setTemplateOperators(problem, mut, pm, cross, pc);
|
||||||
|
|
||||||
GeneticAlgorithm ga = new GeneticAlgorithm();
|
GeneticAlgorithm ga = new GeneticAlgorithm();
|
||||||
ga.SetProblem(problem);
|
ga.setProblem(problem);
|
||||||
ga.getPopulation().setTargetSize(popsize);
|
ga.getPopulation().setTargetSize(popsize);
|
||||||
ga.setParentSelection(select);
|
ga.setParentSelection(select);
|
||||||
ga.setPartnerSelection(select);
|
ga.setPartnerSelection(select);
|
||||||
@ -308,7 +308,7 @@ public class OptimizerFactory {
|
|||||||
InterfacePopulationChangedEventListener listener) {
|
InterfacePopulationChangedEventListener listener) {
|
||||||
|
|
||||||
problem.initProblem();
|
problem.initProblem();
|
||||||
subOpt.SetProblem(problem);
|
subOpt.setProblem(problem);
|
||||||
|
|
||||||
return new MultiObjectiveEA(subOpt, archiving, archiveSize,
|
return new MultiObjectiveEA(subOpt, archiving, archiveSize,
|
||||||
infoRetrieval, problem);
|
infoRetrieval, problem);
|
||||||
@ -376,7 +376,7 @@ public class OptimizerFactory {
|
|||||||
hc.setIdentifier("-"+popSize+"-"+mutator.getStringRepresentation());
|
hc.setIdentifier("-"+popSize+"-"+mutator.getStringRepresentation());
|
||||||
hc.getPopulation().setTargetSize(popSize);
|
hc.getPopulation().setTargetSize(popSize);
|
||||||
hc.addPopulationChangedEventListener(listener);
|
hc.addPopulationChangedEventListener(listener);
|
||||||
hc.SetProblem(problem);
|
hc.setProblem(problem);
|
||||||
hc.init();
|
hc.init();
|
||||||
|
|
||||||
if (listener != null) listener.registerPopulationStateChanged(hc.getPopulation(), "");
|
if (listener != null) listener.registerPopulationStateChanged(hc.getPopulation(), "");
|
||||||
@ -403,7 +403,7 @@ public class OptimizerFactory {
|
|||||||
MonteCarloSearch mc = new MonteCarloSearch();
|
MonteCarloSearch mc = new MonteCarloSearch();
|
||||||
mc.getPopulation().setTargetSize(popsize);
|
mc.getPopulation().setTargetSize(popsize);
|
||||||
mc.addPopulationChangedEventListener(listener);
|
mc.addPopulationChangedEventListener(listener);
|
||||||
mc.SetProblem(problem);
|
mc.setProblem(problem);
|
||||||
mc.init();
|
mc.init();
|
||||||
|
|
||||||
if (listener != null) listener.registerPopulationStateChanged(mc.getPopulation(), "");
|
if (listener != null) listener.registerPopulationStateChanged(mc.getPopulation(), "");
|
||||||
@ -437,7 +437,7 @@ public class OptimizerFactory {
|
|||||||
setTemplateOperators(problem, new NoMutation(), 0, new NoCrossover(), 0);
|
setTemplateOperators(problem, new NoMutation(), 0, new NoCrossover(), 0);
|
||||||
|
|
||||||
ParticleSwarmOptimization pso = new ParticleSwarmOptimization();
|
ParticleSwarmOptimization pso = new ParticleSwarmOptimization();
|
||||||
pso.SetProblem(problem);
|
pso.setProblem(problem);
|
||||||
pso.getPopulation().setTargetSize(popsize);
|
pso.getPopulation().setTargetSize(popsize);
|
||||||
pso.setPhi1(phi1);
|
pso.setPhi1(phi1);
|
||||||
pso.setPhi2(phi2);
|
pso.setPhi2(phi2);
|
||||||
@ -480,7 +480,7 @@ public class OptimizerFactory {
|
|||||||
SimulatedAnnealing sa = new SimulatedAnnealing();
|
SimulatedAnnealing sa = new SimulatedAnnealing();
|
||||||
sa.setAlpha(alpha);
|
sa.setAlpha(alpha);
|
||||||
sa.setInitialTemperature(temperature);
|
sa.setInitialTemperature(temperature);
|
||||||
sa.SetProblem(problem);
|
sa.setProblem(problem);
|
||||||
sa.getPopulation().setTargetSize(popsize);
|
sa.getPopulation().setTargetSize(popsize);
|
||||||
sa.addPopulationChangedEventListener(listener);
|
sa.addPopulationChangedEventListener(listener);
|
||||||
sa.init();
|
sa.init();
|
||||||
@ -518,7 +518,7 @@ public class OptimizerFactory {
|
|||||||
pbil.setPositiveSamples(positiveSamples);
|
pbil.setPositiveSamples(positiveSamples);
|
||||||
|
|
||||||
pbil.addPopulationChangedEventListener(listener);
|
pbil.addPopulationChangedEventListener(listener);
|
||||||
pbil.SetProblem(problem);
|
pbil.setProblem(problem);
|
||||||
|
|
||||||
if (listener != null) listener.registerPopulationStateChanged(pbil.getPopulation(), "");
|
if (listener != null) listener.registerPopulationStateChanged(pbil.getPopulation(), "");
|
||||||
|
|
||||||
@ -763,7 +763,7 @@ public class OptimizerFactory {
|
|||||||
InterfaceTerminator term) {
|
InterfaceTerminator term) {
|
||||||
GOParameters params = new GOParameters();
|
GOParameters params = new GOParameters();
|
||||||
params.setProblem(problem);
|
params.setProblem(problem);
|
||||||
opt.SetProblem(problem);
|
opt.setProblem(problem);
|
||||||
opt.setPopulation(pop);
|
opt.setPopulation(pop);
|
||||||
params.setOptimizer(opt);
|
params.setOptimizer(opt);
|
||||||
params.setTerminator(term);
|
params.setTerminator(term);
|
||||||
@ -1340,7 +1340,7 @@ public class OptimizerFactory {
|
|||||||
AbstractOptimizationProblem problem, int evalCycle, int popSize, double minImprovement,
|
AbstractOptimizationProblem problem, int evalCycle, int popSize, double minImprovement,
|
||||||
PostProcessMethod method, double hcInitialStep, double hcStepThresh, double sigmaClust) {
|
PostProcessMethod method, double hcInitialStep, double hcStepThresh, double sigmaClust) {
|
||||||
ClusteringHillClimbing chc = new ClusteringHillClimbing();
|
ClusteringHillClimbing chc = new ClusteringHillClimbing();
|
||||||
chc.SetProblem(problem);
|
chc.setProblem(problem);
|
||||||
|
|
||||||
chc.setEvalCycle(evalCycle);
|
chc.setEvalCycle(evalCycle);
|
||||||
chc.setInitialPopSize(popSize);
|
chc.setInitialPopSize(popSize);
|
||||||
|
@ -312,7 +312,7 @@ public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopu
|
|||||||
((GAIndividualDoubleData)tmpIndy).setMutationProbability(1.0);
|
((GAIndividualDoubleData)tmpIndy).setMutationProbability(1.0);
|
||||||
((F1Problem)problem).setEAIndividual(tmpIndy);
|
((F1Problem)problem).setEAIndividual(tmpIndy);
|
||||||
//((FGRNInferringProblem)this.m_Problem).setStructreSkelInterval(1);
|
//((FGRNInferringProblem)this.m_Problem).setStructreSkelInterval(1);
|
||||||
this.m_GO.getOptimizer().SetProblem(problem);
|
this.m_GO.getOptimizer().setProblem(problem);
|
||||||
this.m_GO.getOptimizer().addPopulationChangedEventListener(this);
|
this.m_GO.getOptimizer().addPopulationChangedEventListener(this);
|
||||||
this.doWork();
|
this.doWork();
|
||||||
break;
|
break;
|
||||||
@ -329,7 +329,7 @@ public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopu
|
|||||||
((F1Problem)problem).setEAIndividual(tmpIndy);
|
((F1Problem)problem).setEAIndividual(tmpIndy);
|
||||||
//((FGRNInferringProblem)this.m_Problem).setUseHEigenMatrix(true);
|
//((FGRNInferringProblem)this.m_Problem).setUseHEigenMatrix(true);
|
||||||
//((FGRNInferringProblem)this.m_Problem).setUseOnlyPositiveNumbers(true);
|
//((FGRNInferringProblem)this.m_Problem).setUseOnlyPositiveNumbers(true);
|
||||||
this.m_GO.getOptimizer().SetProblem(problem);
|
this.m_GO.getOptimizer().setProblem(problem);
|
||||||
this.m_GO.getOptimizer().addPopulationChangedEventListener(this);
|
this.m_GO.getOptimizer().addPopulationChangedEventListener(this);
|
||||||
this.doWork();
|
this.doWork();
|
||||||
break;
|
break;
|
||||||
@ -375,7 +375,7 @@ public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopu
|
|||||||
|
|
||||||
// init problem
|
// init problem
|
||||||
this.m_GO.getProblem().initProblem();
|
this.m_GO.getProblem().initProblem();
|
||||||
this.m_GO.getOptimizer().SetProblem(this.m_GO.getProblem());
|
this.m_GO.getOptimizer().setProblem(this.m_GO.getProblem());
|
||||||
// int optimizer and population
|
// int optimizer and population
|
||||||
//this.m_GO.getOptimizer().init();
|
//this.m_GO.getOptimizer().init();
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ public class MOCCOStandalone implements InterfaceGOStandalone, InterfacePopulati
|
|||||||
if (this.m_JFrame != null) {
|
if (this.m_JFrame != null) {
|
||||||
}
|
}
|
||||||
this.m_StillWorking = true;
|
this.m_StillWorking = true;
|
||||||
this.m_State.m_Optimizer.SetProblem(this.m_State.m_CurrentProblem);
|
this.m_State.m_Optimizer.setProblem(this.m_State.m_CurrentProblem);
|
||||||
if (this.m_Debug) System.out.println(""+this.m_State.m_Optimizer.getStringRepresentation());
|
if (this.m_Debug) System.out.println(""+this.m_State.m_Optimizer.getStringRepresentation());
|
||||||
this.m_State.m_CurrentProblem.evaluate(this.m_State.m_Optimizer.getPopulation());
|
this.m_State.m_CurrentProblem.evaluate(this.m_State.m_Optimizer.getPopulation());
|
||||||
this.m_State.m_Optimizer.getPopulation().SetFunctionCalls(0);
|
this.m_State.m_Optimizer.getPopulation().SetFunctionCalls(0);
|
||||||
|
@ -125,7 +125,7 @@ public class MOCCOParameterizeGDF extends MOCCOPhase implements InterfaceProcess
|
|||||||
gbc.gridwidth = 1;
|
gbc.gridwidth = 1;
|
||||||
this.m_EOpt = new GeneralGOEProperty();
|
this.m_EOpt = new GeneralGOEProperty();
|
||||||
this.m_Opt = new GeneticAlgorithm();
|
this.m_Opt = new GeneticAlgorithm();
|
||||||
this.m_Opt.SetProblem(this.m_Mocco.m_State.m_CurrentProblem);
|
this.m_Opt.setProblem(this.m_Mocco.m_State.m_CurrentProblem);
|
||||||
this.m_Mocco.m_State.m_Optimizer = this.m_Opt;
|
this.m_Mocco.m_State.m_Optimizer = this.m_Opt;
|
||||||
this.m_EOpt.m_Name = "Island Model EA";
|
this.m_EOpt.m_Name = "Island Model EA";
|
||||||
try {
|
try {
|
||||||
@ -217,7 +217,7 @@ public class MOCCOParameterizeGDF extends MOCCOPhase implements InterfaceProcess
|
|||||||
PropertyDoubleArray da = new PropertyDoubleArray(w);
|
PropertyDoubleArray da = new PropertyDoubleArray(w);
|
||||||
wf.setOutputDimension(da.getNumRows());
|
wf.setOutputDimension(da.getNumRows());
|
||||||
wf.setWeights(da);
|
wf.setWeights(da);
|
||||||
m_Opt.SetProblem(m_Mocco.m_State.m_CurrentProblem);
|
m_Opt.setProblem(m_Mocco.m_State.m_CurrentProblem);
|
||||||
m_Mocco.m_State.m_Optimizer = m_Opt;
|
m_Mocco.m_State.m_Optimizer = m_Opt;
|
||||||
m_Mocco.m_JPanelControl.removeAll();
|
m_Mocco.m_JPanelControl.removeAll();
|
||||||
m_Mocco.m_JPanelControl.validate();
|
m_Mocco.m_JPanelControl.validate();
|
||||||
|
@ -138,7 +138,7 @@ public class MOCCOParameterizeMO extends MOCCOPhase implements InterfaceProcessE
|
|||||||
//m_Mocco.m_State.m_Optimizer = (InterfaceOptimizer)m_Optimizer.clone();
|
//m_Mocco.m_State.m_Optimizer = (InterfaceOptimizer)m_Optimizer.clone();
|
||||||
m_Mocco.m_JPanelControl.removeAll();
|
m_Mocco.m_JPanelControl.removeAll();
|
||||||
m_Mocco.m_JPanelParameters.removeAll();
|
m_Mocco.m_JPanelParameters.removeAll();
|
||||||
m_Mocco.m_State.m_Optimizer.SetProblem(m_Mocco.m_State.m_CurrentProblem);
|
m_Mocco.m_State.m_Optimizer.setProblem(m_Mocco.m_State.m_CurrentProblem);
|
||||||
Population pop = m_Mocco.m_State.m_Optimizer.getPopulation();
|
Population pop = m_Mocco.m_State.m_Optimizer.getPopulation();
|
||||||
pop.clear();
|
pop.clear();
|
||||||
if (pop.getArchive() != null) pop.getArchive().clear();
|
if (pop.getArchive() != null) pop.getArchive().clear();
|
||||||
|
@ -137,7 +137,7 @@ public class MOCCOParameterizeRefPoint extends MOCCOPhase implements InterfacePr
|
|||||||
this.m_Island.setMigrationRate(2);
|
this.m_Island.setMigrationRate(2);
|
||||||
this.m_Island.setMigrationStrategy(new SOBestMigration());
|
this.m_Island.setMigrationStrategy(new SOBestMigration());
|
||||||
this.m_Island.setNumberLocalCPUs(this.m_Perturbations);
|
this.m_Island.setNumberLocalCPUs(this.m_Perturbations);
|
||||||
this.m_Island.SetProblem(this.m_Mocco.m_State.m_CurrentProblem);
|
this.m_Island.setProblem(this.m_Mocco.m_State.m_CurrentProblem);
|
||||||
this.m_Mocco.m_State.m_Optimizer = this.m_Island;
|
this.m_Mocco.m_State.m_Optimizer = this.m_Island;
|
||||||
this.m_EIMEA.m_Name = "Island Model EA";
|
this.m_EIMEA.m_Name = "Island Model EA";
|
||||||
try {
|
try {
|
||||||
@ -234,7 +234,7 @@ public class MOCCOParameterizeRefPoint extends MOCCOPhase implements InterfacePr
|
|||||||
// m_Island.setNumberLocalCPUs(m_Perturbations);
|
// m_Island.setNumberLocalCPUs(m_Perturbations);
|
||||||
// }
|
// }
|
||||||
m_Mocco.m_State.m_Optimizer = m_Island;
|
m_Mocco.m_State.m_Optimizer = m_Island;
|
||||||
m_Mocco.m_State.m_Optimizer.SetProblem(m_Mocco.m_State.m_CurrentProblem);
|
m_Mocco.m_State.m_Optimizer.setProblem(m_Mocco.m_State.m_CurrentProblem);
|
||||||
m_Island.init();
|
m_Island.init();
|
||||||
double[] tmpD;
|
double[] tmpD;
|
||||||
MOSOLpMetric[] tmpLPs = new MOSOLpMetric[m_Perturbations];
|
MOSOLpMetric[] tmpLPs = new MOSOLpMetric[m_Perturbations];
|
||||||
|
@ -66,7 +66,7 @@ public class MOCCOParameterizeSO extends MOCCOPhase implements InterfaceProcessE
|
|||||||
"a Genetic Algorithms, please parameterize accordingly.",
|
"a Genetic Algorithms, please parameterize accordingly.",
|
||||||
"Warning", JOptionPane.WARNING_MESSAGE);
|
"Warning", JOptionPane.WARNING_MESSAGE);
|
||||||
this.m_Mocco.m_State.m_Optimizer = new GeneticAlgorithm();
|
this.m_Mocco.m_State.m_Optimizer = new GeneticAlgorithm();
|
||||||
this.m_Mocco.m_State.m_Optimizer.SetProblem(this.m_Mocco.m_State.m_CurrentProblem);
|
this.m_Mocco.m_State.m_Optimizer.setProblem(this.m_Mocco.m_State.m_CurrentProblem);
|
||||||
}
|
}
|
||||||
this.m_Mocco.m_JPanelParameters.removeAll();
|
this.m_Mocco.m_JPanelParameters.removeAll();
|
||||||
this.m_Mocco.m_JPanelParameters.setLayout(new BorderLayout());
|
this.m_Mocco.m_JPanelParameters.setLayout(new BorderLayout());
|
||||||
|
@ -167,7 +167,7 @@ public class MOCCOParameterizeSTEP extends MOCCOPhase implements InterfaceProces
|
|||||||
gbc.gridwidth = 1;
|
gbc.gridwidth = 1;
|
||||||
this.m_EOpt = new GeneralGOEProperty();
|
this.m_EOpt = new GeneralGOEProperty();
|
||||||
this.m_Opt = new GeneticAlgorithm();
|
this.m_Opt = new GeneticAlgorithm();
|
||||||
this.m_Opt.SetProblem(this.m_Mocco.m_State.m_CurrentProblem);
|
this.m_Opt.setProblem(this.m_Mocco.m_State.m_CurrentProblem);
|
||||||
this.m_Mocco.m_State.m_Optimizer = this.m_Opt;
|
this.m_Mocco.m_State.m_Optimizer = this.m_Opt;
|
||||||
this.m_EOpt.m_Name = "Island Model EA";
|
this.m_EOpt.m_Name = "Island Model EA";
|
||||||
try {
|
try {
|
||||||
@ -294,7 +294,7 @@ public class MOCCOParameterizeSTEP extends MOCCOPhase implements InterfaceProces
|
|||||||
double[] setWeights = mapObjectives2Fitness(weights);
|
double[] setWeights = mapObjectives2Fitness(weights);
|
||||||
PropertyDoubleArray da = new PropertyDoubleArray(setWeights);
|
PropertyDoubleArray da = new PropertyDoubleArray(setWeights);
|
||||||
wf.setWeights(da);
|
wf.setWeights(da);
|
||||||
m_Opt.SetProblem(m_Mocco.m_State.m_CurrentProblem);
|
m_Opt.setProblem(m_Mocco.m_State.m_CurrentProblem);
|
||||||
m_Mocco.m_State.m_Optimizer = m_Opt;
|
m_Mocco.m_State.m_Optimizer = m_Opt;
|
||||||
m_Mocco.m_JPanelControl.removeAll();
|
m_Mocco.m_JPanelControl.removeAll();
|
||||||
m_Mocco.m_JPanelControl.validate();
|
m_Mocco.m_JPanelControl.validate();
|
||||||
|
@ -114,7 +114,7 @@ public class MOCCOParameterizeTchebycheff extends MOCCOPhase implements Interfac
|
|||||||
this.m_Island.setMigrationRate(2);
|
this.m_Island.setMigrationRate(2);
|
||||||
this.m_Island.setMigrationStrategy(new SOBestMigration());
|
this.m_Island.setMigrationStrategy(new SOBestMigration());
|
||||||
this.m_Island.setNumberLocalCPUs(this.m_Perturbations);
|
this.m_Island.setNumberLocalCPUs(this.m_Perturbations);
|
||||||
this.m_Island.SetProblem(this.m_Mocco.m_State.m_CurrentProblem);
|
this.m_Island.setProblem(this.m_Mocco.m_State.m_CurrentProblem);
|
||||||
this.m_Mocco.m_State.m_Optimizer = this.m_Island;
|
this.m_Mocco.m_State.m_Optimizer = this.m_Island;
|
||||||
this.m_EIMEA.m_Name = "Island Model EA";
|
this.m_EIMEA.m_Name = "Island Model EA";
|
||||||
try {
|
try {
|
||||||
@ -241,7 +241,7 @@ public class MOCCOParameterizeTchebycheff extends MOCCOPhase implements Interfac
|
|||||||
// m_Island.setNumberLocalCPUs(m_Perturbations);
|
// m_Island.setNumberLocalCPUs(m_Perturbations);
|
||||||
// }
|
// }
|
||||||
m_Mocco.m_State.m_Optimizer = m_Island;
|
m_Mocco.m_State.m_Optimizer = m_Island;
|
||||||
m_Mocco.m_State.m_Optimizer.SetProblem(m_Mocco.m_State.m_CurrentProblem);
|
m_Mocco.m_State.m_Optimizer.setProblem(m_Mocco.m_State.m_CurrentProblem);
|
||||||
m_Island.init();
|
m_Island.init();
|
||||||
double[] tmpD;
|
double[] tmpD;
|
||||||
double sum = 0, l = 0, u = 1;
|
double sum = 0, l = 0, u = 1;
|
||||||
|
@ -56,14 +56,14 @@ public class MOCCOState {
|
|||||||
this.m_BackupOptimizer = null;
|
this.m_BackupOptimizer = null;
|
||||||
}
|
}
|
||||||
this.m_Optimizer.setPopulation(pop);
|
this.m_Optimizer.setPopulation(pop);
|
||||||
this.m_Optimizer.SetProblem(this.m_CurrentProblem);
|
this.m_Optimizer.setProblem(this.m_CurrentProblem);
|
||||||
this.m_CurrentProblem.evaluate(this.m_Optimizer.getPopulation());
|
this.m_CurrentProblem.evaluate(this.m_Optimizer.getPopulation());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void makeBackup() {
|
public void makeBackup() {
|
||||||
this.m_BackupProblem = (InterfaceOptimizationProblem)this.m_CurrentProblem.clone();
|
this.m_BackupProblem = (InterfaceOptimizationProblem)this.m_CurrentProblem.clone();
|
||||||
this.m_BackupOptimizer = (InterfaceOptimizer)this.m_Optimizer.clone();
|
this.m_BackupOptimizer = (InterfaceOptimizer)this.m_Optimizer.clone();
|
||||||
this.m_BackupOptimizer.SetProblem(null);
|
this.m_BackupOptimizer.setProblem(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addPopulation2History(Population pop) {
|
public void addPopulation2History(Population pop) {
|
||||||
|
@ -201,7 +201,7 @@ public class MOClusteringSeparation implements InterfaceMigration, java.io.Seria
|
|||||||
// else out += "\n Using objective space.";
|
// else out += "\n Using objective space.";
|
||||||
// System.out.println(""+out);
|
// System.out.println(""+out);
|
||||||
// }
|
// }
|
||||||
islands[i].SetProblem(prob);
|
islands[i].setProblem(prob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ public class MOConeSeparation implements InterfaceMigration, java.io.Serializabl
|
|||||||
|
|
||||||
((AbstractMultiObjectiveOptimizationProblem)prob).m_AreaConst4Parallelization.add(b);
|
((AbstractMultiObjectiveOptimizationProblem)prob).m_AreaConst4Parallelization.add(b);
|
||||||
}
|
}
|
||||||
islands[i].SetProblem(prob);
|
islands[i].setProblem(prob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -360,7 +360,7 @@ public class MOConeSeparation implements InterfaceMigration, java.io.Serializabl
|
|||||||
((AbstractMultiObjectiveOptimizationProblem)prob).m_AreaConst4Parallelization.add(sts);
|
((AbstractMultiObjectiveOptimizationProblem)prob).m_AreaConst4Parallelization.add(sts);
|
||||||
((AbstractMultiObjectiveOptimizationProblem)prob).m_AreaConst4Parallelization.add(bts);
|
((AbstractMultiObjectiveOptimizationProblem)prob).m_AreaConst4Parallelization.add(bts);
|
||||||
}
|
}
|
||||||
islands[i].SetProblem(prob);
|
islands[i].setProblem(prob);
|
||||||
// if (true) {
|
// if (true) {
|
||||||
// prob.evaluate(newIPOP[i]);
|
// prob.evaluate(newIPOP[i]);
|
||||||
// System.out.println("Invalid Individual in Island "+i+" ("+newIPOP[i].size()+"): ");
|
// System.out.println("Invalid Individual in Island "+i+" ("+newIPOP[i].size()+"): ");
|
||||||
|
@ -207,7 +207,7 @@ public class MOXMeansSeparation implements InterfaceMigration, java.io.Serializa
|
|||||||
// else out += "\n Using objective space.";
|
// else out += "\n Using objective space.";
|
||||||
// System.out.println(""+out);
|
// System.out.println(""+out);
|
||||||
// }
|
// }
|
||||||
islands[i].SetProblem(prob);
|
islands[i].setProblem(prob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,7 @@ public class PostProcess {
|
|||||||
public static void processWithHC(Population pop, AbstractOptimizationProblem problem, InterfaceTerminator term, InterfaceMutation mute) {
|
public static void processWithHC(Population pop, AbstractOptimizationProblem problem, InterfaceTerminator term, InterfaceMutation mute) {
|
||||||
HillClimbing hc = new HillClimbing();
|
HillClimbing hc = new HillClimbing();
|
||||||
// HC depends heavily on the selected mutation operator!
|
// HC depends heavily on the selected mutation operator!
|
||||||
hc.SetProblem(problem);
|
hc.setProblem(problem);
|
||||||
mute.init(problem.getIndividualTemplate(), problem);
|
mute.init(problem.getIndividualTemplate(), problem);
|
||||||
hc.SetMutationOperator(mute);
|
hc.SetMutationOperator(mute);
|
||||||
if (pop.size() != pop.getTargetSize()) {
|
if (pop.size() != pop.getTargetSize()) {
|
||||||
@ -405,7 +405,7 @@ public class PostProcess {
|
|||||||
public static int processWithGDA(Population pop, AbstractOptimizationProblem problem, InterfaceTerminator term, int baseEvals, double minStepSize, double maxStepSize) {
|
public static int processWithGDA(Population pop, AbstractOptimizationProblem problem, InterfaceTerminator term, int baseEvals, double minStepSize, double maxStepSize) {
|
||||||
GradientDescentAlgorithm gda = new GradientDescentAlgorithm();
|
GradientDescentAlgorithm gda = new GradientDescentAlgorithm();
|
||||||
gda.setAdaptStepSizeLocally(true);
|
gda.setAdaptStepSizeLocally(true);
|
||||||
gda.SetProblem(problem);
|
gda.setProblem(problem);
|
||||||
gda.setLocalMinStepSize(minStepSize);
|
gda.setLocalMinStepSize(minStepSize);
|
||||||
gda.setLocalMaxStepSize(maxStepSize);
|
gda.setLocalMaxStepSize(maxStepSize);
|
||||||
gda.setRecovery(false);
|
gda.setRecovery(false);
|
||||||
|
@ -111,7 +111,7 @@ public class F2Problem extends AbstractProblemDoubleOffset implements InterfaceL
|
|||||||
|
|
||||||
private void initLS() {
|
private void initLS() {
|
||||||
localSearchOptimizer = new GradientDescentAlgorithm();
|
localSearchOptimizer = new GradientDescentAlgorithm();
|
||||||
localSearchOptimizer.SetProblem(this);
|
localSearchOptimizer.setProblem(this);
|
||||||
localSearchOptimizer.init();
|
localSearchOptimizer.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ implements InterfaceMultimodalProblem, InterfaceFirstOrderDerivableProblem, Inte
|
|||||||
|
|
||||||
private void initLS() {
|
private void initLS() {
|
||||||
localSearchOptimizer = new GradientDescentAlgorithm();
|
localSearchOptimizer = new GradientDescentAlgorithm();
|
||||||
localSearchOptimizer.SetProblem(this);
|
localSearchOptimizer.setProblem(this);
|
||||||
localSearchOptimizer.init();
|
localSearchOptimizer.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -599,7 +599,7 @@ public class BOA implements InterfaceOptimizer, java.io.Serializable {
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
this.problem = (AbstractOptimizationProblem) problem;
|
this.problem = (AbstractOptimizationProblem) problem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -731,7 +731,7 @@ public class BinaryScatterSearch implements InterfaceOptimizer, java.io.Serializ
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
this.problem = (AbstractOptimizationProblem) problem;
|
this.problem = (AbstractOptimizationProblem) problem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,8 +67,8 @@ public class CBNPSO extends ClusterBasedNichingEA implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
super.SetProblem(problem);
|
super.setProblem(problem);
|
||||||
if (problem instanceof AbstractProblemDouble) {
|
if (problem instanceof AbstractProblemDouble) {
|
||||||
AbstractProblemDouble dblProb = ((AbstractProblemDouble)problem);
|
AbstractProblemDouble dblProb = ((AbstractProblemDouble)problem);
|
||||||
adaptMinMaxSwarmSizeByDim(dblProb);
|
adaptMinMaxSwarmSizeByDim(dblProb);
|
||||||
|
@ -238,7 +238,7 @@ public class CHCAdaptiveSearchAlgorithm implements InterfaceOptimizer, java.io.S
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -972,9 +972,9 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
this.m_Optimizer.setProblem(this.m_Problem);
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
return this.m_Problem;
|
return this.m_Problem;
|
||||||
|
@ -107,7 +107,7 @@ InterfaceOptimizer, Serializable, InterfaceAdditionalPopulationInformer {
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -665,7 +665,7 @@ public class DifferentialEvolution implements InterfaceOptimizer, java.io.Serial
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = (AbstractOptimizationProblem)problem;
|
this.m_Problem = (AbstractOptimizationProblem)problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -487,8 +487,8 @@ public class DynamicParticleSwarmOptimization extends ParticleSwarmOptimization
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
super.SetProblem(problem);
|
super.setProblem(problem);
|
||||||
if (problem instanceof AbstractOptimizationProblem) {
|
if (problem instanceof AbstractOptimizationProblem) {
|
||||||
((AbstractOptimizationProblem)problem).informAboutOptimizer(this);
|
((AbstractOptimizationProblem)problem).informAboutOptimizer(this);
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ public class EsDpiNiching implements InterfaceOptimizer, Serializable, Interface
|
|||||||
// Trying to come close to the selection scheme of Shir&Bäck'05:
|
// Trying to come close to the selection scheme of Shir&Bäck'05:
|
||||||
peakOpts[i].setParentSelection(parentSel);
|
peakOpts[i].setParentSelection(parentSel);
|
||||||
peakOpts[i].setPartnerSelection(new SelectBestSingle(true));
|
peakOpts[i].setPartnerSelection(new SelectBestSingle(true));
|
||||||
peakOpts[i].SetProblem(problem);
|
peakOpts[i].setProblem(problem);
|
||||||
peakOpts[i].init();
|
peakOpts[i].init();
|
||||||
peakOpts[i].setLambda(lambdaPerPeak); // set lambda after initialization
|
peakOpts[i].setLambda(lambdaPerPeak); // set lambda after initialization
|
||||||
peakOpts[i].setForceOrigPopSize(false);
|
peakOpts[i].setForceOrigPopSize(false);
|
||||||
@ -1079,7 +1079,7 @@ public class EsDpiNiching implements InterfaceOptimizer, Serializable, Interface
|
|||||||
return problem;
|
return problem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetProblem(InterfaceOptimizationProblem prob) {
|
public void setProblem(InterfaceOptimizationProblem prob) {
|
||||||
this.problem = prob;
|
this.problem = prob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ public class EvolutionStrategies implements InterfaceOptimizer, java.io.Serializ
|
|||||||
*
|
*
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
this.optimizationProblem = problem;
|
this.optimizationProblem = problem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ public class EvolutionaryProgramming implements InterfaceOptimizer, java.io.Seri
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -120,7 +120,7 @@ public class FloodAlgorithm implements InterfaceOptimizer, java.io.Serializable
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -197,7 +197,7 @@ public class GeneticAlgorithm implements InterfaceOptimizer, java.io.Serializabl
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -324,7 +324,7 @@ public class GradientDescentAlgorithm implements InterfaceOptimizer, java.io.Ser
|
|||||||
return this.m_Identifier;
|
return this.m_Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
|
|
||||||
m_Problem = problem;
|
m_Problem = problem;
|
||||||
}
|
}
|
||||||
@ -350,7 +350,7 @@ public class GradientDescentAlgorithm implements InterfaceOptimizer, java.io.Ser
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
GradientDescentAlgorithm program = new GradientDescentAlgorithm();
|
GradientDescentAlgorithm program = new GradientDescentAlgorithm();
|
||||||
InterfaceOptimizationProblem problem = new F1Problem();
|
InterfaceOptimizationProblem problem = new F1Problem();
|
||||||
program.SetProblem(problem);
|
program.setProblem(problem);
|
||||||
program.init();
|
program.init();
|
||||||
for (int i = 0; i < 100; i++) {
|
for (int i = 0; i < 100; i++) {
|
||||||
program.optimize();
|
program.optimize();
|
||||||
|
@ -128,7 +128,7 @@ public class HillClimbing implements InterfaceOptimizer, java.io.Serializable {
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -94,7 +94,7 @@ public interface InterfaceOptimizer {
|
|||||||
*
|
*
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem);
|
public void setProblem (InterfaceOptimizationProblem problem);
|
||||||
public InterfaceOptimizationProblem getProblem ();
|
public InterfaceOptimizationProblem getProblem ();
|
||||||
|
|
||||||
/** This method will return a string describing all properties of the optimizer
|
/** This method will return a string describing all properties of the optimizer
|
||||||
|
@ -101,7 +101,7 @@ public class IslandModelEA implements InterfacePopulationChangedEventListener, I
|
|||||||
this.m_Population.clear();
|
this.m_Population.clear();
|
||||||
this.m_Population.init();
|
this.m_Population.init();
|
||||||
this.m_Optimizer.init();
|
this.m_Optimizer.init();
|
||||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
this.m_Optimizer.setProblem(this.m_Problem);
|
||||||
this.m_Optimizer.setPopulation((Population)m_Population.clone());
|
this.m_Optimizer.setPopulation((Population)m_Population.clone());
|
||||||
InterfacePopulationChangedEventListener myLocal = null;
|
InterfacePopulationChangedEventListener myLocal = null;
|
||||||
if (this.m_localOnly) {
|
if (this.m_localOnly) {
|
||||||
@ -171,7 +171,7 @@ public class IslandModelEA implements InterfacePopulationChangedEventListener, I
|
|||||||
this.m_Population.incrGeneration();
|
this.m_Population.incrGeneration();
|
||||||
}
|
}
|
||||||
this.m_Optimizer.init();
|
this.m_Optimizer.init();
|
||||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
this.m_Optimizer.setProblem(this.m_Problem);
|
||||||
InterfacePopulationChangedEventListener myLocal = null;
|
InterfacePopulationChangedEventListener myLocal = null;
|
||||||
if (this.m_localOnly) {
|
if (this.m_localOnly) {
|
||||||
// this is running on the local machine
|
// this is running on the local machine
|
||||||
@ -297,9 +297,9 @@ public class IslandModelEA implements InterfacePopulationChangedEventListener, I
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
this.m_Optimizer.SetProblem(problem);
|
this.m_Optimizer.setProblem(problem);
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
return this.m_Problem;
|
return this.m_Problem;
|
||||||
|
@ -118,7 +118,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
defaultInit();
|
this.defaultInit();
|
||||||
this.problem.initPopulation(this.population);
|
this.problem.initPopulation(this.population);
|
||||||
this.evaluatePopulation(this.population);
|
this.evaluatePopulation(this.population);
|
||||||
this.firePropertyChangedEvent(Population.nextGenerationPerformed);
|
this.firePropertyChangedEvent(Population.nextGenerationPerformed);
|
||||||
@ -150,7 +150,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
|||||||
@Override
|
@Override
|
||||||
public void initByPopulation(Population pop, boolean reset) {
|
public void initByPopulation(Population pop, boolean reset) {
|
||||||
if (reset) {
|
if (reset) {
|
||||||
init();
|
this.init();
|
||||||
} else {
|
} else {
|
||||||
defaultInit();
|
defaultInit();
|
||||||
this.population = pop;
|
this.population = pop;
|
||||||
@ -247,7 +247,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
|||||||
@Override
|
@Override
|
||||||
public void optimize() {
|
public void optimize() {
|
||||||
this.problem.evaluatePopulationStart(this.population);
|
this.problem.evaluatePopulationStart(this.population);
|
||||||
Stack<Set<Integer>> linkageTree = buildLinkageTree();
|
Stack<Set<Integer>> linkageTree = this.buildLinkageTree();
|
||||||
Population newPop = new Population(this.popSize);
|
Population newPop = new Population(this.popSize);
|
||||||
if(elitism){
|
if(elitism){
|
||||||
Population firstIndies = this.population.getBestNIndividuals(2, fitCrit);
|
Population firstIndies = this.population.getBestNIndividuals(2, fitCrit);
|
||||||
@ -259,7 +259,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Population indies = this.population.getRandNIndividuals(2);
|
Population indies = this.population.getRandNIndividuals(2);
|
||||||
Population newIndies = buildNewIndies(indies, linkageTree);
|
Population newIndies = this.buildNewIndies(indies, linkageTree);
|
||||||
newPop.addAll(newIndies);
|
newPop.addAll(newIndies);
|
||||||
}
|
}
|
||||||
this.population.clear();
|
this.population.clear();
|
||||||
@ -341,7 +341,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
this.problem = (AbstractOptimizationProblem) problem;
|
this.problem = (AbstractOptimizationProblem) problem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ public class MLTGA implements InterfaceOptimizer, java.io.Serializable, Interfac
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
this.problem = (AbstractOptimizationProblem) problem;
|
this.problem = (AbstractOptimizationProblem) problem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public class MemeticAlgorithm implements InterfaceOptimizer,
|
|||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
// counter = 0;
|
// counter = 0;
|
||||||
this.m_GlobalOptimizer.SetProblem(this.m_Problem);
|
this.m_GlobalOptimizer.setProblem(this.m_Problem);
|
||||||
this.m_GlobalOptimizer.init();
|
this.m_GlobalOptimizer.init();
|
||||||
this.evaluatePopulation(this.m_GlobalOptimizer.getPopulation());
|
this.evaluatePopulation(this.m_GlobalOptimizer.getPopulation());
|
||||||
this.firePropertyChangedEvent(Population.nextGenerationPerformed);
|
this.firePropertyChangedEvent(Population.nextGenerationPerformed);
|
||||||
@ -225,9 +225,9 @@ public class MemeticAlgorithm implements InterfaceOptimizer,
|
|||||||
*
|
*
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
this.m_GlobalOptimizer.SetProblem(this.m_Problem);
|
this.m_GlobalOptimizer.setProblem(this.m_Problem);
|
||||||
}
|
}
|
||||||
|
|
||||||
public InterfaceOptimizationProblem getProblem() {
|
public InterfaceOptimizationProblem getProblem() {
|
||||||
@ -320,7 +320,7 @@ public class MemeticAlgorithm implements InterfaceOptimizer,
|
|||||||
*/
|
*/
|
||||||
public void setGlobalOptimizer(InterfaceOptimizer m_GlobalOptimizer) {
|
public void setGlobalOptimizer(InterfaceOptimizer m_GlobalOptimizer) {
|
||||||
this.m_GlobalOptimizer = m_GlobalOptimizer;
|
this.m_GlobalOptimizer = m_GlobalOptimizer;
|
||||||
this.m_GlobalOptimizer.SetProblem(this.getProblem());
|
this.m_GlobalOptimizer.setProblem(this.getProblem());
|
||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ public class MonteCarloSearch implements InterfaceOptimizer, java.io.Serializabl
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -88,7 +88,7 @@ public class MultiObjectiveCMAES implements InterfaceOptimizer, Serializable {
|
|||||||
* eva2.server.go.strategies.InterfaceOptimizer#SetProblem(eva2.server.go
|
* eva2.server.go.strategies.InterfaceOptimizer#SetProblem(eva2.server.go
|
||||||
* .problems.InterfaceOptimizationProblem)
|
* .problems.InterfaceOptimizationProblem)
|
||||||
*/
|
*/
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
m_Problem = (AbstractOptimizationProblem) problem;
|
m_Problem = (AbstractOptimizationProblem) problem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ public class MultiObjectiveEA implements InterfaceOptimizer, java.io.Serializabl
|
|||||||
setArchivingStrategy(archiving);
|
setArchivingStrategy(archiving);
|
||||||
setArchiveSize(archiveSize);
|
setArchiveSize(archiveSize);
|
||||||
setInformationRetrieval(infoRetrieval);
|
setInformationRetrieval(infoRetrieval);
|
||||||
SetProblem(problem);
|
setProblem(problem);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone() {
|
public Object clone() {
|
||||||
@ -171,9 +171,9 @@ public class MultiObjectiveEA implements InterfaceOptimizer, java.io.Serializabl
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
this.m_Optimizer.SetProblem(problem);
|
this.m_Optimizer.setProblem(problem);
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
return this.m_Problem;
|
return this.m_Problem;
|
||||||
|
@ -62,12 +62,12 @@ public class NelderMeadSimplex implements InterfaceOptimizer, Serializable, Inte
|
|||||||
m_Identifier = name;
|
m_Identifier = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
m_Problem = (AbstractOptimizationProblem)problem;
|
m_Problem = (AbstractOptimizationProblem)problem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setProblemAndPopSize(InterfaceOptimizationProblem problem) {
|
public boolean setProblemAndPopSize(InterfaceOptimizationProblem problem) {
|
||||||
SetProblem(problem);
|
setProblem(problem);
|
||||||
if (m_Problem instanceof AbstractProblemDouble) {
|
if (m_Problem instanceof AbstractProblemDouble) {
|
||||||
setPopulationSize(((AbstractProblemDouble)problem).getProblemDimension()+1);
|
setPopulationSize(((AbstractProblemDouble)problem).getProblemDimension()+1);
|
||||||
return true;
|
return true;
|
||||||
|
@ -256,7 +256,7 @@ public class NichePSO implements InterfaceAdditionalPopulationInformer, Interfac
|
|||||||
protected void initMainSwarm(){
|
protected void initMainSwarm(){
|
||||||
// pass NichePSO parameter on to the mainswarmoptimzer
|
// pass NichePSO parameter on to the mainswarmoptimzer
|
||||||
setMainSwarmSize(mainSwarmSize); // (particles are initialized later via init)
|
setMainSwarmSize(mainSwarmSize); // (particles are initialized later via init)
|
||||||
getMainSwarm().SetProblem(m_Problem);
|
getMainSwarm().setProblem(m_Problem);
|
||||||
getMainSwarm().SetMaxAllowedSwarmRadius(maxAllowedSwarmRadius);
|
getMainSwarm().SetMaxAllowedSwarmRadius(maxAllowedSwarmRadius);
|
||||||
getMainSwarm().getPopulation().setGenerationTo(0);
|
getMainSwarm().getPopulation().setGenerationTo(0);
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ public class NichePSO implements InterfaceAdditionalPopulationInformer, Interfac
|
|||||||
*/
|
*/
|
||||||
protected void initSubswarmOptimizerTemplate(){
|
protected void initSubswarmOptimizerTemplate(){
|
||||||
// pass on the parameters set via NichePSO (done in the analogous nichePSO-Setters as well -> no init() necessary)
|
// pass on the parameters set via NichePSO (done in the analogous nichePSO-Setters as well -> no init() necessary)
|
||||||
getSubswarmOptimizerTemplate().SetProblem(m_Problem);
|
getSubswarmOptimizerTemplate().setProblem(m_Problem);
|
||||||
getSubswarmOptimizerTemplate().SetMaxAllowedSwarmRadius(maxAllowedSwarmRadius);
|
getSubswarmOptimizerTemplate().SetMaxAllowedSwarmRadius(maxAllowedSwarmRadius);
|
||||||
|
|
||||||
// choose PSO-type for the subswarmoptimizer
|
// choose PSO-type for the subswarmoptimizer
|
||||||
@ -311,7 +311,7 @@ public class NichePSO implements InterfaceAdditionalPopulationInformer, Interfac
|
|||||||
public ParticleSubSwarmOptimization getNewSubSwarmOptimizer(){
|
public ParticleSubSwarmOptimization getNewSubSwarmOptimizer(){
|
||||||
//initSubswarmOptimizerTemplate();
|
//initSubswarmOptimizerTemplate();
|
||||||
ParticleSubSwarmOptimization template = (ParticleSubSwarmOptimization)getSubswarmOptimizerTemplate().clone(); // this implicitely clones the problem but does not initialize it again...
|
ParticleSubSwarmOptimization template = (ParticleSubSwarmOptimization)getSubswarmOptimizerTemplate().clone(); // this implicitely clones the problem but does not initialize it again...
|
||||||
template.SetProblem(this.m_Problem); //... let all subswarms use the same correct initialised problem instance
|
template.setProblem(this.m_Problem); //... let all subswarms use the same correct initialised problem instance
|
||||||
return template;
|
return template;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1219,15 +1219,15 @@ public class NichePSO implements InterfaceAdditionalPopulationInformer, Interfac
|
|||||||
* This method will set the problem that is to be optimized
|
* This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
// set member
|
// set member
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
// pass on to the main- and subswarm optimizers
|
// pass on to the main- and subswarm optimizers
|
||||||
getMainSwarm().SetProblem(problem);
|
getMainSwarm().setProblem(problem);
|
||||||
for (int i = 0; i < getSubSwarms().size(); ++i){
|
for (int i = 0; i < getSubSwarms().size(); ++i){
|
||||||
getSubSwarms().get(i).SetProblem(problem);
|
getSubSwarms().get(i).setProblem(problem);
|
||||||
}
|
}
|
||||||
getSubswarmOptimizerTemplate().SetProblem(problem);
|
getSubswarmOptimizerTemplate().setProblem(problem);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @tested nn
|
/** @tested nn
|
||||||
|
@ -257,7 +257,7 @@ public class ParticleFilterOptimization implements InterfaceOptimizer, java.io.S
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
if (problem instanceof AbstractOptimizationProblem) {
|
if (problem instanceof AbstractOptimizationProblem) {
|
||||||
((AbstractOptimizationProblem)problem).informAboutOptimizer(this);
|
((AbstractOptimizationProblem)problem).informAboutOptimizer(this);
|
||||||
|
@ -456,7 +456,7 @@ public class ParticleSubSwarmOptimization extends ParticleSwarmOptimizationGCPSO
|
|||||||
///////////
|
///////////
|
||||||
|
|
||||||
ParticleSubSwarmOptimization tmpopt = new ParticleSubSwarmOptimization();
|
ParticleSubSwarmOptimization tmpopt = new ParticleSubSwarmOptimization();
|
||||||
tmpopt.SetProblem(this.m_Problem);
|
tmpopt.setProblem(this.m_Problem);
|
||||||
tmpopt.evaluatePopulation(tmp);
|
tmpopt.evaluatePopulation(tmp);
|
||||||
tmpopt.initByPopulation(tmp, false); // + size FCs
|
tmpopt.initByPopulation(tmp, false); // + size FCs
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ public class ParticleSubSwarmOptimization extends ParticleSwarmOptimizationGCPSO
|
|||||||
* This method will set the problem that is to be optimized
|
* This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
updateMaxPosDist();
|
updateMaxPosDist();
|
||||||
}
|
}
|
||||||
|
@ -1684,7 +1684,7 @@ public class ParticleSwarmOptimization implements InterfaceOptimizer, java.io.Se
|
|||||||
*
|
*
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ public class PopulationBasedIncrementalLearning implements InterfaceOptimizer, j
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
if (m_Problem instanceof AbstractOptimizationProblem) {
|
if (m_Problem instanceof AbstractOptimizationProblem) {
|
||||||
if (!(((AbstractOptimizationProblem)m_Problem).getIndividualTemplate() instanceof InterfaceGAIndividual)) {
|
if (!(((AbstractOptimizationProblem)m_Problem).getIndividualTemplate() instanceof InterfaceGAIndividual)) {
|
||||||
|
@ -104,7 +104,7 @@ public class ScatterSearch implements InterfaceOptimizer, java.io.Serializable,
|
|||||||
GenericObjectEditor.setHideProperty(this.getClass(), "population", true);
|
GenericObjectEditor.setHideProperty(this.getClass(), "population", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
this.problem = (AbstractOptimizationProblem)problem;
|
this.problem = (AbstractOptimizationProblem)problem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -818,7 +818,7 @@ public class ScatterSearch implements InterfaceOptimizer, java.io.Serializable,
|
|||||||
AbstractOptimizationProblem problem, InterfaceTerminator term) {
|
AbstractOptimizationProblem problem, InterfaceTerminator term) {
|
||||||
ScatterSearch ss = new ScatterSearch();
|
ScatterSearch ss = new ScatterSearch();
|
||||||
problem.initProblem();
|
problem.initProblem();
|
||||||
ss.SetProblem(problem);
|
ss.setProblem(problem);
|
||||||
ss.setRefSetSize(refSetSize);
|
ss.setRefSetSize(refSetSize);
|
||||||
ss.setNelderMeadInitPerturbation(nmInitPerturb);
|
ss.setNelderMeadInitPerturbation(nmInitPerturb);
|
||||||
ss.setLocalSearchRelativeFilter(relativeFitCrit);
|
ss.setLocalSearchRelativeFilter(relativeFitCrit);
|
||||||
|
@ -126,7 +126,7 @@ public class SimulatedAnnealing implements InterfaceOptimizer, java.io.Serializa
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -130,7 +130,7 @@ public class SteadyStateGA implements InterfaceOptimizer, java.io.Serializable {
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -118,7 +118,7 @@ public class ThresholdAlgorithm implements InterfaceOptimizer, java.io.Serializa
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -184,7 +184,7 @@ public class Tribes implements InterfaceOptimizer, java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Tribes(Tribes other) {
|
public Tribes(Tribes other) {
|
||||||
this.SetProblem(other.getProblem());
|
this.setProblem(other.getProblem());
|
||||||
iter = other.iter;
|
iter = other.iter;
|
||||||
setObjectiveFirstDim(other.getObjectiveFirstDim());
|
setObjectiveFirstDim(other.getObjectiveFirstDim());
|
||||||
setDimension(other.range.length);
|
setDimension(other.range.length);
|
||||||
@ -202,7 +202,7 @@ public class Tribes implements InterfaceOptimizer, java.io.Serializable {
|
|||||||
hideHideable();
|
hideHideable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||||
// System.out.println("TRIBES.SetProblem()");
|
// System.out.println("TRIBES.SetProblem()");
|
||||||
m_problem = (AbstractOptimizationProblem)problem;
|
m_problem = (AbstractOptimizationProblem)problem;
|
||||||
range = null;
|
range = null;
|
||||||
|
@ -66,7 +66,7 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
|||||||
int dim = this.m_OutputDimension;
|
int dim = this.m_OutputDimension;
|
||||||
double[] weights;
|
double[] weights;
|
||||||
// dim = tmpProb.getOutputDimension();
|
// dim = tmpProb.getOutputDimension();
|
||||||
this.m_MOOptimizer.SetProblem((InterfaceOptimizationProblem)this.m_Problem.clone());
|
this.m_MOOptimizer.setProblem((InterfaceOptimizationProblem)this.m_Problem.clone());
|
||||||
this.m_MOOptimizer.init();
|
this.m_MOOptimizer.init();
|
||||||
this.m_SOOptimizers = new InterfaceOptimizer[dim];
|
this.m_SOOptimizers = new InterfaceOptimizer[dim];
|
||||||
for (int i = 0; i < dim; i++) {
|
for (int i = 0; i < dim; i++) {
|
||||||
@ -79,11 +79,11 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
|||||||
tmpWF.setWeights(tmpDA);
|
tmpWF.setWeights(tmpDA);
|
||||||
tmpP.setMOSOConverter(tmpWF);
|
tmpP.setMOSOConverter(tmpWF);
|
||||||
this.m_SOOptimizers[i] = (InterfaceOptimizer)this.m_SOOptimizer.clone();
|
this.m_SOOptimizers[i] = (InterfaceOptimizer)this.m_SOOptimizer.clone();
|
||||||
this.m_SOOptimizers[i].SetProblem(tmpP);
|
this.m_SOOptimizers[i].setProblem(tmpP);
|
||||||
this.m_SOOptimizers[i].init();
|
this.m_SOOptimizers[i].init();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.m_SOOptimizer.SetProblem(this.m_Problem);
|
this.m_SOOptimizer.setProblem(this.m_Problem);
|
||||||
this.m_SOOptimizer.init();
|
this.m_SOOptimizer.init();
|
||||||
}
|
}
|
||||||
this.communicate();
|
this.communicate();
|
||||||
@ -104,7 +104,7 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
|||||||
int dim = 2;
|
int dim = 2;
|
||||||
double[] weights;
|
double[] weights;
|
||||||
// dim = tmpProb.getOutputDimension();
|
// dim = tmpProb.getOutputDimension();
|
||||||
this.m_MOOptimizer.SetProblem((InterfaceOptimizationProblem)this.m_Problem.clone());
|
this.m_MOOptimizer.setProblem((InterfaceOptimizationProblem)this.m_Problem.clone());
|
||||||
this.m_MOOptimizer.initByPopulation(pop, reset);
|
this.m_MOOptimizer.initByPopulation(pop, reset);
|
||||||
this.m_SOOptimizers = new InterfaceOptimizer[dim];
|
this.m_SOOptimizers = new InterfaceOptimizer[dim];
|
||||||
for (int i = 0; i < dim; i++) {
|
for (int i = 0; i < dim; i++) {
|
||||||
@ -117,11 +117,11 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
|||||||
tmpWF.setWeights(tmpDA);
|
tmpWF.setWeights(tmpDA);
|
||||||
tmpP.setMOSOConverter(tmpWF);
|
tmpP.setMOSOConverter(tmpWF);
|
||||||
this.m_SOOptimizers[i] = (InterfaceOptimizer)this.m_SOOptimizer.clone();
|
this.m_SOOptimizers[i] = (InterfaceOptimizer)this.m_SOOptimizer.clone();
|
||||||
this.m_SOOptimizers[i].SetProblem(tmpP);
|
this.m_SOOptimizers[i].setProblem(tmpP);
|
||||||
this.m_SOOptimizers[i].initByPopulation(pop, reset);
|
this.m_SOOptimizers[i].initByPopulation(pop, reset);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.m_SOOptimizer.SetProblem(this.m_Problem);
|
this.m_SOOptimizer.setProblem(this.m_Problem);
|
||||||
this.m_SOOptimizer.initByPopulation(pop, reset);
|
this.m_SOOptimizer.initByPopulation(pop, reset);
|
||||||
}
|
}
|
||||||
this.communicate();
|
this.communicate();
|
||||||
@ -224,7 +224,7 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
|||||||
/** This method will set the problem that is to be optimized
|
/** This method will set the problem that is to be optimized
|
||||||
* @param problem
|
* @param problem
|
||||||
*/
|
*/
|
||||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
}
|
}
|
||||||
public InterfaceOptimizationProblem getProblem () {
|
public InterfaceOptimizationProblem getProblem () {
|
||||||
|
@ -42,7 +42,7 @@ public abstract class AbstractGOParameters implements InterfaceGOParameters, Ser
|
|||||||
this.m_Optimizer = goParameters.m_Optimizer;
|
this.m_Optimizer = goParameters.m_Optimizer;
|
||||||
this.m_Problem = goParameters.m_Problem;
|
this.m_Problem = goParameters.m_Problem;
|
||||||
this.m_Terminator = goParameters.m_Terminator;
|
this.m_Terminator = goParameters.m_Terminator;
|
||||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
this.m_Optimizer.setProblem(this.m_Problem);
|
||||||
this.randomSeed = goParameters.randomSeed;
|
this.randomSeed = goParameters.randomSeed;
|
||||||
this.m_PostProc = goParameters.m_PostProc;
|
this.m_PostProc = goParameters.m_PostProc;
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@ public abstract class AbstractGOParameters implements InterfaceGOParameters, Ser
|
|||||||
m_Problem = prob;
|
m_Problem = prob;
|
||||||
m_Terminator = term;
|
m_Terminator = term;
|
||||||
m_PostProc = new PostProcessParams(false);
|
m_PostProc = new PostProcessParams(false);
|
||||||
opt.SetProblem(prob);
|
opt.setProblem(prob);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,7 +65,7 @@ public abstract class AbstractGOParameters implements InterfaceGOParameters, Ser
|
|||||||
setOptimizer(src.m_Optimizer);
|
setOptimizer(src.m_Optimizer);
|
||||||
setProblem(src.m_Problem);
|
setProblem(src.m_Problem);
|
||||||
setTerminator(src.m_Terminator);
|
setTerminator(src.m_Terminator);
|
||||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
this.m_Optimizer.setProblem(this.m_Problem);
|
||||||
setSeed(src.randomSeed);
|
setSeed(src.randomSeed);
|
||||||
setPostProcessParams(src.m_PostProc);
|
setPostProcessParams(src.m_PostProc);
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ public abstract class AbstractGOParameters implements InterfaceGOParameters, Ser
|
|||||||
|
|
||||||
public void setOptimizer(InterfaceOptimizer optimizer) {
|
public void setOptimizer(InterfaceOptimizer optimizer) {
|
||||||
this.m_Optimizer = optimizer;
|
this.m_Optimizer = optimizer;
|
||||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
this.m_Optimizer.setProblem(this.m_Problem);
|
||||||
if (this.m_Listener != null) this.m_Optimizer.addPopulationChangedEventListener(this.m_Listener);
|
if (this.m_Listener != null) this.m_Optimizer.addPopulationChangedEventListener(this.m_Listener);
|
||||||
fireNotifyOnInformers();
|
fireNotifyOnInformers();
|
||||||
}
|
}
|
||||||
@ -168,7 +168,7 @@ public abstract class AbstractGOParameters implements InterfaceGOParameters, Ser
|
|||||||
*/
|
*/
|
||||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||||
this.m_Problem = problem;
|
this.m_Problem = problem;
|
||||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
this.m_Optimizer.setProblem(this.m_Problem);
|
||||||
fireNotifyOnInformers();
|
fireNotifyOnInformers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ public class Processor extends Thread implements InterfaceProcessor, InterfacePo
|
|||||||
m_Statistics.startOptPerformed(getInfoString(), runCounter, goParams, getInformerList());
|
m_Statistics.startOptPerformed(getInfoString(), runCounter, goParams, getInformerList());
|
||||||
|
|
||||||
this.goParams.getProblem().initProblem();
|
this.goParams.getProblem().initProblem();
|
||||||
this.goParams.getOptimizer().SetProblem(this.goParams.getProblem());
|
this.goParams.getOptimizer().setProblem(this.goParams.getProblem());
|
||||||
this.goParams.getTerminator().init(this.goParams.getProblem());
|
this.goParams.getTerminator().init(this.goParams.getProblem());
|
||||||
maybeInitParamCtrl(goParams);
|
maybeInitParamCtrl(goParams);
|
||||||
if (this.m_createInitialPopulations) {
|
if (this.m_createInitialPopulations) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user