public class AbYSSstudy extends Experiment
{
|
… |
public void algorithmSettings(Problem problem, int problemIndex)
{
|
… |
parameters .setProperty(“POPULATION_SIZE”, “50”); |
parameters .setProperty(“MAX_EVOLUTIONS”, “500”); |
parameters .setProperty(“REF_SET1_SIZE”, “20”); |
parameters .setProperty(“REF_SET2_SIZE”, “20”); |
parameters .setProperty(“ARCHIVE_SIZE”, “40”); |
parameters .setProperty(“CROSSOVER_PROBABILITY”, |
“1.00”); |
parameters .setProperty(“MUTATION_PROBABILITY”, |
“1.00”); |
parameters .setProperty(“IMPROVEMENT_ROUNDS”, “1”); |
… } |
public static void main(String args) throws JMException, |
IOException { |
… |
exp.experimentName_ “AbYSSstudy”; |
exp.algorithmNameList_ newString |
{“AbYSSa”,“AbYSSb”,“AbYSSc”,“AbYSSd”,“AbYSSe”,“AbYSSf”,“AbYS |
Sg”,“AbYSSh”,“AbYSSi”,“AbYSSl”,“AbYSSm”,“AbYSSn”,“AbYSSo”,“A |
bYSSp”,“AbYSSr”,“AbYSSs”}; |
exp.problemList_ new String {“example1”}; |
exp.paretoFrontFile_ new String {“example1.pf”; |
exp.indicatorList_ new String {“HV”, “SPREAD”, “IGD”, |
“EPSILON”}; |
… |
exp.independentRuns_ 10; |
public class example1 extends Problem
{
|
public example1(String solutionType) { |
numberOfVariables_ 5; |
numberOfObjectives_ 2; |
numberOfConstraints_ 5; |
problemName_ “example1”; |
lowerLimit_ new double numberOfVariables_ ; |
upperLimit_ new double numberOfVariables_ ; |
lowerLimit_ 1; |
lowerLimit_ 1; |
upperLimit_ 274; |
upperLimit_ 274; |
variableType_ new VariableType_ numberOfVariables_ ; |
length_ new int numberOfVariables_ ; |
length_ new int numberOfVariables_ ; |
solutionType _ Enum.valueOf(VariableType_.class, |
“SolutionType”); |
for (int var 0; var < numberOfVariables_; var ){ |
variableType_ Enum.valueOf(VariableType_.class, |
solutionType); |
length_ numberOfBits; |
} |
} |
public example1 { |
} |
public void evaluate(Solution solution) throws JMException { |
… } |
public void evaluateConstraints(Solution solution) throws |
JMException { |
… } |