Class Adapter
- java.lang.Object
-
- de.uka.ipd.sdq.dsexplore.opt4j.genotype.Adapter
-
public class Adapter extends Object
TheAdapter
contains methods to translate betweenDesignDecisionGenotype
andFinalBinaryGenotype
. In the conversion process, the following steps are involved:1) The
DesignDecisionGenotype
(a list ofChoice
objects), is first converted to a list ofBinaryGenotype
objects.2) The list of
BinaryGenotype
objects are converted toFinalBinaryGenotype
object using theFinalBinaryGenotype
constructor. This is the final stage of the conversion where we have obtained our end result (that of converting theDesignDecisionGenotype
to aFinalBinaryGenotype
).For the retranslation process, we have to convert the
FinalBinaryGenotype
to aDesignDecisionGenotype
. The process goes as follows:1)
FinalBinaryGenotype
is converted to a list ofBinaryGenotype
objects2)This list is converted to a list of
Choice
objects and is used to construct aDesignDecisionGenotype
NOTE: During the retranslation for the ContinuousProcessingRateDegree, we cannot assign the correct server speed value to the corresponding
Choice
object, because the binary representation gives us server speed intervals (instead of particular values). This problem is partially overcome by randomly assigning one of the previously used values of server speed (in a particular interval) during the initialization of the problem.
-
-
Constructor Summary
Constructors Constructor Description Adapter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
List<BinaryGenotype>
translateDesignDecisionGenotype(DesignDecisionGenotype DDGenotype)
DesignDecisionGenotype
translateFinalBinaryGenotype(FinalBinaryGenotype FBGenotype)
Translates the givenFinalBinaryGenotype
named FBGenotype to aDesignDecisionGenotype
.
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
translateDesignDecisionGenotype
public List<BinaryGenotype> translateDesignDecisionGenotype(DesignDecisionGenotype DDGenotype)
Translates the givenDesignDecisionGenotype
named DDGenotype to aList
ofBinaryGenotype
objects. EachBinaryGenotype
object holds the binary representation of a particularChoice
object in the DDGenotype. The DDGenotype contains the private field "choices", which is actually aList
ofChoice
objects. EachChoice
object is referenced to a particular DOF- Parameters:
DDGenotype
-- Returns:
-
translateFinalBinaryGenotype
public DesignDecisionGenotype translateFinalBinaryGenotype(FinalBinaryGenotype FBGenotype)
Translates the givenFinalBinaryGenotype
named FBGenotype to aDesignDecisionGenotype
.- Parameters:
FBGenotype
-- Returns:
-
-