Class Adapter
Adapter
contains methods to translate between DesignDecisionGenotype
and FinalBinaryGenotype
. In the conversion process, the following steps are
involved:
1) The DesignDecisionGenotype
(a list of Choice
objects), is first converted to
a list of BinaryGenotype
objects.
2) The list of BinaryGenotype
objects are converted to FinalBinaryGenotype
object
using the FinalBinaryGenotype
constructor. This is the final stage of the conversion where
we have obtained our end result (that of converting the DesignDecisionGenotype
to a FinalBinaryGenotype
).
For the retranslation process, we have to convert the FinalBinaryGenotype
to a DesignDecisionGenotype
. The
process goes as follows:
1) FinalBinaryGenotype
is converted to a list of BinaryGenotype
objects
2)This list is converted to a list of Choice
objects and is used
to construct a DesignDecisionGenotype
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
translateFinalBinaryGenotype
(FinalBinaryGenotype FBGenotype) Translates the givenFinalBinaryGenotype
named FBGenotype to aDesignDecisionGenotype
.
-
Constructor Details
-
Adapter
public Adapter()
-
-
Method Details
-
main
-
translateDesignDecisionGenotype
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
Translates the givenFinalBinaryGenotype
named FBGenotype to aDesignDecisionGenotype
.- Parameters:
FBGenotype
-- Returns:
-