Adding MOGA to the Matlab interface

This commit is contained in:
Marcel Kronfeld 2011-02-16 10:33:06 +00:00
parent 510add738e
commit cc95798038
2 changed files with 18 additions and 6 deletions

View File

@ -10,7 +10,7 @@ else
sArr(1) = int.mp.getIntermediateResult();
end
fits=zeros(size(sArr,1),1);
%fits=zeros(size(sArr,1),1);
for i=1:size(sArr,1)
if (isempty(int.range)) % binary case
@ -20,8 +20,8 @@ for i=1:size(sArr,1)
end;
%disp(sols(i,:));
if (isempty(int.args))
fits(i) = feval(int.f, sols(i,:));
fits(i,:) = feval(int.f, sols(i,:));
else
fits(i) = feval(int.f, sols(i,:), int.args);
fits(i,:) = feval(int.f, sols(i,:), int.args);
end
end

View File

@ -115,6 +115,8 @@ public class OptimizerFactory {
public final static int PBIL = 13;
public final static int MOGA = 14;
public final static int defaultFitCalls = 10000;
public final static int randSeed = 0;
@ -297,6 +299,14 @@ public class OptimizerFactory {
listener);
}
public static final GOParameters standardMOGA(AbstractOptimizationProblem problem) {
GOParameters gaParams=standardGA(problem);
int archiveSize=100;
int popSize=100;
MultiObjectiveEA moga = createMultiObjectiveEA(gaParams.getOptimizer(), archiveSize, problem, null);
return makeParams(moga, popSize, problem, randSeed, makeDefaultTerminator());
}
/**
* This method creates a multi-objective EA optimizer. Remember to set a
* multi-objective selection method within the specific optimizer.
@ -574,6 +584,8 @@ public class OptimizerFactory {
return standardCbnGA(problem);
case PBIL:
return standardPBIL(problem);
case MOGA:
return standardMOGA(problem);
default:
System.err.println("Error: optimizer type " + optType
+ " is unknown!");
@ -588,9 +600,9 @@ public class OptimizerFactory {
* @return a String listing the accessible optimizers
*/
public static String showOptimizers() {
return "1: Standard ES \n2: CMA-ES \n3: GA \n4: PSO \n5: DE \n6: Tribes \n7: Random (Monte Carlo) "
+ "\n8: Hill-Climbing \n9: Cluster-based niching ES \n10: Clustering Hill-Climbing \n11: IPOP-CMA-ES "
+ "\n12: Cluster-based niching GA \n13: PBIL";
return STD_ES+": Standard ES \n"+ CMA_ES+ ": CMA-ES \n"+ STD_GA+ ": GA \n"+ PSO + ": PSO \n"+ DE + ": DE \n"+ TRIBES + ": Tribes \n"+ RANDOM + ": Random (Monte Carlo) "
+ "\n"+ HILLCL + ": Hill-Climbing \n"+ CBN_ES + ": Cluster-based niching ES \n"+ CL_HILLCL + ": Clustering Hill-Climbing \n"+ CMA_ES_IPOP + ": IPOP-CMA-ES "
+ "\n"+ CBN_GA + ": Cluster-based niching GA \n"+ PBIL + ": PBIL \n"+ MOGA + ": MOGA, a Multi-Objective Genetic Algorithm";
}
/**