1 | package de.uka.ipd.sdq.dsexplore.opt4j.representation; |
2 | |
3 | import org.opt4j.config.annotations.Name; |
4 | import org.opt4j.core.problem.Creator; |
5 | import org.opt4j.core.problem.Decoder; |
6 | import org.opt4j.core.problem.Evaluator; |
7 | import org.opt4j.core.problem.ProblemModule; |
8 | |
9 | |
10 | public class DSEModule extends ProblemModule { |
11 | |
12 | @Name("Use the GUI?") |
13 | boolean useGui = false; |
14 | |
15 | public boolean isUseGui() { |
16 | return useGui; |
17 | } |
18 | |
19 | public void setUseGui(boolean useGui) { |
20 | this.useGui = useGui; |
21 | } |
22 | |
23 | @Override |
24 | public void configure() { |
25 | //bind(DSENeighbor.class).asEagerSingleton(); |
26 | bindProblem(DSECreator.class, DSEDecoder.class, |
27 | DSEEvaluator.class); |
28 | |
29 | } |
30 | |
31 | //@Override |
32 | @Override |
33 | protected void config() { |
34 | |
35 | //bind(DSENeighbor.class).asEagerSingleton(); |
36 | |
37 | Class<? extends Creator<?>> creator = DSECreator.class; |
38 | Class<? extends Decoder<?, ?>> decoder = DSEDecoder.class; |
39 | Class<? extends Evaluator<?>> evaluator = DSEEvaluator.class; |
40 | |
41 | bindProblem(creator, decoder, evaluator); |
42 | |
43 | //This did not work, so I moved it to Opt4JStarter.runTask(..) |
44 | //bindIndividualStateListener(DSEIndividualStateListener.class); |
45 | |
46 | |
47 | |
48 | } |
49 | |
50 | } |