1 | package de.uka.ipd.sdq.dsexplore.analysis; |
2 | |
3 | |
4 | import org.opt4j.core.problem.Phenotype; |
5 | |
6 | import de.uka.ipd.sdq.pcmsolver.models.PCMInstance; |
7 | |
8 | /** |
9 | * Just holds a PCM Instance and the evaluated ConfidenceIntervals, if available. |
10 | * @author Anne |
11 | * |
12 | */ |
13 | public class PCMPhenotype implements Phenotype { |
14 | |
15 | |
16 | /** |
17 | * Field to store the characteristic hash of the underlying genotype. This allows to detect duplicated genotypes and not evaluate one twice. |
18 | */ |
19 | private String genotypeID; |
20 | |
21 | private long numericId; |
22 | |
23 | /** |
24 | * Careful: This is the one PCM instance that is modified, it may not be in the right state when using it. |
25 | */ |
26 | private PCMInstance pcmInstance; |
27 | |
28 | /** |
29 | * TODO: create a separate partition in the blackboard to store |
30 | * this phenotype's PCM instance? right now there is only a single model |
31 | * The current implicit assumption is that each candidate is evaluated right after |
32 | * it has been decoded, or never. |
33 | * |
34 | * @param pcm2 not yet used, as this points always to a same instance. |
35 | * @param genotypeID |
36 | */ |
37 | public PCMPhenotype(PCMInstance pcm2, String genotypeID, long numericId){ |
38 | this.genotypeID = genotypeID; |
39 | this.numericId = numericId; |
40 | this.pcmInstance = pcm2; |
41 | } |
42 | |
43 | public String getGenotypeID() { |
44 | return genotypeID; |
45 | } |
46 | |
47 | public long getNumericID() { |
48 | return this.numericId; |
49 | } |
50 | |
51 | public PCMInstance getPCMInstance() { |
52 | return this.pcmInstance; |
53 | } |
54 | |
55 | } |