diff options
author | 2019-06-09 15:13:00 -0400 | |
---|---|---|
committer | 2019-06-09 15:13:00 -0400 | |
commit | cd63ccf6fba2a812a9b115635bbd209c92cebad0 (patch) | |
tree | 6f2a04b6fd274dffe6bb72c1afdf87989c0ba6db /Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java | |
parent | Simplify satellite metamodel further (diff) | |
download | VIATRA-Generator-cd63ccf6fba2a812a9b115635bbd209c92cebad0.tar.gz VIATRA-Generator-cd63ccf6fba2a812a9b115635bbd209c92cebad0.tar.zst VIATRA-Generator-cd63ccf6fba2a812a9b115635bbd209c92cebad0.zip |
Bump MDEOptimizer version
https://github.com/mde-optimiser/mde_optimiser/issues/49
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java deleted file mode 100644 index 52d3f665..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; | ||
2 | |||
3 | import java.util.Properties; | ||
4 | import org.moeaframework.Executor; | ||
5 | import org.moeaframework.Instrumenter; | ||
6 | import org.moeaframework.algorithm.PeriodicAction; | ||
7 | import org.moeaframework.core.TerminationCondition; | ||
8 | import org.moeaframework.core.spi.AlgorithmFactory; | ||
9 | import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.AlgorithmSpec; | ||
10 | import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.SolverSpec; | ||
11 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.executor.SolutionGenerator; | ||
12 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.MoeaOptimisation; | ||
13 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.algorithms.MoeaOptimisationAlgorithmProvider; | ||
14 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.instrumentation.PopulationCollector; | ||
15 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.problem.MoeaOptimisationProblem; | ||
16 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.operators.adaptation.MutationStepSizeStrategy; | ||
17 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.operators.adaptation.MutationStepSizeStrategyFactory; | ||
18 | |||
19 | @SuppressWarnings("all") | ||
20 | public class ExcludedMoeaOptimisation extends MoeaOptimisation { | ||
21 | private SolutionGenerator solutionGenerator; | ||
22 | |||
23 | private Instrumenter algorithmStepSizeInstrumenter; | ||
24 | |||
25 | @Override | ||
26 | public Instrumenter execute(final SolverSpec solverSpec, final SolutionGenerator solutionGenerator) { | ||
27 | Instrumenter _xblockexpression = null; | ||
28 | { | ||
29 | this.solutionGenerator = solutionGenerator; | ||
30 | _xblockexpression = super.execute(solverSpec, solutionGenerator); | ||
31 | } | ||
32 | return _xblockexpression; | ||
33 | } | ||
34 | |||
35 | @Override | ||
36 | public Instrumenter runOptimisation(final SolverSpec solverSpec, final Properties optimisationProperties) { | ||
37 | final AlgorithmFactory algorithmFactory = new AlgorithmFactory(); | ||
38 | MoeaOptimisationAlgorithmProvider _moeaOptimisationAlgorithmProvider = new MoeaOptimisationAlgorithmProvider(); | ||
39 | algorithmFactory.addProvider(_moeaOptimisationAlgorithmProvider); | ||
40 | Instrumenter _attachPopulationSizeCollector = new Instrumenter().addExcludedPackage("org.eclipse").withProblemClass( | ||
41 | MoeaOptimisationProblem.class, this.solutionGenerator).attachApproximationSetCollector().attachElapsedTimeCollector().attachPopulationSizeCollector(); | ||
42 | PopulationCollector _populationCollector = new PopulationCollector(); | ||
43 | this.algorithmStepSizeInstrumenter = _attachPopulationSizeCollector.attach(_populationCollector).withFrequency(1).withFrequencyType( | ||
44 | PeriodicAction.FrequencyType.STEPS); | ||
45 | AlgorithmSpec _algorithm = solverSpec.getAlgorithm(); | ||
46 | MutationStepSizeStrategy stepSizeStrategy = new MutationStepSizeStrategyFactory(_algorithm, this.algorithmStepSizeInstrumenter).getStrategy(); | ||
47 | this.solutionGenerator.setMutationStepSizeStrategy(stepSizeStrategy); | ||
48 | this.algorithmStepSizeInstrumenter.addExcludedPackage("jdk"); | ||
49 | Object _get = optimisationProperties.get("terminationCondition"); | ||
50 | new Executor().usingAlgorithmFactory(algorithmFactory).withAlgorithm(solverSpec.getAlgorithm().getName()).withProblemClass(MoeaOptimisationProblem.class, this.solutionGenerator).withProperties(optimisationProperties).withInstrumenter(this.algorithmStepSizeInstrumenter).withTerminationCondition( | ||
51 | ((TerminationCondition) _get)).run(); | ||
52 | return this.algorithmStepSizeInstrumenter; | ||
53 | } | ||
54 | } | ||