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>
The
DSEDecoder
is responsible for converting the genotypes into
proper PCM instances that can then be analysed.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyChangeToGenotype
(DesignDecisionGenotype genotype, DegreeOfFreedomInstance degree, Choice choice) Edits the passed genotype by inserting the passed choice at the index for the passedDegreeOfFreedomInstance
.decode
(DesignDecisionGenotype genotype) static Choice
getChoiceFor
(String decisionString, DegreeOfFreedomInstance designDecision) static Choice
getChoiceForIndex
(int index, String decisionString) Calls getDoubleValueFor(String decisionString, DesignDecision designDecision)static String
getDecisionString
(Choice choice) Returns the String that can be used to represent the choice.static String
getGenotypeString
(DesignDecisionGenotype genotype) static double
-
Constructor Details
-
DSEDecoder
@Inject public DSEDecoder()
-
-
Method Details
-
decode
- Specified by:
decode
in interfaceorg.opt4j.core.problem.Decoder<DesignDecisionGenotype,
PCMPhenotype>
-
returnInterval
public static double returnInterval() -
getGenotypeString
-
getDecisionString
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
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
-
-