Class DSEDecoder
- java.lang.Object
-
- de.uka.ipd.sdq.dsexplore.opt4j.representation.DSEDecoder
-
- All Implemented Interfaces:
org.opt4j.core.problem.Decoder<DesignDecisionGenotype,PCMPhenotype>
public class DSEDecoder extends Object implements org.opt4j.core.problem.Decoder<DesignDecisionGenotype,PCMPhenotype>
TheDSEDecoderis responsible for converting the genotypes into proper PCM instances that can then be analysed.
-
-
Constructor Summary
Constructors Constructor Description DSEDecoder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidapplyChangeToGenotype(DesignDecisionGenotype genotype, DegreeOfFreedomInstance degree, Choice choice)Edits the passed genotype by inserting the passed choice at the index for the passedDegreeOfFreedomInstance.PCMPhenotypedecode(DesignDecisionGenotype genotype)static ChoicegetChoiceFor(String decisionString, DegreeOfFreedomInstance designDecision)static ChoicegetChoiceForIndex(int index, String decisionString)Calls getDoubleValueFor(String decisionString, DesignDecision designDecision)static StringgetDecisionString(Choice choice)Returns the String that can be used to represent the choice.static StringgetGenotypeString(DesignDecisionGenotype genotype)static doublereturnInterval()
-
-
-
Method Detail
-
decode
public PCMPhenotype decode(DesignDecisionGenotype genotype)
- Specified by:
decodein interfaceorg.opt4j.core.problem.Decoder<DesignDecisionGenotype,PCMPhenotype>
-
returnInterval
public static double returnInterval()
-
getGenotypeString
public static String getGenotypeString(DesignDecisionGenotype genotype)
-
getDecisionString
public static String getDecisionString(Choice choice)
Returns the String that can be used to represent the choice. Either toString or, for an Entity, a more speaking String.- Parameters:
choice- the choice- Returns:
- a String that can be used to represent this choice
-
getChoiceForIndex
public static Choice getChoiceForIndex(int index, String decisionString) throws CoreException
Calls getDoubleValueFor(String decisionString, DesignDecision designDecision)- Parameters:
index-decisionString-- Returns:
- Throws:
CoreException
-
getChoiceFor
public static Choice getChoiceFor(String decisionString, DegreeOfFreedomInstance designDecision) throws CoreException
- Throws:
CoreException
-
applyChangeToGenotype
public static void applyChangeToGenotype(DesignDecisionGenotype genotype, DegreeOfFreedomInstance degree, Choice choice)
Edits the passed genotype by inserting the passed choice at the index for the passedDegreeOfFreedomInstance.- Parameters:
genotype-degree-choice-
-
-