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 Details

    • DSEDecoder

      @Inject public DSEDecoder()
  • Method Details

    • decode

      public PCMPhenotype decode(DesignDecisionGenotype genotype)
      Specified by:
      decode in interface org.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 org.eclipse.core.runtime.CoreException
      Calls getDoubleValueFor(String decisionString, DesignDecision designDecision)
      Parameters:
      index -
      decisionString -
      Returns:
      Throws:
      org.eclipse.core.runtime.CoreException
    • getChoiceFor

      public static Choice getChoiceFor(String decisionString, DegreeOfFreedomInstance designDecision) throws org.eclipse.core.runtime.CoreException
      Throws:
      org.eclipse.core.runtime.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 passed DegreeOfFreedomInstance.
      Parameters:
      genotype -
      degree -
      choice -