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);
|
||||
|
||||
DifferentialEvolution de = new DifferentialEvolution();
|
||||
de.SetProblem(problem);
|
||||
de.setProblem(problem);
|
||||
de.getPopulation().setTargetSize(popsize);
|
||||
de.setDEType(DETypeEnum.DE2_CurrentToBest);
|
||||
de.setF(f);
|
||||
@ -208,7 +208,7 @@ public class OptimizerFactory {
|
||||
// theES.setParentSelection(selection);
|
||||
// theES.setPartnerSelection(selection);
|
||||
theES.setEnvironmentSelection(selection);
|
||||
theES.SetProblem(problem);
|
||||
theES.setProblem(problem);
|
||||
theES.init();
|
||||
|
||||
if (listener != null) listener.registerPopulationStateChanged(theES.getPopulation(), "");
|
||||
@ -240,7 +240,7 @@ public class OptimizerFactory {
|
||||
setTemplateOperators(problem, mut, pm, cross, pc);
|
||||
|
||||
GeneticAlgorithm ga = new GeneticAlgorithm();
|
||||
ga.SetProblem(problem);
|
||||
ga.setProblem(problem);
|
||||
ga.getPopulation().setTargetSize(popsize);
|
||||
ga.setParentSelection(select);
|
||||
ga.setPartnerSelection(select);
|
||||
@ -308,7 +308,7 @@ public class OptimizerFactory {
|
||||
InterfacePopulationChangedEventListener listener) {
|
||||
|
||||
problem.initProblem();
|
||||
subOpt.SetProblem(problem);
|
||||
subOpt.setProblem(problem);
|
||||
|
||||
return new MultiObjectiveEA(subOpt, archiving, archiveSize,
|
||||
infoRetrieval, problem);
|
||||
@ -376,7 +376,7 @@ public class OptimizerFactory {
|
||||
hc.setIdentifier("-"+popSize+"-"+mutator.getStringRepresentation());
|
||||
hc.getPopulation().setTargetSize(popSize);
|
||||
hc.addPopulationChangedEventListener(listener);
|
||||
hc.SetProblem(problem);
|
||||
hc.setProblem(problem);
|
||||
hc.init();
|
||||
|
||||
if (listener != null) listener.registerPopulationStateChanged(hc.getPopulation(), "");
|
||||
@ -403,7 +403,7 @@ public class OptimizerFactory {
|
||||
MonteCarloSearch mc = new MonteCarloSearch();
|
||||
mc.getPopulation().setTargetSize(popsize);
|
||||
mc.addPopulationChangedEventListener(listener);
|
||||
mc.SetProblem(problem);
|
||||
mc.setProblem(problem);
|
||||
mc.init();
|
||||
|
||||
if (listener != null) listener.registerPopulationStateChanged(mc.getPopulation(), "");
|
||||
@ -437,7 +437,7 @@ public class OptimizerFactory {
|
||||
setTemplateOperators(problem, new NoMutation(), 0, new NoCrossover(), 0);
|
||||
|
||||
ParticleSwarmOptimization pso = new ParticleSwarmOptimization();
|
||||
pso.SetProblem(problem);
|
||||
pso.setProblem(problem);
|
||||
pso.getPopulation().setTargetSize(popsize);
|
||||
pso.setPhi1(phi1);
|
||||
pso.setPhi2(phi2);
|
||||
@ -480,7 +480,7 @@ public class OptimizerFactory {
|
||||
SimulatedAnnealing sa = new SimulatedAnnealing();
|
||||
sa.setAlpha(alpha);
|
||||
sa.setInitialTemperature(temperature);
|
||||
sa.SetProblem(problem);
|
||||
sa.setProblem(problem);
|
||||
sa.getPopulation().setTargetSize(popsize);
|
||||
sa.addPopulationChangedEventListener(listener);
|
||||
sa.init();
|
||||
@ -518,7 +518,7 @@ public class OptimizerFactory {
|
||||
pbil.setPositiveSamples(positiveSamples);
|
||||
|
||||
pbil.addPopulationChangedEventListener(listener);
|
||||
pbil.SetProblem(problem);
|
||||
pbil.setProblem(problem);
|
||||
|
||||
if (listener != null) listener.registerPopulationStateChanged(pbil.getPopulation(), "");
|
||||
|
||||
@ -763,7 +763,7 @@ public class OptimizerFactory {
|
||||
InterfaceTerminator term) {
|
||||
GOParameters params = new GOParameters();
|
||||
params.setProblem(problem);
|
||||
opt.SetProblem(problem);
|
||||
opt.setProblem(problem);
|
||||
opt.setPopulation(pop);
|
||||
params.setOptimizer(opt);
|
||||
params.setTerminator(term);
|
||||
@ -1340,7 +1340,7 @@ public class OptimizerFactory {
|
||||
AbstractOptimizationProblem problem, int evalCycle, int popSize, double minImprovement,
|
||||
PostProcessMethod method, double hcInitialStep, double hcStepThresh, double sigmaClust) {
|
||||
ClusteringHillClimbing chc = new ClusteringHillClimbing();
|
||||
chc.SetProblem(problem);
|
||||
chc.setProblem(problem);
|
||||
|
||||
chc.setEvalCycle(evalCycle);
|
||||
chc.setInitialPopSize(popSize);
|
||||
|
@ -312,7 +312,7 @@ public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopu
|
||||
((GAIndividualDoubleData)tmpIndy).setMutationProbability(1.0);
|
||||
((F1Problem)problem).setEAIndividual(tmpIndy);
|
||||
//((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.doWork();
|
||||
break;
|
||||
@ -329,7 +329,7 @@ public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopu
|
||||
((F1Problem)problem).setEAIndividual(tmpIndy);
|
||||
//((FGRNInferringProblem)this.m_Problem).setUseHEigenMatrix(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.doWork();
|
||||
break;
|
||||
@ -375,7 +375,7 @@ public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopu
|
||||
|
||||
// init problem
|
||||
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
|
||||
//this.m_GO.getOptimizer().init();
|
||||
|
||||
|
@ -363,7 +363,7 @@ public class MOCCOStandalone implements InterfaceGOStandalone, InterfacePopulati
|
||||
if (this.m_JFrame != null) {
|
||||
}
|
||||
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());
|
||||
this.m_State.m_CurrentProblem.evaluate(this.m_State.m_Optimizer.getPopulation());
|
||||
this.m_State.m_Optimizer.getPopulation().SetFunctionCalls(0);
|
||||
|
@ -125,7 +125,7 @@ public class MOCCOParameterizeGDF extends MOCCOPhase implements InterfaceProcess
|
||||
gbc.gridwidth = 1;
|
||||
this.m_EOpt = new GeneralGOEProperty();
|
||||
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_EOpt.m_Name = "Island Model EA";
|
||||
try {
|
||||
@ -217,7 +217,7 @@ public class MOCCOParameterizeGDF extends MOCCOPhase implements InterfaceProcess
|
||||
PropertyDoubleArray da = new PropertyDoubleArray(w);
|
||||
wf.setOutputDimension(da.getNumRows());
|
||||
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_JPanelControl.removeAll();
|
||||
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_JPanelControl.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();
|
||||
pop.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.setMigrationStrategy(new SOBestMigration());
|
||||
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_EIMEA.m_Name = "Island Model EA";
|
||||
try {
|
||||
@ -234,7 +234,7 @@ public class MOCCOParameterizeRefPoint extends MOCCOPhase implements InterfacePr
|
||||
// m_Island.setNumberLocalCPUs(m_Perturbations);
|
||||
// }
|
||||
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();
|
||||
double[] tmpD;
|
||||
MOSOLpMetric[] tmpLPs = new MOSOLpMetric[m_Perturbations];
|
||||
|
@ -66,7 +66,7 @@ public class MOCCOParameterizeSO extends MOCCOPhase implements InterfaceProcessE
|
||||
"a Genetic Algorithms, please parameterize accordingly.",
|
||||
"Warning", JOptionPane.WARNING_MESSAGE);
|
||||
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.setLayout(new BorderLayout());
|
||||
|
@ -167,7 +167,7 @@ public class MOCCOParameterizeSTEP extends MOCCOPhase implements InterfaceProces
|
||||
gbc.gridwidth = 1;
|
||||
this.m_EOpt = new GeneralGOEProperty();
|
||||
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_EOpt.m_Name = "Island Model EA";
|
||||
try {
|
||||
@ -294,7 +294,7 @@ public class MOCCOParameterizeSTEP extends MOCCOPhase implements InterfaceProces
|
||||
double[] setWeights = mapObjectives2Fitness(weights);
|
||||
PropertyDoubleArray da = new PropertyDoubleArray(setWeights);
|
||||
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_JPanelControl.removeAll();
|
||||
m_Mocco.m_JPanelControl.validate();
|
||||
|
@ -114,7 +114,7 @@ public class MOCCOParameterizeTchebycheff extends MOCCOPhase implements Interfac
|
||||
this.m_Island.setMigrationRate(2);
|
||||
this.m_Island.setMigrationStrategy(new SOBestMigration());
|
||||
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_EIMEA.m_Name = "Island Model EA";
|
||||
try {
|
||||
@ -241,7 +241,7 @@ public class MOCCOParameterizeTchebycheff extends MOCCOPhase implements Interfac
|
||||
// m_Island.setNumberLocalCPUs(m_Perturbations);
|
||||
// }
|
||||
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();
|
||||
double[] tmpD;
|
||||
double sum = 0, l = 0, u = 1;
|
||||
|
@ -56,14 +56,14 @@ public class MOCCOState {
|
||||
this.m_BackupOptimizer = null;
|
||||
}
|
||||
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());
|
||||
}
|
||||
|
||||
public void makeBackup() {
|
||||
this.m_BackupProblem = (InterfaceOptimizationProblem)this.m_CurrentProblem.clone();
|
||||
this.m_BackupOptimizer = (InterfaceOptimizer)this.m_Optimizer.clone();
|
||||
this.m_BackupOptimizer.SetProblem(null);
|
||||
this.m_BackupOptimizer.setProblem(null);
|
||||
}
|
||||
|
||||
public void addPopulation2History(Population pop) {
|
||||
|
@ -201,7 +201,7 @@ public class MOClusteringSeparation implements InterfaceMigration, java.io.Seria
|
||||
// else out += "\n Using objective space.";
|
||||
// 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);
|
||||
}
|
||||
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(bts);
|
||||
}
|
||||
islands[i].SetProblem(prob);
|
||||
islands[i].setProblem(prob);
|
||||
// if (true) {
|
||||
// prob.evaluate(newIPOP[i]);
|
||||
// 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.";
|
||||
// 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) {
|
||||
HillClimbing hc = new HillClimbing();
|
||||
// HC depends heavily on the selected mutation operator!
|
||||
hc.SetProblem(problem);
|
||||
hc.setProblem(problem);
|
||||
mute.init(problem.getIndividualTemplate(), problem);
|
||||
hc.SetMutationOperator(mute);
|
||||
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) {
|
||||
GradientDescentAlgorithm gda = new GradientDescentAlgorithm();
|
||||
gda.setAdaptStepSizeLocally(true);
|
||||
gda.SetProblem(problem);
|
||||
gda.setProblem(problem);
|
||||
gda.setLocalMinStepSize(minStepSize);
|
||||
gda.setLocalMaxStepSize(maxStepSize);
|
||||
gda.setRecovery(false);
|
||||
|
@ -111,7 +111,7 @@ public class F2Problem extends AbstractProblemDoubleOffset implements InterfaceL
|
||||
|
||||
private void initLS() {
|
||||
localSearchOptimizer = new GradientDescentAlgorithm();
|
||||
localSearchOptimizer.SetProblem(this);
|
||||
localSearchOptimizer.setProblem(this);
|
||||
localSearchOptimizer.init();
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ implements InterfaceMultimodalProblem, InterfaceFirstOrderDerivableProblem, Inte
|
||||
|
||||
private void initLS() {
|
||||
localSearchOptimizer = new GradientDescentAlgorithm();
|
||||
localSearchOptimizer.SetProblem(this);
|
||||
localSearchOptimizer.setProblem(this);
|
||||
localSearchOptimizer.init();
|
||||
}
|
||||
|
||||
|
@ -599,7 +599,7 @@ public class BOA implements InterfaceOptimizer, java.io.Serializable {
|
||||
return this.m_Identifier;
|
||||
}
|
||||
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
this.problem = (AbstractOptimizationProblem) problem;
|
||||
}
|
||||
|
||||
|
@ -731,7 +731,7 @@ public class BinaryScatterSearch implements InterfaceOptimizer, java.io.Serializ
|
||||
return this.m_Identifier;
|
||||
}
|
||||
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
this.problem = (AbstractOptimizationProblem) problem;
|
||||
}
|
||||
|
||||
|
@ -67,8 +67,8 @@ public class CBNPSO extends ClusterBasedNichingEA implements Serializable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
super.SetProblem(problem);
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
super.setProblem(problem);
|
||||
if (problem instanceof AbstractProblemDouble) {
|
||||
AbstractProblemDouble dblProb = ((AbstractProblemDouble)problem);
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
public InterfaceOptimizationProblem getProblem () {
|
||||
|
@ -972,9 +972,9 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
||||
/** This method will set the problem that is to be optimized
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
||||
this.m_Optimizer.setProblem(this.m_Problem);
|
||||
}
|
||||
public InterfaceOptimizationProblem getProblem () {
|
||||
return this.m_Problem;
|
||||
|
@ -107,7 +107,7 @@ InterfaceOptimizer, Serializable, InterfaceAdditionalPopulationInformer {
|
||||
/** This method will set the problem that is to be optimized
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = (AbstractOptimizationProblem)problem;
|
||||
}
|
||||
public InterfaceOptimizationProblem getProblem () {
|
||||
|
@ -487,8 +487,8 @@ public class DynamicParticleSwarmOptimization extends ParticleSwarmOptimization
|
||||
}
|
||||
|
||||
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
super.SetProblem(problem);
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
super.setProblem(problem);
|
||||
if (problem instanceof AbstractOptimizationProblem) {
|
||||
((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:
|
||||
peakOpts[i].setParentSelection(parentSel);
|
||||
peakOpts[i].setPartnerSelection(new SelectBestSingle(true));
|
||||
peakOpts[i].SetProblem(problem);
|
||||
peakOpts[i].setProblem(problem);
|
||||
peakOpts[i].init();
|
||||
peakOpts[i].setLambda(lambdaPerPeak); // set lambda after initialization
|
||||
peakOpts[i].setForceOrigPopSize(false);
|
||||
@ -1079,7 +1079,7 @@ public class EsDpiNiching implements InterfaceOptimizer, Serializable, Interface
|
||||
return problem;
|
||||
}
|
||||
|
||||
public void SetProblem(InterfaceOptimizationProblem prob) {
|
||||
public void setProblem(InterfaceOptimizationProblem prob) {
|
||||
this.problem = prob;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ public class EvolutionStrategies implements InterfaceOptimizer, java.io.Serializ
|
||||
*
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem 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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
public InterfaceOptimizationProblem getProblem () {
|
||||
|
@ -324,7 +324,7 @@ public class GradientDescentAlgorithm implements InterfaceOptimizer, java.io.Ser
|
||||
return this.m_Identifier;
|
||||
}
|
||||
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
|
||||
m_Problem = problem;
|
||||
}
|
||||
@ -350,7 +350,7 @@ public class GradientDescentAlgorithm implements InterfaceOptimizer, java.io.Ser
|
||||
public static void main(String[] args) {
|
||||
GradientDescentAlgorithm program = new GradientDescentAlgorithm();
|
||||
InterfaceOptimizationProblem problem = new F1Problem();
|
||||
program.SetProblem(problem);
|
||||
program.setProblem(problem);
|
||||
program.init();
|
||||
for (int i = 0; i < 100; i++) {
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
public InterfaceOptimizationProblem getProblem () {
|
||||
|
@ -94,7 +94,7 @@ public interface InterfaceOptimizer {
|
||||
*
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem);
|
||||
public void setProblem (InterfaceOptimizationProblem problem);
|
||||
public InterfaceOptimizationProblem getProblem ();
|
||||
|
||||
/** 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.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());
|
||||
InterfacePopulationChangedEventListener myLocal = null;
|
||||
if (this.m_localOnly) {
|
||||
@ -171,7 +171,7 @@ public class IslandModelEA implements InterfacePopulationChangedEventListener, I
|
||||
this.m_Population.incrGeneration();
|
||||
}
|
||||
this.m_Optimizer.init();
|
||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
||||
this.m_Optimizer.setProblem(this.m_Problem);
|
||||
InterfacePopulationChangedEventListener myLocal = null;
|
||||
if (this.m_localOnly) {
|
||||
// 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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
this.m_Optimizer.SetProblem(problem);
|
||||
this.m_Optimizer.setProblem(problem);
|
||||
}
|
||||
public InterfaceOptimizationProblem getProblem () {
|
||||
return this.m_Problem;
|
||||
|
@ -118,7 +118,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
defaultInit();
|
||||
this.defaultInit();
|
||||
this.problem.initPopulation(this.population);
|
||||
this.evaluatePopulation(this.population);
|
||||
this.firePropertyChangedEvent(Population.nextGenerationPerformed);
|
||||
@ -150,7 +150,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
||||
@Override
|
||||
public void initByPopulation(Population pop, boolean reset) {
|
||||
if (reset) {
|
||||
init();
|
||||
this.init();
|
||||
} else {
|
||||
defaultInit();
|
||||
this.population = pop;
|
||||
@ -247,7 +247,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
||||
@Override
|
||||
public void optimize() {
|
||||
this.problem.evaluatePopulationStart(this.population);
|
||||
Stack<Set<Integer>> linkageTree = buildLinkageTree();
|
||||
Stack<Set<Integer>> linkageTree = this.buildLinkageTree();
|
||||
Population newPop = new Population(this.popSize);
|
||||
if(elitism){
|
||||
Population firstIndies = this.population.getBestNIndividuals(2, fitCrit);
|
||||
@ -259,7 +259,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
||||
continue;
|
||||
}
|
||||
Population indies = this.population.getRandNIndividuals(2);
|
||||
Population newIndies = buildNewIndies(indies, linkageTree);
|
||||
Population newIndies = this.buildNewIndies(indies, linkageTree);
|
||||
newPop.addAll(newIndies);
|
||||
}
|
||||
this.population.clear();
|
||||
@ -341,7 +341,7 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
|
||||
}
|
||||
|
||||
@Override
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
this.problem = (AbstractOptimizationProblem) problem;
|
||||
}
|
||||
|
||||
|
@ -320,7 +320,7 @@ public class MLTGA implements InterfaceOptimizer, java.io.Serializable, Interfac
|
||||
}
|
||||
|
||||
@Override
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
this.problem = (AbstractOptimizationProblem) problem;
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ public class MemeticAlgorithm implements InterfaceOptimizer,
|
||||
|
||||
public void init() {
|
||||
// counter = 0;
|
||||
this.m_GlobalOptimizer.SetProblem(this.m_Problem);
|
||||
this.m_GlobalOptimizer.setProblem(this.m_Problem);
|
||||
this.m_GlobalOptimizer.init();
|
||||
this.evaluatePopulation(this.m_GlobalOptimizer.getPopulation());
|
||||
this.firePropertyChangedEvent(Population.nextGenerationPerformed);
|
||||
@ -225,9 +225,9 @@ public class MemeticAlgorithm implements InterfaceOptimizer,
|
||||
*
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
this.m_GlobalOptimizer.SetProblem(this.m_Problem);
|
||||
this.m_GlobalOptimizer.setProblem(this.m_Problem);
|
||||
}
|
||||
|
||||
public InterfaceOptimizationProblem getProblem() {
|
||||
@ -320,7 +320,7 @@ public class MemeticAlgorithm implements InterfaceOptimizer,
|
||||
*/
|
||||
public void setGlobalOptimizer(InterfaceOptimizer m_GlobalOptimizer) {
|
||||
this.m_GlobalOptimizer = m_GlobalOptimizer;
|
||||
this.m_GlobalOptimizer.SetProblem(this.getProblem());
|
||||
this.m_GlobalOptimizer.setProblem(this.getProblem());
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
public InterfaceOptimizationProblem getProblem () {
|
||||
|
@ -88,7 +88,7 @@ public class MultiObjectiveCMAES implements InterfaceOptimizer, Serializable {
|
||||
* eva2.server.go.strategies.InterfaceOptimizer#SetProblem(eva2.server.go
|
||||
* .problems.InterfaceOptimizationProblem)
|
||||
*/
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
m_Problem = (AbstractOptimizationProblem) problem;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ public class MultiObjectiveEA implements InterfaceOptimizer, java.io.Serializabl
|
||||
setArchivingStrategy(archiving);
|
||||
setArchiveSize(archiveSize);
|
||||
setInformationRetrieval(infoRetrieval);
|
||||
SetProblem(problem);
|
||||
setProblem(problem);
|
||||
}
|
||||
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
this.m_Optimizer.SetProblem(problem);
|
||||
this.m_Optimizer.setProblem(problem);
|
||||
}
|
||||
public InterfaceOptimizationProblem getProblem () {
|
||||
return this.m_Problem;
|
||||
|
@ -62,12 +62,12 @@ public class NelderMeadSimplex implements InterfaceOptimizer, Serializable, Inte
|
||||
m_Identifier = name;
|
||||
}
|
||||
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
m_Problem = (AbstractOptimizationProblem)problem;
|
||||
}
|
||||
|
||||
public boolean setProblemAndPopSize(InterfaceOptimizationProblem problem) {
|
||||
SetProblem(problem);
|
||||
setProblem(problem);
|
||||
if (m_Problem instanceof AbstractProblemDouble) {
|
||||
setPopulationSize(((AbstractProblemDouble)problem).getProblemDimension()+1);
|
||||
return true;
|
||||
|
@ -256,7 +256,7 @@ public class NichePSO implements InterfaceAdditionalPopulationInformer, Interfac
|
||||
protected void initMainSwarm(){
|
||||
// pass NichePSO parameter on to the mainswarmoptimzer
|
||||
setMainSwarmSize(mainSwarmSize); // (particles are initialized later via init)
|
||||
getMainSwarm().SetProblem(m_Problem);
|
||||
getMainSwarm().setProblem(m_Problem);
|
||||
getMainSwarm().SetMaxAllowedSwarmRadius(maxAllowedSwarmRadius);
|
||||
getMainSwarm().getPopulation().setGenerationTo(0);
|
||||
|
||||
@ -285,7 +285,7 @@ public class NichePSO implements InterfaceAdditionalPopulationInformer, Interfac
|
||||
*/
|
||||
protected void initSubswarmOptimizerTemplate(){
|
||||
// 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);
|
||||
|
||||
// choose PSO-type for the subswarmoptimizer
|
||||
@ -311,7 +311,7 @@ public class NichePSO implements InterfaceAdditionalPopulationInformer, Interfac
|
||||
public ParticleSubSwarmOptimization getNewSubSwarmOptimizer(){
|
||||
//initSubswarmOptimizerTemplate();
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1219,15 +1219,15 @@ public class NichePSO implements InterfaceAdditionalPopulationInformer, Interfac
|
||||
* This method will set the problem that is to be optimized
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
// set member
|
||||
this.m_Problem = problem;
|
||||
// pass on to the main- and subswarm optimizers
|
||||
getMainSwarm().SetProblem(problem);
|
||||
getMainSwarm().setProblem(problem);
|
||||
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
|
||||
|
@ -257,7 +257,7 @@ public class ParticleFilterOptimization implements InterfaceOptimizer, java.io.S
|
||||
/** This method will set the problem that is to be optimized
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
if (problem instanceof AbstractOptimizationProblem) {
|
||||
((AbstractOptimizationProblem)problem).informAboutOptimizer(this);
|
||||
|
@ -456,7 +456,7 @@ public class ParticleSubSwarmOptimization extends ParticleSwarmOptimizationGCPSO
|
||||
///////////
|
||||
|
||||
ParticleSubSwarmOptimization tmpopt = new ParticleSubSwarmOptimization();
|
||||
tmpopt.SetProblem(this.m_Problem);
|
||||
tmpopt.setProblem(this.m_Problem);
|
||||
tmpopt.evaluatePopulation(tmp);
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
updateMaxPosDist();
|
||||
}
|
||||
|
@ -1684,7 +1684,7 @@ public class ParticleSwarmOptimization implements InterfaceOptimizer, java.io.Se
|
||||
*
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem 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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
if (m_Problem instanceof AbstractOptimizationProblem) {
|
||||
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);
|
||||
}
|
||||
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
this.problem = (AbstractOptimizationProblem)problem;
|
||||
}
|
||||
|
||||
@ -818,7 +818,7 @@ public class ScatterSearch implements InterfaceOptimizer, java.io.Serializable,
|
||||
AbstractOptimizationProblem problem, InterfaceTerminator term) {
|
||||
ScatterSearch ss = new ScatterSearch();
|
||||
problem.initProblem();
|
||||
ss.SetProblem(problem);
|
||||
ss.setProblem(problem);
|
||||
ss.setRefSetSize(refSetSize);
|
||||
ss.setNelderMeadInitPerturbation(nmInitPerturb);
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
public InterfaceOptimizationProblem getProblem () {
|
||||
|
@ -184,7 +184,7 @@ public class Tribes implements InterfaceOptimizer, java.io.Serializable {
|
||||
}
|
||||
|
||||
public Tribes(Tribes other) {
|
||||
this.SetProblem(other.getProblem());
|
||||
this.setProblem(other.getProblem());
|
||||
iter = other.iter;
|
||||
setObjectiveFirstDim(other.getObjectiveFirstDim());
|
||||
setDimension(other.range.length);
|
||||
@ -202,7 +202,7 @@ public class Tribes implements InterfaceOptimizer, java.io.Serializable {
|
||||
hideHideable();
|
||||
}
|
||||
|
||||
public void SetProblem(InterfaceOptimizationProblem problem) {
|
||||
public void setProblem(InterfaceOptimizationProblem problem) {
|
||||
// System.out.println("TRIBES.SetProblem()");
|
||||
m_problem = (AbstractOptimizationProblem)problem;
|
||||
range = null;
|
||||
|
@ -66,7 +66,7 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
||||
int dim = this.m_OutputDimension;
|
||||
double[] weights;
|
||||
// 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_SOOptimizers = new InterfaceOptimizer[dim];
|
||||
for (int i = 0; i < dim; i++) {
|
||||
@ -79,11 +79,11 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
||||
tmpWF.setWeights(tmpDA);
|
||||
tmpP.setMOSOConverter(tmpWF);
|
||||
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();
|
||||
}
|
||||
} else {
|
||||
this.m_SOOptimizer.SetProblem(this.m_Problem);
|
||||
this.m_SOOptimizer.setProblem(this.m_Problem);
|
||||
this.m_SOOptimizer.init();
|
||||
}
|
||||
this.communicate();
|
||||
@ -104,7 +104,7 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
||||
int dim = 2;
|
||||
double[] weights;
|
||||
// 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_SOOptimizers = new InterfaceOptimizer[dim];
|
||||
for (int i = 0; i < dim; i++) {
|
||||
@ -117,11 +117,11 @@ public class WingedMultiObjectiveEA implements InterfaceOptimizer, java.io.Seria
|
||||
tmpWF.setWeights(tmpDA);
|
||||
tmpP.setMOSOConverter(tmpWF);
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
this.m_SOOptimizer.SetProblem(this.m_Problem);
|
||||
this.m_SOOptimizer.setProblem(this.m_Problem);
|
||||
this.m_SOOptimizer.initByPopulation(pop, reset);
|
||||
}
|
||||
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
|
||||
* @param problem
|
||||
*/
|
||||
public void SetProblem (InterfaceOptimizationProblem problem) {
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
}
|
||||
public InterfaceOptimizationProblem getProblem () {
|
||||
|
@ -42,7 +42,7 @@ public abstract class AbstractGOParameters implements InterfaceGOParameters, Ser
|
||||
this.m_Optimizer = goParameters.m_Optimizer;
|
||||
this.m_Problem = goParameters.m_Problem;
|
||||
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.m_PostProc = goParameters.m_PostProc;
|
||||
}
|
||||
@ -53,7 +53,7 @@ public abstract class AbstractGOParameters implements InterfaceGOParameters, Ser
|
||||
m_Problem = prob;
|
||||
m_Terminator = term;
|
||||
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);
|
||||
setProblem(src.m_Problem);
|
||||
setTerminator(src.m_Terminator);
|
||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
||||
this.m_Optimizer.setProblem(this.m_Problem);
|
||||
setSeed(src.randomSeed);
|
||||
setPostProcessParams(src.m_PostProc);
|
||||
}
|
||||
@ -139,7 +139,7 @@ public abstract class AbstractGOParameters implements InterfaceGOParameters, Ser
|
||||
|
||||
public void setOptimizer(InterfaceOptimizer 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);
|
||||
fireNotifyOnInformers();
|
||||
}
|
||||
@ -168,7 +168,7 @@ public abstract class AbstractGOParameters implements InterfaceGOParameters, Ser
|
||||
*/
|
||||
public void setProblem (InterfaceOptimizationProblem problem) {
|
||||
this.m_Problem = problem;
|
||||
this.m_Optimizer.SetProblem(this.m_Problem);
|
||||
this.m_Optimizer.setProblem(this.m_Problem);
|
||||
fireNotifyOnInformers();
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ public class Processor extends Thread implements InterfaceProcessor, InterfacePo
|
||||
m_Statistics.startOptPerformed(getInfoString(), runCounter, goParams, getInformerList());
|
||||
|
||||
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());
|
||||
maybeInitParamCtrl(goParams);
|
||||
if (this.m_createInitialPopulations) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user