Adding MOGA to the Matlab interface
This commit is contained in:
parent
510add738e
commit
cc95798038
@ -10,7 +10,7 @@ else
|
|||||||
sArr(1) = int.mp.getIntermediateResult();
|
sArr(1) = int.mp.getIntermediateResult();
|
||||||
end
|
end
|
||||||
|
|
||||||
fits=zeros(size(sArr,1),1);
|
%fits=zeros(size(sArr,1),1);
|
||||||
|
|
||||||
for i=1:size(sArr,1)
|
for i=1:size(sArr,1)
|
||||||
if (isempty(int.range)) % binary case
|
if (isempty(int.range)) % binary case
|
||||||
@ -20,8 +20,8 @@ for i=1:size(sArr,1)
|
|||||||
end;
|
end;
|
||||||
%disp(sols(i,:));
|
%disp(sols(i,:));
|
||||||
if (isempty(int.args))
|
if (isempty(int.args))
|
||||||
fits(i) = feval(int.f, sols(i,:));
|
fits(i,:) = feval(int.f, sols(i,:));
|
||||||
else
|
else
|
||||||
fits(i) = feval(int.f, sols(i,:), int.args);
|
fits(i,:) = feval(int.f, sols(i,:), int.args);
|
||||||
end
|
end
|
||||||
end
|
end
|
@ -115,6 +115,8 @@ public class OptimizerFactory {
|
|||||||
|
|
||||||
public final static int PBIL = 13;
|
public final static int PBIL = 13;
|
||||||
|
|
||||||
|
public final static int MOGA = 14;
|
||||||
|
|
||||||
public final static int defaultFitCalls = 10000;
|
public final static int defaultFitCalls = 10000;
|
||||||
|
|
||||||
public final static int randSeed = 0;
|
public final static int randSeed = 0;
|
||||||
@ -297,6 +299,14 @@ public class OptimizerFactory {
|
|||||||
listener);
|
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
|
* This method creates a multi-objective EA optimizer. Remember to set a
|
||||||
* multi-objective selection method within the specific optimizer.
|
* multi-objective selection method within the specific optimizer.
|
||||||
@ -574,6 +584,8 @@ public class OptimizerFactory {
|
|||||||
return standardCbnGA(problem);
|
return standardCbnGA(problem);
|
||||||
case PBIL:
|
case PBIL:
|
||||||
return standardPBIL(problem);
|
return standardPBIL(problem);
|
||||||
|
case MOGA:
|
||||||
|
return standardMOGA(problem);
|
||||||
default:
|
default:
|
||||||
System.err.println("Error: optimizer type " + optType
|
System.err.println("Error: optimizer type " + optType
|
||||||
+ " is unknown!");
|
+ " is unknown!");
|
||||||
@ -588,9 +600,9 @@ public class OptimizerFactory {
|
|||||||
* @return a String listing the accessible optimizers
|
* @return a String listing the accessible optimizers
|
||||||
*/
|
*/
|
||||||
public static String showOptimizers() {
|
public static String showOptimizers() {
|
||||||
return "1: Standard ES \n2: CMA-ES \n3: GA \n4: PSO \n5: DE \n6: Tribes \n7: Random (Monte Carlo) "
|
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) "
|
||||||
+ "\n8: Hill-Climbing \n9: Cluster-based niching ES \n10: Clustering Hill-Climbing \n11: IPOP-CMA-ES "
|
+ "\n"+ HILLCL + ": Hill-Climbing \n"+ CBN_ES + ": Cluster-based niching ES \n"+ CL_HILLCL + ": Clustering Hill-Climbing \n"+ CMA_ES_IPOP + ": IPOP-CMA-ES "
|
||||||
+ "\n12: Cluster-based niching GA \n13: PBIL";
|
+ "\n"+ CBN_GA + ": Cluster-based niching GA \n"+ PBIL + ": PBIL \n"+ MOGA + ": MOGA, a Multi-Objective Genetic Algorithm";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user