Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Quality indicators #5

Merged
merged 7 commits into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
minor bug fixes
  • Loading branch information
danieledipompeo committed Jan 24, 2019
commit d6ef5dfcb3c388d432b45c62bdcb775c611d6a6f
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
import org.uma.jmetal.util.experiment.ExperimentBuilder;
import org.uma.jmetal.util.experiment.component.ComputeQualityIndicators;
import org.uma.jmetal.util.experiment.component.ExecuteAlgorithms;
import org.uma.jmetal.util.experiment.component.GenerateBoxplotsWithR;
import org.uma.jmetal.util.experiment.component.GenerateLatexTablesWithStatistics;
import org.uma.jmetal.util.experiment.component.GenerateReferenceParetoFront;
import org.uma.jmetal.util.experiment.component.GenerateWilcoxonTestTablesWithR;
import org.uma.jmetal.util.experiment.util.ExperimentAlgorithm;
Expand Down Expand Up @@ -137,7 +139,7 @@ public Controller() {
manager = new Manager(new AemiliaManager(this));
manager.setController(this);
availabilityManager = new AemiliaAvailabilityManager(this);
perfQuality = new PerformanceQualityEvaluator(manager.getOclManager());
// perfQuality = new PerformanceQualityEvaluator(manager.getOclManager());
metamodelManager = manager.getMetamodelManager();
}

Expand Down Expand Up @@ -166,7 +168,7 @@ public Controller(String propertiesFile) {

updateSourceModel();

sourceModelPAs = perfQuality.performanceAntipatternEvaluator(metamodelManager.getModel(), ruleFilePath);
sourceModelPAs = getPerfQuality().performanceAntipatternEvaluator(metamodelManager.getModel(), ruleFilePath);
this.numberOfPAs = 0;
for (String key : sourceModelPAs.keySet()) {
this.numberOfPAs += sourceModelPAs.get(key).size();
Expand Down Expand Up @@ -319,6 +321,8 @@ public void runExperiment() {
new GenerateReferenceParetoFront(experiment).run();
new ComputeQualityIndicators<>(experiment).run();
new GenerateWilcoxonTestTablesWithR<>(experiment).run();
new GenerateBoxplotsWithR<>(experiment).run();
new GenerateLatexTablesWithStatistics(experiment).run();
} catch (Exception e) {
e.printStackTrace();
}
Expand All @@ -344,12 +348,11 @@ private List<ExperimentAlgorithm<RSolution, List<RSolution>>> configureAlgorithm

for (int i = 0; i < problemList.size(); i++) {

// final CrossoverOperator<RSolution> crossover = new
// RCrossover(crossoverProbability, this);
CustomNSGAIIBuilder<RSolution> customNSGABuilder = new CustomNSGAIIBuilder<RSolution>(
problemList.get(i).getProblem(), crossoverOperator, mutationOperator);

customNSGABuilder.setMaxEvaluations(this.maxEvaluations);
// customNSGABuilder.setMaxEvaluations(this.maxEvaluations);
customNSGABuilder.setMaxEvaluations(400);
customNSGABuilder.setPopulationSize(this.populationSize);
customNSGABuilder.setSolutionListEvaluator(solutionListEvaluator);

Expand All @@ -365,8 +368,9 @@ private List<ExperimentAlgorithm<RSolution, List<RSolution>>> configureAlgorithm
@SuppressWarnings("unchecked")
CustomSPEA2Builder<RSolution> spea2Builder = (CustomSPEA2Builder<RSolution>) new CustomSPEA2Builder(
problemList.get(i).getProblem(), crossoverOperator, mutationOperator)
.setMaxIterations(Math.toIntExact(this.maxEvaluations / this.populationSize))
.setSelectionOperator(selectionOpertor).setSolutionListEvaluator(solutionListEvaluator)
// .setMaxIterations(Math.toIntExact(this.maxEvaluations / this.populationSize))
.setMaxIterations(100)
.setPopulationSize(this.populationSize);

CustomSPEA2<RSolution> algorithm = (CustomSPEA2<RSolution>) spea2Builder.build();
Expand Down Expand Up @@ -615,7 +619,8 @@ private FileInputStream getConfigFile(String filename) throws FileNotFoundExcept
}

public PerformanceQualityEvaluator getPerfQuality() {
return perfQuality;
// return perfQuality;
return new PerformanceQualityEvaluator(manager.getOclManager());
}

public void setPerfQuality(PerformanceQualityEvaluator perfQuality) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ else if (appOp instanceof LessEqualOperator)
}

public OclManager getOclManager() {
return oclManager;
// return oclManager;
return getMetamodelManager().getOclManager();
}

public void setOclManager(OclManager oclMan) {
Expand Down