Class DSEIndividual
- java.lang.Object
-
- org.opt4j.core.Individual
-
- de.uka.ipd.sdq.dsexplore.opt4j.representation.DSEIndividual
-
- Direct Known Subclasses:
NonListenableIndividual
,TacticsResultCandidate
public class DSEIndividual extends org.opt4j.core.Individual
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DSEIndividual()
DSEIndividual(DecisionSpace problem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Checks the equality of this and o.DesignDecisionGenotype
getGenotype()
String
getGenotypeString()
String
getID()
long
getNumericID()
DSEObjectives
getObjectives()
Returns the objectives.DecisionSpace
getProblem()
int
hashCode()
Returns the hash code of the getGenotypeString() string if this individual is already genotyped.void
setIndividualStatusListeners(Set<org.opt4j.core.IndividualStateListener> individualStateListeners)
void
setObjectives(org.opt4j.core.Objectives objectives)
Sets the objectives.
-
-
-
Constructor Detail
-
DSEIndividual
public DSEIndividual(DecisionSpace problem)
-
DSEIndividual
protected DSEIndividual()
-
-
Method Detail
-
getGenotype
public DesignDecisionGenotype getGenotype()
- Overrides:
getGenotype
in classorg.opt4j.core.Individual
-
equals
public boolean equals(Object o)
Checks the equality of this and o. Returns false if o is not a DSEIndividual or subtype. If both this and o are not genotyped, super.equals(o) is called. Returns false if either this or o (exclusive) are not genotyped. Finally, if none of the above matches, this method returns whether the genotype strings of o and this are equal.
-
getGenotypeString
public String getGenotypeString()
- Returns:
- may be null if this individual does not have a genotype yet.
-
setIndividualStatusListeners
public void setIndividualStatusListeners(Set<org.opt4j.core.IndividualStateListener> individualStateListeners)
- Overrides:
setIndividualStatusListeners
in classorg.opt4j.core.Individual
-
hashCode
public int hashCode()
Returns the hash code of the getGenotypeString() string if this individual is already genotyped. Returns super.hashCode() if this inidividual is not yet genotyped.
-
getObjectives
public DSEObjectives getObjectives()
Returns the objectives.- Overrides:
getObjectives
in classorg.opt4j.core.Individual
- Returns:
- the objectives
-
setObjectives
public void setObjectives(org.opt4j.core.Objectives objectives)
Sets the objectives. They have to be instances of typeDSEObjective
, or anIllegalArgumentException
is thrown- Overrides:
setObjectives
in classorg.opt4j.core.Individual
- Parameters:
objectives
- the objectives to be set- Throws:
IllegalArgumentException
- if objectives are not of typeDSEObjective
.
-
getID
public String getID()
-
getNumericID
public long getNumericID()
-
getProblem
public DecisionSpace getProblem()
-
-